Authority
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
Name | Type | Description |
---|---|---|
initialOwner | address | The initial contract owner |
epochLength | uint256 | The 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
Name | Type | Description |
---|---|---|
appContract | address | The application contract address |
lastProcessedBlockNumber | uint256 | The number of the last processed block |
outputsMerkleRoot | bytes32 | The 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);