I'd like to have a better understanding of events and logs data, more specifically when it comes to interacting with ERC20 tokens smart contracts and their
I'm looking for a way to extract the transfer value/amount from the returned (transaction) Log struct as described in the rust-web3 documentation.
I understand that from the event log, the
topics field has 3 values:
topicsis the keccak-256 of the
topicsis the value of the _from address.
topicsis the value of the _to address.
I suspect I can extract the transfer amount in an ERC20 token transaction from the
data field in the events log but I haven’t figured how to do that yet. data is of type Bytes, i.e. a Vec
<u8>, a vector of 32