An interface defining the base operations for a multi-signature contract.
error NotSigner()
error AlreadyVoted()
error InvalidSigners()
error InvalidSignerThreshold()
error DuplicateSigner(address account)
event MultisigVoted(bytes32 topic, uint256 signerEpoch, address voter, uint256 voteCount, uint256 threshold)
event MultisigOperationExecuted(bytes32 topic, uint256 signerEpoch, address voter, uint256 threshold)
event SignersRotated(address[] newAccounts, uint256 newThreshold)
function signerEpoch() external view returns (uint256)
Gets the current epoch.
Name | Type | Description |
---|---|---|
[0] | uint256 | uint The current epoch |
function signerThreshold() external view returns (uint256)
Gets the threshold of current signers.
Name | Type | Description |
---|---|---|
[0] | uint256 | uint The threshold number |
function signerAccounts() external view returns (address[])
Gets the array of current signers.
Name | Type | Description |
---|---|---|
[0] | address[] | array of signer addresses |
function isSigner(address account) external view returns (bool)
Getter to determine if an account is a signer
Name | Type | Description |
---|---|---|
[0] | bool | boolean indicating if the account is a signer |
function hasSignerVoted(address account, bytes32 topic) external view returns (bool)
Getter to determine if an account has voted on a topic
Name | Type | Description |
---|---|---|
[0] | bool | boolean indicating if the account has voted |
function getSignerVotesCount(bytes32 topic) external view returns (uint256)
Get the number of votes for a topic
Name | Type | Description |
---|---|---|
[0] | uint256 | uint256 indicating the number of votes for a topic |
function rotateSigners(address[] newAccounts, uint256 newThreshold) external
Update the signers and threshold for the multisig contract.
Name | Type | Description |
---|---|---|
newAccounts | address[] | The array of new signers |
newThreshold | uint256 | The new threshold of signers required |