IBridgeConnector
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
Name | Type | Description |
---|---|---|
epoch | uint256 | The epoch to be finalized |
Returns
Name | Type | Description |
---|---|---|
finalizedHash | bytes32 | of the finalized state |
applyState
Applies the given state to the bridgeable contract.
function applyState(bytes calldata _state) external;
Parameters
Name | Type | Description |
---|---|---|
_state | bytes | The state to apply. |
isStateEmpty
Checks if the state is empty.
function isStateEmpty() external view returns (bool);
Returns
Name | Type | Description |
---|---|---|
<none> | bool | true if the state is empty, false otherwise |
getFinalizedState
Retrieves the finalized state of the bridgeable contract.
function getFinalizedState() external view returns (bytes memory);
Returns
Name | Type | Description |
---|---|---|
<none> | bytes | A 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);