1

I tried out to get a transaction using the etherscan API, but it seems, that the value of the transaction, as well as pretty much everyhthing about the transaction is encoded. I really do not understand how I might be able to find out the real value from this. Maybe somebody is able to help me

{
    "jsonrpc": "2.0", 
    "id": 1, 
    "result": {
        "blockHash": "0x84d7a319a6dbbf8c7f6fd5d3ad7ff8af656823b9150b3b16e62a959209402f66", 
        "blockNumber": "0xd86677", 
        "from": "0x650e035584ec7d44ee1e798e02c55508674e0ef2", 
        "gas": "0x5208", 
        "gasPrice": "0x16deabeae3", 
        "maxFeePerGas": "0x1c5d4d32b0", 
        "maxPriorityFeePerGas": "0x59682f00", 
        "hash": "0x53eeef5726e9b89b47eb0876da44ba2cb9622605d2d60616632d4511bae0c48f", 
        "input": "0x", 
        "nonce": "0x16", 
        "to": "0xc2e9b6cc2e9e47a72c1c4c78b0d6e9e73dbfc277", 
        "transactionIndex": "0x8e", 
        "value": "0x8e1bc9bf040000", 
        "type": "0x2", 
        "accessList": [], 
        "chainId": "0x1", 
        "v": "0x0", 
        "r": "0x273b057fd3819987f7c89c0ba5fe690c98335ef35cc1a2972b392e2c3f102ebe", 
        "s": "0x7eba6b02576e67112584ade4f356877c3bbf67de70bef4f74630bd6a4e1892d8"
    }
    
}
1
  • value is the hex of the amount of ether that is transferred in WEI. if you are calling a smart contract then the data transferred to the contract is in "input" and you need the contract code to decode it easily. v r s are the singature... you need to understand what inside a transaction and then you can decode the data :) and for contract data you need contract code. but this tx has no input so it is only ether transfer from 0x650e035584ec7d44ee1e798e02c55508674e0ef2 to 0xc2e9b6cc2e9e47a72c1c4c78b0d6e9e73dbfc277
    – Majd TL
    Commented Feb 14, 2022 at 19:23

1 Answer 1

0

You can start here :) it will help you to understand what are those keys and then you can understand the values and decode them

https://ethereum.org/en/developers/docs/transactions/ https://ethereum.org/en/developers/docs/blocks/

examples:

Value: is the hex of the amount of ether that is transferred in WEI.

Input: if you are calling a smart contract then the data transferred to the contract is in "input" and you need the contract code to decode it easily.

v, r, s: are the signature

nonce: is the number of the transaction

chainId: the id of the blockchain. ethereum mainnet has id 1 = 0x1

This Transaction has no input so I assume it is only ether transfer 0.04 from 0x650e035584ec7d44ee1e798e02c55508674e0ef2 to 0xc2e9b6cc2e9e47a72c1c4c78b0d6e9e73dbfc277

3
  • Thank you that was a big help, but I don't really get yet, how I can get the original amount I transferred? Commented Feb 14, 2022 at 20:37
  • @CyberguyGame It is in „value“ convert that from hex-decimal to decimal and then decimal from Wei to Ether
    – Majd TL
    Commented Feb 14, 2022 at 20:46
  • I can write make a picture of that tomorrow on my laptop
    – Majd TL
    Commented Feb 14, 2022 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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