Contract Call
Call contract on different destination chain
The performCheckout
function enables developers to call a contract on a different destination chain. For example, if a user has funds on arbitrum
and wants to call a contract on polygon
, they can easily do so using the performCheckout
function.
Expected parameters
performCheckout
accepts following parameters
Parameter | Type | Description |
---|---|---|
| ethers.Signer | The signer object from ethers |
| number | Source chain id |
| string | address of initial token on source chain |
| number | Chain id of the destination chain |
| string | Address of the final token on the destination chain. |
| string | Address of source chain from which smart contract is being called |
| string | Amount needs to be send to destination chain for contract call. |
| string | Smart contract address of destination chain. |
| string | Call data of a contract call |
| string | The type of route to be preferred. It can be |
| number | The gas limit on the destination chain. |
| boolean | Default is set to |
Function Call
performCheckout
function will initiate all required transactions on source chain such as getting an approval and sending tokens and calling contract on destination chain.
Last updated