Skip to main content
Version: release (v0.77)

MultisigControl Interface (IMultisigControl.sol)

View Source: contracts/IMultisigControl.sol

↘ Derived Contracts: MultisigControl

IMultisigControl

Implementations of this interface are used to control smart contracts without the need for the network to have any Ethereum of its own.

SignerAdded

Parameters

NameTypeDescription
new_signeraddress
nonceuint256

SignerRemoved

Parameters

NameTypeDescription
old_signeraddress
nonceuint256

ThresholdSet

Parameters

NameTypeDescription
new_thresholduint16
nonceuint256

Functions

set_threshold

Sets threshold of signatures that must be met before function is executed.MUST emit ThresholdSet event

function set_threshold(uint16 new_threshold, uint256 nonce, bytes signatures) public nonpayable

Arguments

NameTypeDescription
new_thresholduint16New threshold value
nonceuint256Vega-assigned single-use number that provides replay attack protection
signaturesbytesVega-supplied signature bundle of a validator-signed order

add_signer

Adds new valid signer and adjusts signer count.MUST emit 'SignerAdded' event

function add_signer(address new_signer, uint256 nonce, bytes signatures) public nonpayable

Arguments

NameTypeDescription
new_signeraddressNew signer address
nonceuint256Vega-assigned single-use number that provides replay attack protection
signaturesbytesVega-supplied signature bundle of a validator-signed order

remove_signer

Removes currently valid signer and adjusts signer count.MUST emit 'SignerRemoved' event

function remove_signer(address old_signer, uint256 nonce, bytes signatures) public nonpayable

Arguments

NameTypeDescription
old_signeraddressAddress of signer to be removed.
nonceuint256Vega-assigned single-use number that provides replay attack protection
signaturesbytesVega-supplied signature bundle of a validator-signed order

verify_signatures

Verifies a signature bundle and returns true only if the threshold of valid signers is met,

function verify_signatures(bytes signatures, bytes message, uint256 nonce) public nonpayable
returns(bool)

Returns

MUST return true if valid signatures are over the threshold

Arguments

NameTypeDescription
signaturesbytes
messagebytes
nonceuint256

get_valid_signer_count

function get_valid_signer_count() public view
returns(uint8)

Returns

Number of valid signers

Arguments

NameTypeDescription

get_current_threshold

function get_current_threshold() public view
returns(uint16)

Returns

Current threshold

Arguments

NameTypeDescription

is_valid_signer

function is_valid_signer(address signer_address) public view
returns(bool)

Returns

true if address provided is valid signer

Arguments

NameTypeDescription
signer_addressaddresstarget potential signer address

is_nonce_used

function is_nonce_used(uint256 nonce) public view
returns(bool)

Returns

true if nonce has been used

Arguments

NameTypeDescription
nonceuint256Nonce to lookup