IQuorumFactory
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
Name | Type | Description |
---|---|---|
validators | address[] | the list of validators |
epochLength | uint256 | The epoch length |
Returns
Name | Type | Description |
---|---|---|
<none> | IQuorum | The 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
Name | Type | Description |
---|---|---|
validators | address[] | the list of validators |
epochLength | uint256 | The epoch length |
salt | bytes32 | The salt used to deterministically generate the quorum address |
Returns
Name | Type | Description |
---|---|---|
<none> | IQuorum | The 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
Name | Type | Description |
---|---|---|
validators | address[] | the list of validators |
epochLength | uint256 | The epoch length |
salt | bytes32 | The salt used to deterministically generate the quorum address |
Returns
Name | Type | Description |
---|---|---|
<none> | address | The deterministic quorum address |
Events
QuorumCreated
A new quorum was deployed.
MUST be triggered on a successful call to newQuorum
.
event QuorumCreated(IQuorum quorum);
Parameters
Name | Type | Description |
---|---|---|
quorum | IQuorum | The quorum |