Skip to main content

AcrossV3BridgeAdapter

Git Source

Inherits: BridgeAdapter, IAcrossV3MessageHandler

State Variables

ACROSS_V3_BRIDGE_ID

uint16 private constant ACROSS_V3_BRIDGE_ID = 1;

Functions

constructor

constructor(address _acrossV3SpokePool) BridgeAdapter(_acrossV3SpokePool, _acrossV3SpokePool, _acrossV3SpokePool);

initialize

Initializer of the contract.

function initialize(address _controller, bytes calldata) external override initializer;

Parameters

NameTypeDescription
_controlleraddress
<none>bytes

sendOutBridgeTransfer

Executes a scheduled outgoing bridge transfer.

function sendOutBridgeTransfer(uint256 transferId, bytes calldata data) external override nonReentrant onlyController;

Parameters

NameTypeDescription
transferIduint256The ID of the transfer to execute.
databytesThe optional data needed to execute the transfer.

cancelOutBridgeTransfer

Cancels an outgoing bridge transfer.

function cancelOutBridgeTransfer(uint256 transferId) external override nonReentrant onlyController;

Parameters

NameTypeDescription
transferIduint256The ID of the transfer to cancel.

outBridgeTransferCancelDefault

Returns the default amount that must be transferred to the adapter to cancel an outgoing bridge transfer.

If the transfer has not yet been sent, or if the full amount was refunded to this contract by the external bridge, returns 0.

function outBridgeTransferCancelDefault(uint256 transferId) public view returns (uint256);

Parameters

NameTypeDescription
transferIduint256The ID of the transfer to check.

Returns

NameTypeDescription
<none>uint256The amount required to cancel the transfer.

handleV3AcrossMessage

function handleV3AcrossMessage(address tokenSent, uint256 amount, address, bytes memory encodedMessage)
external
override;