Reputation: 11
transaction hash : 0x70a584e4a2eb38cf7d6d48e215f6ac105b17ecfd97cd7091c4079bb961c2aa4c
[Etherscan Website]
https://etherscan.io/tx/0x70a584e4a2eb38cf7d6d48e215f6ac105b17ecfd97cd7091c4079bb961c2aa4c
transferd value = 90000000000000000000000 (90,000 C3W)
[Etherscan API]
transfered value = 9000000000000 (0.000009 C3W)
[Web3]
const tx = await web3.eth.getTransaction('0x70a584e4a2eb38cf7d6d48e215f6ac105b17ecfd97cd7091c4079bb961c2aa4c');
const input = tx.input; // '0xa9059cbb0000000000000000000000000d7a0161f798166b2fcc996f03448892c25841930000000000000000000000000000000000000000000000000000082f79cd9000'
/*** convert ***/
transfered value = 9000000000000 (0.000009 C3W)
Why different? Which data is correct? And how to get correct token value with Web3 or Etherscan API?
Upvotes: 0
Views: 635
Reputation: 1
According to the decoded input data provided by the etherscan,
# Name Type Data 0 _to address 0d7a0161f798166b2fcc996f03448892c2584193 1 _value uint256 9000000000000
I could not find any problems.
And, C3W token decimals is 8.
So, 9000000000000 is right.
Upvotes: 0