You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In standard Ethereum logs, the log.address field always contains the address of the contract that emitted that log. So, if you are looking at an ERC‑20 Transfer event log, log.address will be the address of the token contract.
log.address = the contract address that emitted the event.
call.address (if exposed in certain tooling) may indicate the “to” or “from” in a lower-level call context, but is not the address that emitted the event.
Therefore, to find the token contract address from a Transfer event, you would look at log.address.
Example (pseudocode)
for(letlogofreceipt.logs){if(log.topics[0]===TRANSFER_TOPIC_SIGNATURE){lettokenContractAddress=log.address;// decode the rest of the event data, e.g., from/to/value}}
Here, tokenContractAddress is the ERC‑20 contract’s address.
The text was updated successfully, but these errors were encountered:
DenisCarriere
added a commit
to pinax-network/substreams-erc20-balance-changes
that referenced
this issue
Feb 14, 2025
log.address
for contract address in Transfer eventsstorage_change.address
for contract address in Balance Change eventshttps://github.com/streamingfast/substreams-erc20-balance-changes/blob/99907f0bbb3bc0a4545bb1898b3883f6621381b9/src/maps.rs#L133C44-L133C56
ChatGPT context
In standard Ethereum logs, the log.address field always contains the address of the contract that emitted that log. So, if you are looking at an ERC‑20
Transfer
event log, log.address will be the address of the token contract.log.address
= the contract address that emitted the event.call.address
(if exposed in certain tooling) may indicate the “to” or “from” in a lower-level call context, but is not the address that emitted the event.Therefore, to find the token contract address from a
Transfer
event, you would look atlog.address
.Example (pseudocode)
Here,
tokenContractAddress
is the ERC‑20 contract’s address.The text was updated successfully, but these errors were encountered: