Here's a snapshot from etherscan.io
Asked
Active
Viewed 8,049 times
2 Answers
19
topics[0] is the hash of the signature of the event.
keccak256("Deposit(address,bytes32,uint256)") is the signature of the event:
event Deposit(
address indexed _from,
bytes32 indexed _id,
uint _value
);
eth
- 85,679
- 53
- 285
- 406
4
Note when applying this for structs, the pattern is to nest the structs in a similar way. So:
keccak256("Deposit(address,bytes32,uint256,(bytes32, bytes32))") is the signature of the event:
struct MoreData
{
bytes32 id1;
bytes32 id2;
}
event Deposit(
address indexed _from,
bytes32 indexed _id,
uint _value,
MoreData _moreData
);
K S
- 171
- 3

keccak_256hash right? – garg10may Sep 18 '17 at 14:21