Simplifying smart contract analysis through human-readable tables.
[blockchain].contracts
tables, the data explorer or use this dashboard.
If you want to submit several contracts at the same time, there is also the possibility of submitting a batch of contracts. To do so, please use this CSV as a template and fill it in with the appropriate information for the contracts you want to decode. Afterwards send the CSV to decoding@dune.com.
ethereum.logs
table in the Dune database, we will receive the same encoded bytecode as our result dataset.
pickle_finance_ethereum.PickleToken_evt_Transfer
table to access the decoded event log.
Transfer
event log of an ERC20 token will always be:
address
(32bytes) and are respectively the sender and recipient of the token transfer. An event log only has 3 indexed fields, so the data
field is used to store the information about how much units of the token have been moved in this transaction. This field is called value
.
Since topic0
always is just the Keccak-256 hash of the signature of the event, we are left with decoding topic1
, topic2
and data
.
In this case, they map out like this:
raw data field | decoded data description | raw data | decoded data |
---|---|---|---|
topic0 | keccak256(“Transfer(address,address,uint256)“) | 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef | not needed, this table only contains event logs from the transfer event log |
topic1 | from | 0x00000000000000000000000075e89d5979e4f6fba9f97c104c2f0afb3f1dcb88 | 0x75e89d5979e4f6fba9f97c104c2f0afb3f1dcb88 |
topic2 | to | 0x00000000000000000000000087d9da48db6e1f925cb67d3b7d2a292846c24cf7 | 0x87d9da48db6e1f925cb67d3b7d2a292846c24cf7 |
data | value | 0x00000000000000000000000000000000000000000000001a894d51f85cb08000 | 489509000000000000000 |