Interface for the RelayBridge contract
Defines the bridge function for cross-chain asset transfers
Bridges an asset (ERC20 token or native currency) from the origin chain to a pool chain
Name | Type | Description |
---|---|---|
amount | uint256 | Amount of asset units to bridge (ERC20 tokens or native currency) |
recipient | address | Address on the pool chain to receive the bridged asset |
poolAsset | address | Address of the asset on the pool chain to bridge to |
poolGas | uint256 | Gas limit for the pool chain transaction |
extraData | bytes | Extra data passed to the bridge proxy |
Name | Type | Description |
---|---|---|
nonce | uint256 | Unique identifier for this bridge transaction |
RelayBridge contract enabling cross-chain bridging via Hyperlane
Bridges assets from an origin chain to a configured pool chain
Internal struct capturing parameters for a bridge transaction
Error for failed bridging operations
Name | Type | Description |
---|---|---|
nonce | uint256 | The nonce of the failed transaction |
Error for insufficient native value sent to cover fees or asset
Name | Type | Description |
---|---|---|
received | uint256 | The amount of native currency received |
expected | uint256 | The amount of native currency expected |
Error when refunding leftover native value fails
Name | Type | Description |
---|---|---|
value | uint256 | The amount of native currency that failed to refund |
Counter for assigning unique nonces to bridge transactions
Incremented with each bridge transaction to ensure uniqueness
Asset address on the origin chain being bridged (address(0) for native currency)
Immutable to ensure the bridge always handles the same asset
BridgeProxy contract handling origin-chain transfer logic
Uses delegatecall to execute custom bridge logic
Hyperlane Mailbox contract for cross-chain messaging
Used to dispatch messages to the pool chain
Emitted when a bridge transaction is initiated on the origin chain
Name | Type | Description |
---|---|---|
nonce | uint256 | Nonce of the transaction |
sender | address | Address on the origin chain that initiated the bridge |
recipient | address | Address on the pool chain to receive assets |
ASSET | address | Asset address on the origin chain (address(0) for native currency) |
poolAsset | address | Asset address on the pool chain (address(0) for native currency) |
amount | uint256 | Amount of asset units bridged |
BRIDGE_PROXY | contract BridgeProxy | BridgeProxy used |
Emitted after a bridge transaction is executed on the pool chain
This event would be emitted by the pool chain contract
Name | Type | Description |
---|---|---|
nonce | uint256 | Nonce of the executed transaction |
Emitted if a bridge transaction is cancelled prior to execution
This event would be emitted if a bridge is cancelled
Name | Type | Description |
---|---|---|
nonce | uint256 | Nonce of the cancelled transaction |
Initializes the RelayBridge with asset and infrastructure contracts
All parameters are immutable after deployment
Name | Type | Description |
---|---|---|
asset | address | Asset address on the origin chain to bridge (0 for native currency) |
bridgeProxy | contract BridgeProxy | BridgeProxy contract for origin-chain transfers |
hyperlaneMailbox | address | Hyperlane Mailbox address for messaging |
Calculates the fee required in native currency to dispatch a cross-chain message
Uses Hyperlane’s quoteDispatch to estimate the cross-chain messaging fee
Name | Type | Description |
---|---|---|
amount | uint256 | Amount of asset units to bridge |
recipient | address | Address on the pool chain that will receive the bridged asset |
poolGas | uint256 | Gas limit for the pool chain transaction |
Name | Type | Description |
---|---|---|
fee | uint256 | Required fee in native currency for dispatch |
Bridges an asset (ERC20 token or native currency) from the origin chain to a pool chain
_Executes a cross-chain bridge transaction with the following steps:
Name | Type | Description |
---|---|---|
amount | uint256 | Amount of asset units to bridge (ERC20 tokens or native currency) |
recipient | address | Address on the pool chain to receive the bridged asset |
poolAsset | address | Address of the asset on the pool chain to bridge to |
poolGas | uint256 | Gas limit for the pool chain transaction |
extraData | bytes | Extra data passed to the bridge proxy |
Name | Type | Description |
---|---|---|
nonce | uint256 | Unique identifier for this bridge transaction |
Interface for the RelayBridge contract
Defines the bridge function for cross-chain asset transfers
Bridges an asset (ERC20 token or native currency) from the origin chain to a pool chain
Name | Type | Description |
---|---|---|
amount | uint256 | Amount of asset units to bridge (ERC20 tokens or native currency) |
recipient | address | Address on the pool chain to receive the bridged asset |
poolAsset | address | Address of the asset on the pool chain to bridge to |
poolGas | uint256 | Gas limit for the pool chain transaction |
extraData | bytes | Extra data passed to the bridge proxy |
Name | Type | Description |
---|---|---|
nonce | uint256 | Unique identifier for this bridge transaction |
RelayBridge contract enabling cross-chain bridging via Hyperlane
Bridges assets from an origin chain to a configured pool chain
Internal struct capturing parameters for a bridge transaction
Error for failed bridging operations
Name | Type | Description |
---|---|---|
nonce | uint256 | The nonce of the failed transaction |
Error for insufficient native value sent to cover fees or asset
Name | Type | Description |
---|---|---|
received | uint256 | The amount of native currency received |
expected | uint256 | The amount of native currency expected |
Error when refunding leftover native value fails
Name | Type | Description |
---|---|---|
value | uint256 | The amount of native currency that failed to refund |
Counter for assigning unique nonces to bridge transactions
Incremented with each bridge transaction to ensure uniqueness
Asset address on the origin chain being bridged (address(0) for native currency)
Immutable to ensure the bridge always handles the same asset
BridgeProxy contract handling origin-chain transfer logic
Uses delegatecall to execute custom bridge logic
Hyperlane Mailbox contract for cross-chain messaging
Used to dispatch messages to the pool chain
Emitted when a bridge transaction is initiated on the origin chain
Name | Type | Description |
---|---|---|
nonce | uint256 | Nonce of the transaction |
sender | address | Address on the origin chain that initiated the bridge |
recipient | address | Address on the pool chain to receive assets |
ASSET | address | Asset address on the origin chain (address(0) for native currency) |
poolAsset | address | Asset address on the pool chain (address(0) for native currency) |
amount | uint256 | Amount of asset units bridged |
BRIDGE_PROXY | contract BridgeProxy | BridgeProxy used |
Emitted after a bridge transaction is executed on the pool chain
This event would be emitted by the pool chain contract
Name | Type | Description |
---|---|---|
nonce | uint256 | Nonce of the executed transaction |
Emitted if a bridge transaction is cancelled prior to execution
This event would be emitted if a bridge is cancelled
Name | Type | Description |
---|---|---|
nonce | uint256 | Nonce of the cancelled transaction |
Initializes the RelayBridge with asset and infrastructure contracts
All parameters are immutable after deployment
Name | Type | Description |
---|---|---|
asset | address | Asset address on the origin chain to bridge (0 for native currency) |
bridgeProxy | contract BridgeProxy | BridgeProxy contract for origin-chain transfers |
hyperlaneMailbox | address | Hyperlane Mailbox address for messaging |
Calculates the fee required in native currency to dispatch a cross-chain message
Uses Hyperlane’s quoteDispatch to estimate the cross-chain messaging fee
Name | Type | Description |
---|---|---|
amount | uint256 | Amount of asset units to bridge |
recipient | address | Address on the pool chain that will receive the bridged asset |
poolGas | uint256 | Gas limit for the pool chain transaction |
Name | Type | Description |
---|---|---|
fee | uint256 | Required fee in native currency for dispatch |
Bridges an asset (ERC20 token or native currency) from the origin chain to a pool chain
_Executes a cross-chain bridge transaction with the following steps:
Name | Type | Description |
---|---|---|
amount | uint256 | Amount of asset units to bridge (ERC20 tokens or native currency) |
recipient | address | Address on the pool chain to receive the bridged asset |
poolAsset | address | Address of the asset on the pool chain to bridge to |
poolGas | uint256 | Gas limit for the pool chain transaction |
extraData | bytes | Extra data passed to the bridge proxy |
Name | Type | Description |
---|---|---|
nonce | uint256 | Unique identifier for this bridge transaction |