ERC-7683 in Production
Explore crosschain intents in production. Walk through a brief example of the intent execution flow and related smart contracts.
Last updated
Explore crosschain intents in production. Walk through a brief example of the intent execution flow and related smart contracts.
Last updated
To learn how crosschain intents work in production, lets start by forming a mental model on how users need to input their intents. All the complexities of blockchains, solver networks and any trust assumptions are abstracted away making the UX extremely fast and streamlined.
Think of it as an order ticket with the following fields:
originChain: Chain where you currently hold tokens.
originToken: Token which you currently hold and want to bridge over to the destination chain.
originAmount: Amount of the token that you want to bridge over to the destination chain.
destinationChain: Chain on which you want to finally bridge over the tokens.
destinationToken: Token which you want to exchange your current token for on the destination chain.
minReceived: Minimum amount of the destination token that you want to receive after gas deductions and any other costs.
fillInstructions: Any additional messages you want to send along with the transfer.
There are a few more details here, but let's focus on just these to keep things simple and understand the power and impact of crosschain intents.
Currently, AcrossOriginSettler contract is deployed on the following chains:
Base
Arbitrum
Now, let's walk through crosschain intent execution and learn how using the AcrossOriginSettler contract, we can bridge 10 USDC from Base to Arbitrum.
A wallet with 10 USDC on Base.
An IDE.
To do that, please use the following shell script:
Now, run the shell script by executing the following command on your terminal:
Here is what the output should look like:
Great! Now our intent is ready. In the next step, we will discuss how to use the AcrossOriginSettler contract and execute our crosschain intent.
Start by going to the contract on Basescan and heading to the Contract and then Write Contract section and click on Connect to Web3 to connect your wallet:
After connecting your wallet, expand the open function and input the details we had obtained from our script in the previous section:
Congratulations! You are now an adopter of ERC-7683 and we thank you for your support.
AcrossOriginSettler contract processes an external order type and translates it into an AcrossV3Deposit that it sends to the SpokePool Contract. This allows crosschain intents to work seamlessly throughout multiple chains. You can learn more about the Across protocol .
As you may have read in the , it is important that we perform the ABI encoding of our request and ensure that all information is correctly passed on to AcrossOriginSettler contract.
: You can open this in an IDE of choice and ensure that you input your public key as the depositor. You can name the file whatever you want, for this demo we will call it "demo.sh".
With the fillDeadline
, orderDataType
and orderData
ready, it's now time that we head over to and execute the crosschain intent where we bridge 10 USDC from Base to Arbitrum:
Now, simply click on Write and sign the transaction on your wallet. Finally check . You will notice 10 USDC in your wallet on Arbitrum. This ensures that your crosschain intent was executed successfully.
Incase you need any help, please feel free to reach out to contact us .