AbstractConsensus
Inherits: IConsensus
Stores accepted claims for several applications.
This contract was designed to be inherited by implementations of the IConsensus
interface
that only need a simple mechanism of storage and retrieval of accepted claims.
State Variables
_acceptedClaims
Indexes accepted claims by application contract address.
mapping(address => mapping(bytes32 => bool)) private _acceptedClaims;
Functions
wasClaimAccepted
Check if an output Merkle root hash was ever accepted by the consensus for a particular application.
function wasClaimAccepted(address appContract, bytes32 claim) public view override returns (bool);
Parameters
Name | Type | Description |
---|---|---|
appContract | address | The application contract address |
claim | bytes32 | The output Merkle root hash |
_acceptClaim
Accept a claim.
Emits a ClaimAcceptance
event.
function _acceptClaim(address appContract, bytes32 claim) internal;
Parameters
Name | Type | Description |
---|---|---|
appContract | address | The application contract address |
claim | bytes32 | The output Merkle root hash |