IQuorumFactory

Git Source

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)
    external
    returns (IQuorum);

Parameters

NameTypeDescription
validatorsaddress[]the list of validators
epochLengthuint256The epoch length

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, bytes32 salt)
    external
    returns (IQuorum);

Parameters

NameTypeDescription
validatorsaddress[]the list of validators
epochLengthuint256The epoch length
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,
    bytes32 salt
) external view returns (address);

Parameters

NameTypeDescription
validatorsaddress[]the list of validators
epochLengthuint256The epoch length
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