ABI Encoder & Decoder

Encode Solidity function parameters into calldata or decode hex ABI data. Essential for smart contract interaction and debugging.

What is ABI Encoding?

ABI (Application Binary Interface) encoding is how Solidity converts function parameters into machine-readable hex data. When you call a smart contract function on Ethereum, the arguments are encoded into calldata—a hex string that tells the contract which function to call and with what parameters.

Encode Mode

Takes your Solidity ABI and function parameters, then generates the calldata hex string needed to interact with the contract.

// Function in contract
function transfer(address to, uint256 amount) { }

// Encoded calldata
0xa9059cbb000000000000000000000000...

Decode Mode

Takes a hex calldata or log data string and converts it back into readable parameter names and values based on the ABI signature.

Common Use Cases

1

Smart Contract Debugging

Decode failed transaction calldata to understand what went wrong.

2

Manual Transaction Building

Construct raw transactions by encoding parameters for low-level calls.

3

Event Log Inspection

Decode event log data to read emitted parameters from blockchain.

ABI Format

A valid ABI is a JSON array of function objects:

[
  {
    "type": "function",
    "name": "transfer",
    "inputs": [
      { "name": "to", "type": "address" },
      { "name": "amount", "type": "uint256" }
    ]
  }
]

Frequently Asked Questions