Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IQuorumFactory

Git Source

Inherits: IVersionGetter, IConsensusFactoryErrors, IQuorumFactoryErrors

Title: Quorum Factory interface

Functions

newQuorum

Deploy a new quorum.

On success, MUST emit a QuorumCreated event.

Duplicates in the validators array are ignored.

Reverts if the epoch length is zero.

function newQuorum(
    address[] calldata validators,
    uint256 epochLength,
    uint256 claimStagingPeriod
) external returns (IQuorum);

Parameters

NameTypeDescription
validatorsaddress[]the list of validators
epochLengthuint256The epoch length
claimStagingPerioduint256The claim staging period

Returns

NameTypeDescription
<none>IQuorumThe quorum

newQuorum

Deploy a new quorum deterministically.

On success, MUST emit a QuorumCreated event.

Duplicates in the validators array are ignored.

Reverts if the epoch length is zero.

function newQuorum(
    address[] calldata validators,
    uint256 epochLength,
    uint256 claimStagingPeriod,
    bytes32 salt
) external returns (IQuorum);

Parameters

NameTypeDescription
validatorsaddress[]the list of validators
epochLengthuint256The epoch length
claimStagingPerioduint256The claim staging period
saltbytes32The salt used to deterministically generate the quorum address

Returns

NameTypeDescription
<none>IQuorumThe quorum

calculateQuorumAddress

Calculate the address of a quorum to be deployed deterministically.

Beware that only the newQuorum function with the salt parameter is able to deterministically deploy a quorum.

function calculateQuorumAddress(
    address[] calldata validators,
    uint256 epochLength,
    uint256 claimStagingPeriod,
    bytes32 salt
) external view returns (address);

Parameters

NameTypeDescription
validatorsaddress[]the list of validators
epochLengthuint256The epoch length
claimStagingPerioduint256The claim staging period
saltbytes32The salt used to deterministically generate the quorum address

Returns

NameTypeDescription
<none>addressThe deterministic quorum address

Events

QuorumCreated

A new quorum was deployed.

MUST be triggered on a successful call to newQuorum.

event QuorumCreated(IQuorum quorum);

Parameters

NameTypeDescription
quorumIQuorumThe quorum