This contract provides an alternative to traditional multi-signature contracts where instead of requiring signatures from K
of N
pre-specified signers, an aggregate signature is required from a quorum of the current validators for a given blockchain.
The contract leverages off-chain Avalanche ICM Messages, which are manually approved for signing by a chain's validators. It requires these messages to have the source address set to the zero address to enforce this, since on-chain ICM messages cannot have zero source address.
Note:
- The blockchain validating the message may or may not be the same chain where the target contract and the
ValidatorSetSig
contract are deployed. - Off-Chain ICM messages are ICM messages that validators can include in their config to indicate that they are willing to sign them even though they are not a result of on-chain activity.
- ABI-encode a
ValidatorSetSigMessage
as defined inValidatorSetSig.sol
- OPTIONAL: call
validateMessage
view method of the intended contract to confirm that the message has correct fields, including the nonce. - Pack that as the payload of an AddressedCall ICM Message format. Note that the
SourceAddress
field has to be set to the zero address. - Pack the
AddressedCall
as the payload of the UnsignedWarpMessage.