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

Signature uniqueness checking not precise enough for decoding events #1434

Closed
peterbroadhurst opened this issue Dec 18, 2023 · 1 comment
Closed

Comments

@peterbroadhurst
Copy link
Contributor

I can't create a wildcard event listener on both the below two events, on the same topic because the signature is the same per ethereum standard semantics Transfer(address,address,uint256)...

...but the encoding into the event is not the same because in one the 3rd parameter is indexed: true.

ERC-20 transfer

    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "from",
                "type": "address"
            },
            {
                "indexed": true,
                "name": "to",
                "type": "address"
            },
            {
                "indexed": false,
                "name": "value",
                "type": "uint256"
            }
        ],
        "name": "Transfer",
        "type": "event"
    }

ERC-721 transfer

    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "from",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "to",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "uint256",
                "name": "tokenId",
                "type": "uint256"
            }
        ],
        "name": "Transfer",
        "type": "event"
    }
@EnriqueL8
Copy link
Contributor

@peterbroadhurst I fixed this one as part of the multiple listeners, closing

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