Execute your swap or call on Cosmos

Executing a route requires a signer to be set up. How to set up a cosmos signer.

Sending transaction from EVM works by using the same flow described here. Below is a guide for sending transactions from Cosmos chains.

[SDK <=v1.12.0] executeRoute

// package.json cosmjs dependencies required
"@cosmjs/stargate": "^0.31.0"

Type: Types

const tx = await squid.executeRoute({ signer, signerAddress, route });

const cosmosTx = tx as DeliverTxResponse;

const txHash = cosmosTx.transactionHash;

[SDK >=v1.12.1] executeRoute

// package.json cosmjs dependencies required
"@cosmjs/stargate": "^0.31.3",
"@cosmjs/cosmwasm-stargate": "^0.31.3",

Type: Types

signerAddress

Signer Address is a cosmos address of the transaction sender. Example code snippet below shows how to retrieve it.

[SDK <=v1.12.0] Example code snippet

[SDK >=v1.12.1] Example code snippet

Last updated