Tool · runs in your browser

Decode transaction input data: function, arguments and risky approvals

Paste the input data of a transaction, or the data a wallet asks you to sign. The decoder reads the 4-byte selector, finds the function in your ABI or among the token functions and contract methods we know, and decodes every argument. Approvals that hand over a whole balance, or every NFT in a collection, are flagged.

Transaction input data
The calldata of a transaction, or the data field a wallet asks you to sign.

Without one, the decoder tries the token functions and contract methods we know.

How to use it

How to use it

  1. 1Copy the input data: on a block explorer it's the transaction's "Input Data", in a wallet the data field of the request.
  2. 2Paste it. Add the contract's ABI if the function isn't recognised.
  3. 3Read the function, its arguments and any warning. Set an alert on your wallet to hear about the next approval the moment it lands.
Explained

What is calldata?

Calldata is the input of a transaction to a contract. Its first four bytes are the function selector, the first four bytes of the keccak-256 hash of the function's signature. The rest are the arguments, ABI-encoded: each static value takes a 32-byte word, and dynamic values (strings, bytes, arrays) are stored after an offset.

To decode it you need the function's signature: from the contract's ABI, or from a list of known functions. The selector alone only says which function was probably called, since different signatures can share four bytes.

Explained

Spotting a risky approval

approve(spender, amount) lets the spender move up to that amount of the token from your wallet; an amount of 2^256 − 1 is unlimited and never runs out. setApprovalForAll(operator, true) lets the operator move every NFT you hold in the collection. Drainers ask for exactly these, so decode before you sign.

  • approve or increaseAllowance with the maximum value: unlimited allowance.
  • permit signatures grant the same allowance without a transaction of your own.
  • setApprovalForAll with true: access to the whole collection.
FAQ

Frequently asked questions

Do I need the ABI to decode input data?

Not for common functions: the decoder knows the ERC-20, ERC-721 and ERC-1155 transfer and approval functions and the methods of the contracts we list. For anything else, paste the ABI or just the function signature.

What does 0x095ea7b3 mean?

It's the selector of approve(address,uint256), the ERC-20 approval. The two arguments after it are the spender and the amount.

How do I know if an approval is unlimited?

Its amount is 2^256 − 1 (all f's in hex). The decoder flags it, along with setApprovalForAll(operator, true).

Is what I paste sent anywhere?

No. The tool runs entirely in your browser: what you paste is never sent to a server and there is no sign-up.

Can I get an alert when my wallet approves a spender?

Yes. Watch your wallet with the ready-made rule and every transaction it sends, approvals included, reaches you within seconds of confirmation.

Keep exploring

More tools and alerts

Know the moment it happens on chain

Turn any event into an alert. The Beta plan is free: one wallet and one contract, no credit card.