I'm connected to an Ethereum node (running Geth) I manage and I'm able to connect to it using RPC. I can access web3 in the terminal after issuing geth console. I can access and run the RPC function calls as listed in the documentation here. I have to switch between different libraries like webpy and web3.js so an implementation in either should be fine.

Given a transaction hash, I can fetch the transaction details, say using web3.eth.getTransaction(transaction_hash). But all the details I get only includes: hash, input, nonce, from, to, transaction_index, value, v, r, s.

What I'm curious about is how does this website access rest of the rich details as to how many tokens were transferred. More specifically, how can we read (given the sender and contract address involved in a transactions) the value of tokens transferred i.e. the value parameter of the function call?

A snapshot of such details from the above website. (How does one figure out the Token Transfer, shown in the picture below)

enter image description here

Is it from the input field? If so, how does one interpret the hex to actuall values and the function called?


They most probably are listening on the events generated by every smart contract and indexes them in their local database.

The standard ERC20 compatible smart contracts generate a Transfer() event with each transaction. If you want to monitor all the events generated by a smart contract, you can subscribe your client to allEvents

| improve this answer | |

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.