Skip to content

Commit 2a37389

Browse files
authored
Adding ability to match any topic on log emitted actions trigger (#210)
1 parent a3c4603 commit 2a37389

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

model/actions/trigger_transaction.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ func (e *EventEmittedField) ToRequest() (response []actions.EventEmittedFilter)
325325
type LogEmittedValue struct {
326326
StartsWith []Hex64 `yaml:"startsWith" json:"startsWith"`
327327
Contract *ContractValue `yaml:"contract" json:"contract"`
328+
MatchAny bool `yaml:"matchAny" json:"matchAny,omitempty"`
328329
}
329330

330331
func (l *LogEmittedValue) Validate(ctx ValidatorContext) (response ValidateResponse) {
@@ -355,6 +356,9 @@ func (l *LogEmittedValue) ToRequest() actions.LogEmittedFilter {
355356
}
356357
lef.Contract = &c
357358
}
359+
if l.MatchAny {
360+
lef.MatchAny = true
361+
}
358362
return lef
359363
}
360364

rest/payloads/generated/actions/structs.conjure.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ func (o *FunctionFilter) UnmarshalYAML(unmarshal func(interface{}) error) error
877877
type LogEmittedFilter struct {
878878
TopicsStartsWith []string `json:"topicsStartsWith"`
879879
Contract *ContractReference `json:"contract"`
880+
MatchAny bool `json:"matchAny,omitempty"`
880881
}
881882

882883
func (o LogEmittedFilter) MarshalJSON() ([]byte, error) {

0 commit comments

Comments
 (0)