Note: Real Solidity uses Keccak-256 for the selector. This tool uses SHA-256.
Parameters
Solidity ABI Encoding
ABI (Application Binary Interface) encoding converts function calls into the byte format the EVM expects. The first 4 bytes are the function selector — the first 4 bytes of Keccak-256(functionSignature). Parameters are then ABI-encoded: each static type padded to 32 bytes, dynamic types (string, bytes) using offset/length/data.
This tool encodes function selectors and basic types. It uses SHA-256 for the selector as an approximation; production code should use ethers.js or web3.js for correct Keccak-256 and full ABI support.
Function Signature Format
The function signature is the function name and parameter types, e.g., transfer(address,uint256) or balanceOf(address). No spaces, no parameter names. The selector is derived from this string. Enter the exact signature — transfer(address,uint256) not transfer(address, uint256) — to match Solidity's encoding.
Supported Types
address: 40 hex chars, with or without 0x. uint256: decimal integer. bool: true or false. string: UTF-8 text. bytes32: up to 64 hex chars. For arrays and structs, use a full ABI library. This tool covers the most common types for simple contract interactions.
Frequently Asked Questions
Related Tools
Explore More Tools
Find this tool useful? Buy us a coffee to keep DuskTools free and ad-light.