Example
We will make a cross-chain token transfer using multi-chain intents.- Get a quote from the Rhinestone backend
- Sign the intent using the account owner(s)
- Submit the intent
- Execute the claim transaction on Arbitrum
- Execute the fill transaction on Base
Token Requests
tokenRequests is a list of token assets and their amounts that are required on the target chain to make the transaction. It tells the solvers to ensure those assets are present before executing the transaction calls. If you don’t need any assets on the target chain, you can omit this.
Solvers will supply all assets specified in the
tokenRequests. If the user already has the required assets, don’t add them into tokenRequests.Source Chain
Providing the source chain deploys the account on that chain, as well as uses the funds on that chain to fulfill the intent. If you already have an account deployed on one or more source chains, you can omit thesourceChain. In that case, the orchestrator will use the best chain(s) to source funds.
Token Requests
tokenRequests is a list of token assets and their amounts that are required on the target chain to make the transaction. It tells the solvers to ensure those assets are present before executing the transaction calls. If you don’t need any assets on the target chain, you can omit this.
Solvers will supply all assets specified in the
tokenRequests. If the user already has the required assets, don’t add them into tokenRequests.Gas Limit
You can override the default gas limit for the target chain execution withgasLimit. Doing this will make the intent better priced, because we can more accurately calculate the fee that a solver needs to be reimbursed with for paying the gas. If this is not provided, we calculate using a gas limit of 1_000_000.
Source Assets
You can specify what token (or tokens) to use as an input asset:Chain-specific
sourceAssets take precendence over sourceChain parameter.Fee Asset
You can choose what asset to use as a fee token (i.e., to cover gas and bridging fees):Wait for Execution
sendTransaction returns a pending intent. To wait until it gets executed, use waitForExecution: