IBridgeConnector

Git Source

Interface for bridgeable contracts.

Functions

finalize

Finalizes the bridge operation and returns a bytes32 value hash.

function finalize(uint256 epoch) external returns (bytes32 finalizedHash);

Parameters

NameTypeDescription
epochuint256The epoch to be finalized

Returns

NameTypeDescription
finalizedHashbytes32of the finalized state

applyState

Applies the given state to the bridgeable contract.

function applyState(bytes calldata _state) external;

Parameters

NameTypeDescription
_statebytesThe state to apply.

isStateEmpty

Checks if the state is empty.

function isStateEmpty() external view returns (bool);

Returns

NameTypeDescription
<none>booltrue if the state is empty, false otherwise

getFinalizedState

Retrieves the finalized state of the bridgeable contract.

function getFinalizedState() external view returns (bytes memory);

Returns

NameTypeDescription
<none>bytesA bytes serialized finalized state

getSourceContract

Returns the address of the underlying contract in this network

function getSourceContract() external view returns (address);

getDestinationContract

Returns the address of the bridged contract on the other network

function getDestinationContract() external view returns (address);

getStateLength

Returns the length of the state entries

function getStateLength() external view returns (uint256);