Skip to main content

AbstractConsensus

The AbstractConsensus contract provides an abstract implementation of IConsensus with common consensus functionality.

Functions

isOutputsMerkleRootValid()

function isOutputsMerkleRootValid(address appContract, bytes32 outputsMerkleRoot) public view override returns (bool)

Check whether an outputs Merkle root is valid.

Parameters

NameTypeDescription
appContractaddressThe application contract address
outputsMerkleRootbytes32The outputs Merkle root

Return Values

NameTypeDescription
[0]boolTrue if the outputs Merkle root is valid

getEpochLength()

function getEpochLength() public view override returns (uint256)

Get the epoch length.

Return Values

NameTypeDescription
[0]uint256The epoch length

supportsInterface()

function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool)

Check if the contract supports a specific interface.

Parameters

NameTypeDescription
interfaceIdbytes4The interface identifier

Return Values

NameTypeDescription
[0]boolTrue if the interface is supported

On this page

Useful resources to learn more

We use cookies to ensure that we give you the best experience on our website. By using the website, you agree to the use of cookies.