Decoding ETH Calldata
Decode your hex data to know what you are truly signing before proceeding with a transaction.
To quickly decode your calldata:
-
Input your hex data in the hex parameter or fork this query
-
Input the token’s decimal places in the decimals parameter (e.g., 6 for USDC, 18 for ETH).
-
Run the query and wait for it to decode your calldata.
Supported Functions: This query currently decodes the following functions:
-
approve(address spender, uint256 amount)
-
transfer(address recipient, uint256 amount)
-
transferFrom(address from, address to, uint256 amount)
If your calldata is for a different function, fork the query and add the necessary logic to handle it. For example, you can extend the query to support mint, burn, or other custom functions.
Example: For USDC (6 decimals), input 6 in the decimals parameter.
This confirms that:
- You're calling the approve function. Short explanation: 095ea7b3 is the function selector for "approve(address,uint256)". This selector is derived from the Keccak-256 hash of the function signature.
- You're approving the address def1c0ded9bec7f1a1670819833240f027b25ef to spend your tokens.
- The amount you're approving is 10000000 (note: depending on the token's decimals, this might represent a different "human-readable" amount). In this specific case, this transaction example intends to transfer 10 USDC, and USDC has 6 decimals, so this amount represents 10000000 / 10^6 = 10 USDC.
For a deeper explanation, read: https://valens.hashnode.dev/understanding-and-verifying-ethereum-transaction-calldata