How it works
When building a Bungee request, you can provide calldata that will be executed on the destination chain. It works for both same chain swaps as well as cross chain swaps. If the below parameters are provided, Bungee will deliver assets on destination and then invoke the receiver contract with yourdestinationPayload under the specified gas limit.
destinationPayload: ABI-encoded calldata for the target contract on the destination chainreceiverAddress: The execution target that will receive the calldata and perform the calldestinationGasLimit: Gas budget on destination to execute the payload
Implementation example
Important Notes
- The
destinationPayloadis thecallDataparameter that will be passed to theexecuteDatafunction - Execution may fail due to invalid encoding: re-check
encodeAbiParameterstypes match the receiver decode - The
receiverAddressneeds to be a contract that implementsIBungeeExecutorcontract’s interface for theexecuteDatafunction - Ensure the receiver contract trusts/can handle calls from the Bungee executor
- Complex receivers or multi-token logic require higher gas limits
- Execution may fail due to out of gas on destination: increase
destinationGasLimit