Move assets through intermediate chain before bridging to a final destination.
bridge
action whose callback
contains another bridge action.
Fee Calculation
Parent Bridge Call
3. Cross-Chain Execution
weiroll
script is executed. The “dropped” native tokens are now available to pay the gas fee for the next bridge call in the sequence, ensuring the entire journey completes seamlessly.rUSD
on Berachain and want to stake it to receive srUSD
. The staking protocol (Reservoir) exists on Ethereum. With a single Enso transaction, you can bridge your rUSD
from Berachain to Ethereum, stake it for srUSD
, and bridge the srUSD
back to Berachain.
This bundle performs the following steps:
stargate.bridge
sends 10 rUSD
from Berachain (source) to Ethereum (destination chainId: 1).enso.balance
action checks the amount of rUSD that arrived.reservoir.deposit
stakes the rUSD
received from the bridge and mints srUSD
, using the dynamic amount from the balance check (useOutputOfCallAt: 0
).stargate.bridge
sends the newly acquired srUSD
from Ethereum back to Berachain (destination chainId: 80094).bundle.gas
when sending the transaction from the initial chain. This field contains the simulated value of gas necessary for the entire sequence of transactions:sendEOA
function), you must first execute a separate approval transaction to allow the EnsoRouter contract to spend the token on the origin chain. The approval cannot be included in the recursive bridging bundle and must be performed by the EOA separately before executing the bundle.