Skip to content

Commit

Permalink
add evt_sig to filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBger committed Oct 30, 2024
1 parent 3a3855c commit 73c24c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion evm-events-calls/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ type DynamicContract struct {
func (d DynamicContract) FactoryInitialBlock() uint64 {
return *d.parentContract.InitialBlock
}

func (d DynamicContract) GenerateStoreQuery() string {
return fmt.Sprintf("evt_addr:%s || evt_sig:%s", d.parentContract.Address, "0x"+d.parentContract.FactoryCreationEvent)
}
func (d DynamicContract) ParentContract() *Contract { return d.parentContract }
func (d DynamicContract) Identifier() string { return d.Name }
func (d DynamicContract) IdentifierSnakeCase() string { return kace.Snake(d.Name) }
Expand Down
2 changes: 1 addition & 1 deletion evm-events-calls/templates/substreams.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ modules:
blockFilter:
module: ethcommon:index_events
query:
string: evt_addr:{{ $ddsContract.ParentContract.Address }}
string: {{ $ddsContract.GenerateStoreQuery }}
inputs:
- source: sf.ethereum.type.v2.Block
{{- end}}
Expand Down

0 comments on commit 73c24c3

Please sign in to comment.