Authority

Git Source

Inherits: IAuthority, AbstractConsensus, Ownable

A consensus contract controlled by a single address, the owner.

This contract inherits from OpenZeppelin's Ownable contract. For more information on Ownable, please consult OpenZeppelin's official documentation.

Functions

constructor

Reverts if the epoch length is zero.

constructor(address initialOwner, uint256 epochLength)
    AbstractConsensus(epochLength)
    Ownable(initialOwner);

Parameters

NameTypeDescription
initialOwneraddressThe initial contract owner
epochLengthuint256The epoch length

submitClaim

Submit a claim to the consensus.

MUST fire a ClaimSubmitted event.

function submitClaim(
    address appContract,
    uint256 lastProcessedBlockNumber,
    bytes32 outputsMerkleRoot
) external override onlyOwner;

Parameters

NameTypeDescription
appContractaddressThe application contract address
lastProcessedBlockNumberuint256The number of the last processed block
outputsMerkleRootbytes32The outputs Merkle root

owner

function owner() public view override(IOwnable, Ownable) returns (address);

renounceOwnership

function renounceOwnership() public override(IOwnable, Ownable);

transferOwnership

function transferOwnership(address newOwner) public override(IOwnable, Ownable);

supportsInterface

function supportsInterface(bytes4 interfaceId)
    public
    view
    override(IERC165, AbstractConsensus)
    returns (bool);