Bridge-and-Call
Advanced cross-chain functionality that enables direct contract calls on destination chains with asset transfers
Overview
Bridge-and-Call is an advanced feature of the Unified Bridge that allows developers to initiate cross-chain transactions that both transfer assets and execute smart contract functions on the destination chain in a single operation. This enables more complex cross-chain workflows and reduces the number of transactions required for sophisticated cross-chain applications.
It is different from Bridge Message, where Bridge Message requires the destination address to be a smart contract that implemented the IBridgeMessageReceiver.sol interface. Whereas for Bridge-and-Call, it itself is the contract that has implemented the interface, and it will be able to execute any functions on any smart contract in the destination network.

Figure 1: Complete Bridge-and-Call flow showing asset transfer and contract execution
Key Differences from Bridge Message
| Feature | Bridge Message | Bridge-and-Call |
|---|---|---|
| Destination Contract | Must implement IBridgeMessageReceiver | Can call any contract |
| Execution | Contract handles message reception | JumpPoint contract executes calls |
| Flexibility | Limited to specific interface | Full contract call flexibility |
| Use Case | Simple message passing | Complex cross-chain operations |
Core Components
BridgeExtension.sol
The main contract that handles Bridge-and-Call operations on both source and destination chains.
Key Functions:
bridgeAndCall(): Initiates asset transfer with contract callonMessageReceived(): Handles incoming Bridge-and-Call messages
Deployment: Deployed on both L1 and all connected L2s
JumpPoint.sol
A temporary contract that executes the actual function calls on the destination chain.
Key Features:
- Temporary Contract: Created for each Bridge-and-Call operation
- Asset Handling: Receives and manages transferred assets
- Function Execution: Executes calls on target contracts
- Fallback Handling: Manages failed executions
Bridge-and-Call Function
The bridgeAndCall function initiates both asset transfer and contract execution.
Function Signature
function bridgeAndCall(
address token,
uint256 amount,
uint32 destinationNetwork,
address callAddress,
address fallbackAddress,
bytes calldata callData,
bool forceUpdateGlobalExitRoot
) external payableParameters
token: Token contract address to transfer (0x0 for native gas token)amount: Amount of tokens to transferdestinationNetwork: Network ID of the destination chaincallAddress: Contract address to call on destination chainfallbackAddress: Address to receive assets if execution failscallData: Encoded function call dataforceUpdateGlobalExitRoot: Whether to update GER immediately
Process Steps
- Token Preparation: Handle different token types (native, WETH, ERC20)
- Asset Bridging: Call
bridgeAssetto transfer tokens - Message Bridging: Call
bridgeMessagewith encoded call data - Event Emission: Emit events for both operations
Token Preparation Logic
Native Gas Token
// Gas token already transferred to contract via msg.value
// No additional preparation neededWETH
// Transfer WETH from sender to contract
IWETH(token).transferFrom(msg.sender, address(this), amount);ERC20 Tokens
// Transfer ERC20 tokens from sender to contract
IERC20(token).transferFrom(msg.sender, address(this), amount);Message Reception
The onMessageReceived function handles incoming Bridge-and-Call messages on the destination chain.
Function Signature
function onMessageReceived(
address originAddress,
uint32 originNetwork,
bytes calldata data
) external payableParameters
originAddress: BridgeExtension address on source chainoriginNetwork: Network ID of source chaindata: Encoded call data containing:dependsOnIndex: Index of the asset bridge transactioncallAddress: Contract to call on destinationfallbackAddress: Fallback address for failed executionsassetOriginalNetwork: Original network of the assetassetOriginalAddress: Original address of the assetcallData: Function call data
Process Steps
- Access Control: Verify caller is bridge contract and origin is valid
- Data Decoding: Decode the message data
- Asset Verification: Check if asset bridge transaction is claimed
- JumpPoint Creation: Deploy JumpPoint contract with call parameters
- Asset Transfer: Transfer assets to JumpPoint contract
- Function Execution: Execute the call on target contract
JumpPoint Contract
The JumpPoint contract is a temporary contract that handles the actual execution on the destination chain.
Constructor
constructor(
address bridge,
uint32 assetOriginalNetwork,
address assetOriginalAddress,
address callAddress,
address fallbackAddress,
bytes memory callData
) payableExecution Process
- Asset Detection: Identify the type of transferred asset
- Asset Transfer: Transfer asset to target contract
- Function Call: Execute the specified function call
- Fallback Handling: Handle failed executions by transferring to fallback address
Bridging Flows
L1 to L2 Bridge-and-Call
sequenceDiagram
participant User
participant L1_BridgeExt as L1 BridgeExtension
participant L1_Bridge as L1 Bridge Contract
participant L1_MET as L1 Mainnet Exit Tree
participant GER_Manager as Global Exit Root Manager
participant L2_GER as L2 Global Exit Root
participant L2_BridgeExt as L2 BridgeExtension
participant JumpPoint as JumpPoint Contract
participant Target_Contract as Target Contract
User->>L1_BridgeExt: bridgeAndCall()
L1_BridgeExt->>L1_BridgeExt: Prepare tokens
L1_BridgeExt->>L1_Bridge: bridgeAsset()
L1_BridgeExt->>L1_Bridge: bridgeMessage()
L1_Bridge->>L1_MET: Add transactions to MET
L1_MET->>GER_Manager: Update Global Exit Root
GER_Manager->>L2_GER: Sync latest GER
User->>L2_BridgeExt: first claimAsset() + then claimMessage()
L2_BridgeExt->>JumpPoint: Create JumpPoint contract
JumpPoint->>Target_Contract: Execute call with assetsL2 to L2 Bridge-and-Call
sequenceDiagram
participant User
participant L2A_BridgeExt as L2A BridgeExtension
participant L2A_Bridge as L2A Bridge Contract
participant L2A_LET as L2A Local Exit Tree
participant RollupManager as Rollup Manager (L1)
participant GER_Manager as Global Exit Root Manager
participant L2B_GER as L2B Global Exit Root
participant L2B_BridgeExt as L2B BridgeExtension
participant JumpPoint as JumpPoint Contract
participant Target_Contract as Target Contract
User->>L2A_BridgeExt: bridgeAndCall()
L2A_BridgeExt->>L2A_BridgeExt: Prepare tokens
L2A_BridgeExt->>L2A_Bridge: bridgeAsset()
L2A_BridgeExt->>L2A_Bridge: bridgeMessage()
L2A_Bridge->>L2A_LET: Add transactions to LET
L2A_LET->>RollupManager: Submit LET to L1
RollupManager->>GER_Manager: Update Global Exit Root
GER_Manager->>L2B_GER: Sync latest GER
User->>L2B_BridgeExt: first claimAsset() + then claimMessage()
L2B_BridgeExt->>JumpPoint: Create JumpPoint contract
JumpPoint->>Target_Contract: Execute call with assetsLast updated on