Skip to content

Event filter topics #4694

Open
Open
@lonelyIslanders

Description

@lonelyIslanders

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions