AcrossV4BridgeEncoder
Inherits: AccessManagedUpgradeable, IAcrossV4BridgeEncoder
Constants
acrossV4SpokePool
Address of the Across SpokePool.
address public immutable acrossV4SpokePool;Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
State Variables
_foreignTokens
mapping(address localToken => mapping(uint256 chainId => EnumerableSet.AddressSet foreignTokens)) private
_foreignTokens;Functions
constructor
constructor(address _acrossV4SpokePool);Parameters
| Name | Type | Description |
|---|---|---|
| _acrossV4SpokePool | address |
initialize
function initialize(address initialAuthority) external initializer;Parameters
| Name | Type | Description |
|---|---|---|
| initialAuthority | address |
isRouteRegistered
Returns whether a bridge transfer route is registered.
function isRouteRegistered(address inputToken, uint256 foreignChainId, address outputToken)
public
view
override
returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| inputToken | address | The token to be sent from the source chain. |
| foreignChainId | uint256 | The destination chain ID. |
| outputToken | address | The token to be received on the destination chain. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool | True if the route is registered, false otherwise. |
getBridgeTransferData
Returns targets, value, and calldata to execute a bridge transfer.
Intended to be called only by a MakinaXModule instance, from which implementations may read caller state via msg.sender.
function getBridgeTransferData(IBridgeComponent.BridgeOrder calldata order)
external
view
override
returns (address, address, uint256, bytes memory);Parameters
| Name | Type | Description |
|---|---|---|
| order | IBridgeComponent.BridgeOrder | The bridge transfer params. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address | The address of the approval target. |
| <none> | address | The address of the execution target. |
| <none> | uint256 | The value to pass along with the calldata. |
| <none> | bytes | The calldata to execute. |
addRoute
Registers a transfer route.
function addRoute(address inputToken, uint256 foreignChainId, address outputToken) external override restricted;Parameters
| Name | Type | Description |
|---|---|---|
| inputToken | address | The token to be sent from the source chain. |
| foreignChainId | uint256 | The destination chain ID. |
| outputToken | address | The token to be received on the destination chain. |
removeRoute
Unregisters a transfer route.
function removeRoute(address inputToken, uint256 foreignChainId, address outputToken) external override restricted;Parameters
| Name | Type | Description |
|---|---|---|
| inputToken | address | The token to be sent from the source chain. |
| foreignChainId | uint256 | The destination chain ID. |
| outputToken | address | The token to be received on the destination chain. |