Skip to main content

Since January 2026, we are unfortunately unable to actively maintain or develop ink! further.

We have written down the details in a Polkadot Forum post.

Version: v6

Magnifying Glass Title Picture

Decode Data Payload

You can use a block explorer (or an app like Polkadot.js) to retrieve the data payload of a contract transaction. cargo-contract supports decoding this data.

# From your contract directory
cargo contract decode message -d fe5bd8ea01000000

This command will output the method name and parameters encoded in the data payload:

Decoded data: inc_by { n: 1 }

If the contract was called through a cross-contract interaction, the payload will not be available in the transaction. In such cases, you can use the approach described in the next section to access it.