3

Etherscan provides a convenient way to check the transaction history of a specific custom token. However, I was wondering where is the token transaction stored in the first place. I read some of the Ethereum logs, such as this one:

{"blockNumber":"3904411","blockHash":"0xf5f12d939472b79009f86163f6ec4440ed067fd14f222bc8e9cc9b82cdbaa71b","timeStamp":"1497983089","hash":"0xc658c9f5a4e2f34adb98d364c89c6d8f263f725d9318e84cae54f60d042fbb82","nonce":"0","transactionIndex":"13","from":"0x0008ec9f540ceb20cda44ec8503981ff58a3361b","to":"","value":"0","gas":"4000000","gasPrice":"57475936256","input":"","contractAddress":"0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0","cumulativeGasUsed":"2429602","gasUsed":"1976412","confirmations":"165071","isError":"0"}

I omitted the input field as it is a bit too long.

However, I think the value field only indicates the value of ETH. But the token transaction doesn't necessarily involves ETH transactions.

I understand there might be some clues in events log. But how can I get it from the log? Can I get it directly from blockchain, instead of the event logs?

1

For what I know, the only way to check token transfer at the moment is checking the log. You can view it by changing to the event tabs on your provided url or by javascript using the web3js library and getTransactionReceipt(tx_hash) method.

In the log object, there is an array of topics, parse these topics and you will know what the transaction does. For detail on how to parse/decode these logs, please google more because there are different ways for different contract method.

0

You can see the internal transaction in this link https://etherscan.io/token/0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0

0

I have a post explaining how to parse the Ethereum event log in detail.

  • Link only answers are not recommended because the server can shutdown or the page moved. It is better to include the main points in your answer and use the link to explain the details. – Ismael Apr 6 at 19:41
  • My link stays forever. – Jinhua Wang Apr 9 at 10:31
  • You are intentions are good but sometimes the internet does not. It is possible for a site to have outages that will prevent someone from accessing your site. Also some places to block access to certain sites. – Ismael Apr 9 at 14:36
  • As long as stackoverflow exists, GitHub will. – Jinhua Wang Apr 9 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.