After the previous step, both light clients exist and their counterparties are registered. This step wires the IFT application layer: it tells each chain’s IFT module and contract which addresses and denoms correspond across chains, and what to mint or burn when a packet arrives. RunDocumentation Index
Fetch the complete documentation index at: https://docs.cosmos.network/llms.txt
Use this file to discover all available pages before exploring further.
setup.sh:
What the script does
1. Register the IFT bridge (Cosmos side)
The following transactions are submitted on the Cosmos chain. First, if the tokenfactory denom does not yet exist, it is created:factory/{creator_addr}/{subdenom}.
Then the IFT bridge is registered:
COSMOS_CLIENT_ID (the attestation light client on Cosmos) that originate from $IFT_CONTRACT_ADDR_CHECKSUM should mint $COSMOS_IFT_DENOM. When tokens are sent in the other direction, the module burns them and sends a packet to that contract.
Output: COSMOS_IFT_DENOM in the format factory/{creator_addr}/{subdenom}.
2. Register the IFT bridge (EVM side)
The EVM side requires a constructor contract and a bridge registration on the IFT contract.- Compute the ICA address
MsgIFTMint when a packet arrives from the EVM:
CosmosIFTSendCallConstructor at deploy time. The sender address must be EIP-55 checksummed. Querying with a lowercase address produces a different ICA.
- Query the Cosmos IFT module account
counterpartyIFTAddress registered on the EVM side must be the Cosmos IFT module account — the sender address that appears in GMP packets originating from Cosmos. This is distinct from the ICA above:
- Deploy
CosmosIFTSendCallConstructor
MsgIFTMint message for EVM-to-Cosmos transfers. It is initialized with:
bridgeReceiveTypeUrl:/ibc.applications.prototypes.ift.v1.MsgIFTMintdenom:COSMOS_IFT_DENOMicaAddress: the ICA address computed in step 1
- Register the bridge on the IFT contract
Applying to your own setup
GMP account address
The GMP account address is deterministically derived from(client_id, contract_addr, salt). If the client ID or IFT contract address changes, the GMP account address changes and CosmosIFTSendCallConstructor must be redeployed and re-registered.