How to Generate Calldata for NFT Checkout
What is calldata?
Calldata is the encoded hex data for the smart contract function that Transak will execute during NFT Checkout.
It tells the contract:
- which function to call
- which arguments to pass
- the exact order and format of those arguments
For NFT Checkout, you generate this calldata from your contract ABI and function inputs, then pass it to Transak as the calldata parameter.
Prerequisite: Partner setup before you start
Before you generate calldata, make sure you already have:
- The ABI for the contract function that should be executed
- The exact
function name - The exact
arguments in the correct order - The Transak NFT Checkout smart contract address for the target chain if your function accepts a recipient wallet address such as
to,recipient, orbuyer
If you use a proxy contract, encode the calldata with the ABI of the implementation contract, not the proxy.
If your function accepts a wallet parameter such as to, recipient, or buyer, pass Transak’s NFT Checkout smart contract address for that chain instead of the end user’s wallet address.
Use NFT Checkout smart contract addresses to get the correct chain-specific address.
How to generate calldata
Pass the calldata to Transak
If you are passing calldata through a widget URL or through createWidgetUrl, pass the raw hex string directly as the calldata value.
If you use the SDK, pass the raw calldata directly in the SDK configuration.