firefly
firefly copied to clipboard
Signature uniqueness checking not precise enough for decoding events
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"
}