In AggLayer, cross-chain interoperability is the functionality for the direct exchange of tokens and data between different blockchain networks, even those with different underlying execution logic.
The unified bridge is one of the key components of the AggLayer, it provides two key mechanisms for cross chain transactions
- Token Bridging: Transfers assets, such as native tokens, ERC20 tokens, or wrapped tokens from one blockchain to another
- Message Bridging: Enables the transmission of data and execution of messages between chains supporting interactions like contract-to-contract communication.
Bridge-and-Call:
For developers, Bridge-and-Call extends cross-chain interoperability by enabling direct contract execution on destination chains from a source chain. These components empower the creation of decentralized applications that operate seamlessly across multiple chains while ensuring data consistency and transaction integrity.
Key Components of Bridge-andCall
- BridgeExtension.sol - Manages bridge interactions.
- JumpPoint.sol - Handles asset transfers and contract call on the destination chain
Types of Bridging in Unified Bridge Interface of teh AggLayer
- Token: bridgeAsset & claimAsset are used for bridging tokens from one chain to another
- Message: bridgeMessage & claimMessage are used for bridging messges from chain to another
Steps to Complete Token Bridging Process
Verify the Destination Network
Ensure that the destinationNetwork is different from the source network’s ID.Prepare Tokens for Bridging (Varies by Token Type):
Native Gas Token (e.g., ETH, Custom Gas Token) – Tokens are held in the bridge contract.
WETH – WETH tokens are burned from the user’s address.
Foreign ERC-20 Token – Burn the token if it did not originate from the source network.
Native ERC-20 Token – If permitData is provided, execute it before transferring tokens to the bridge contract.
Note: For ETH as the native token, the PolygonZkEVMBridgeV2.WETHToken address is set to 0x0.
Emit the BridgeEvent.
Add the bridgeAsset Data to the Local Exit Tree as a leaf node.
Steps to Complete Message Bridging Process
Validate the value conditions based on the type of bridging method
Confirm that the destinationNetwork differs from the source network’s ID
Emit the BridgeEvent
Add bridgeMessage or bridgeMessageWETh data to the Local Exit Tree as a leaf node
Note: The claiming process for messages is similar to the token claiming process, with additional steps to execute the message if the destination address is a smart contract
Important Links
ClaimMessage Repo
ClaimAsset Repo
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article