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

Event filter topics #4694

Open
lonelyIslanders opened this issue Apr 16, 2024 · 0 comments
Open

Event filter topics #4694

lonelyIslanders opened this issue Apr 16, 2024 · 0 comments
Labels
enhancement New feature or improvement.

Comments

@lonelyIslanders
Copy link

Describe the Feature

I found that the topics of the event filter seem to not be able to use two topics with the same event name, because I tested that when the topics are two identical swap topics, even if their topics are not the same.
I don't know if this is a bug or if it's not allowed

Code Example

const swapTopicV2 = ethers.id('Swap(address,uint256,uint256,uint256,uint256,address)');
const swapTopicV3 = ethers.id('Swap(address,address,int256,int256,uint160,uint128,int24)')

const filter = {
        address: config.pairV2.concat(config.pairV3),
        fromBlock: fBlock,
        toBlock: tBlock,
        topics: [swapTopicV3]  //if topics:[swapTopicV2,swapTopicV3] there will be no logs
}
const logs = await provider.getLogs(filter);
@lonelyIslanders lonelyIslanders added the enhancement New feature or improvement. label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement.
Projects
None yet
Development

No branches or pull requests

1 participant