Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filters :: Supporting multiple events #775

Closed
Valazan opened this issue Apr 4, 2024 · 1 comment
Closed

Filters :: Supporting multiple events #775

Valazan opened this issue Apr 4, 2024 · 1 comment

Comments

@Valazan
Copy link
Contributor

Valazan commented Apr 4, 2024

Currently we are not supporting multiple events with direct encoding as suggested in #774

Modify the current thor.logs.filterEventLogs to support the feature

Events will be filtered in both these ways, by either using a fragment or the contract object:

await thor.logs.filterEventLogs(
    criteriaSet: [
        {
            address: '0x0000000000000000000000000000456e65726779',
            fragment: 'event Transfer(address indexed from, address indexed to, uint256 amount)',
            args: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045', '0xa5cc3c03994db5b0d9a5eedd10cabab0813678ac']
        }
    ]
})

Could also be invoked like this:

await thor.logs.filterEventLogs(
    criteriaSet: [
        contract.criteria.Transfer('0xd8da6bf26964af9d7eed9e03e53415d37aa96045', '0xa5cc3c03994db5b0d9a5eedd10cabab0813678ac')
    ]
})
@Valazan Valazan changed the title Filters: Supporting multiple events Filters :: Supporting multiple events Apr 4, 2024
@nwbrettski
Copy link
Collaborator

Duplicate of #774

@nwbrettski nwbrettski marked this as a duplicate of #774 Apr 8, 2024
@nwbrettski nwbrettski closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants