Skip to content

BaseBridgeCron

senamakel edited this page Dec 3, 2024 · 1 revision

Solidity API

BaseBridgeCron

EXECUTOR_ROLE

bytes32 EXECUTOR_ROLE

OFT_ADAPTER

contract IOFT OFT_ADAPTER

ZAI

contract IERC20 ZAI

remoteDestination

address remoteDestination

remoteEID

uint32 remoteEID

constructor

constructor(address _ZAI, address _adapter) public

execute

function execute() public payable

setDestinationAddresses

function setDestinationAddresses(address _remoteAddr, uint32 _dstEID) external

Sets the destination addresses for cross-chain transfers.

refund

function refund(contract IERC20 token) external

Refunds the specified token balance held by the contract to the caller.

Only callable by owner of the contract

Parameters

Name Type Description
token contract IERC20 The ERC20 token to be refunded.

_bridgeToBase

function _bridgeToBase(uint256 _amount) internal

Bridges the specified amount of ZAI to the remote chain.

Parameters

Name Type Description
_amount uint256 The amount of ZAI to be bridged.

_addressToBytes32

function _addressToBytes32(address _addr) internal pure returns (bytes32)

Converts an address to a bytes32 format.

This is necessary for cross-chain transfers where addresses need to be converted to bytes32.

Parameters

Name Type Description
_addr address The address to convert.

Return Values

Name Type Description
[0] bytes32 The converted bytes32 representation of the address.

Clone this wiki locally