Ethereum ABI Encoder

Encode Ethereum function calls from ABI definitions

About

This tool is used to encode function calls for ethereum. This allows you to independently verify your transactions before signing your smart contract calls.


How it works

To encode a function call, you need to paste the "json abi" for the contract. This is how a contract specifies what functions can be called, and what inputs they need to work. An example is this ABI for ERC20, which is a common interface used for most contracts that resemble a token (like weth / dai etc).

ERC20 JSON ABI

Of course, you need to find the ABI for the contract you want to use.

Then, you can fill in the remaining fields based on what you wish to accomplish. When you're all done, it will let you compute the data bytes for your given function call. This should match the data you see in your wallet before signing the transaction. A mismatch means either some fields were filled in here, or perhaps your wallet is under attack and you are being tricked into signing the wrong transaction.


Comparing and Diffing

Since these data strings are long lists of numbers and letters, it can be hard to compare by hand. We allow you to paste in the data string from your wallet, and the tool will let you know if the wallet version matches the one we calculated.