The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hyperlane-monorepo/solidity/contracts/test/TestMultisigValidatorManage...

27 lines
884 B

Multisig validator manager contracts & tooling (#334) * All contracts working together, need to separate local vs remote, clean up natspec, and add tests * Create Inbox/Outbox specific MultisigValidatorManagers * New Inbox.sol tests * MultisigValidatorManager tests * Comment for getCheckpointSignatures * Fix build * InboxMultisigValidatorManager tests * OutboxMultisigValidatorManager tests * Prettier * Test rust-produced domain hashes * Delete old ValidatorManager, rm IValidatorManager reference in Common.sol * rm validatorManager test, rm unused AbacusDeployment * Rm test/index.ts * Modify TestAbacusDeploy to work with new validator managers * Add inbox / outbox multisig validator managers to core contracts * Update core test addresses * Ensure validator set unenrolling does not violate a quorum threshold * Prettier * self nits * All builds passing, fixed invariant checker * nits * Minor fixes * rm IValidatorManager * Nit * ValidatorManager -> validator manager in comments * more moving away from ValidatorManager * some more... * Make domainHash internal as _domainHash, publicly expose in TestMultisigValidatorManager * Update solidity/core/contracts/validator-manager/InboxMultisigValidatorManager.sol Co-authored-by: Yorke Rhodes <yorke@useabacus.network> * Revert "Update solidity/core/contracts/validator-manager/InboxMultisigValidatorManager.sol" This reverts commit cf54d4b7656e9c830662e122f71a0bce4c49f1da. * some natspec fixes * PR comments, mostly small renames * Add backticks to natspec * Apply suggestions from code review Co-authored-by: Yorke Rhodes <yorke@useabacus.network> * PR comments * Rename quorumThreshold -> threshold * Add isValidator and validatorCount * Add validatorCount to enroll/unenroll events * Remove multisig from sdk / deploy names * Rename InboxMultisig... and OutboxMultisig... to Inbox... and Outbox... * Better checking, check threshold * rm validator managers from TestAbacusDeploy * clean up comments * PR comments Co-authored-by: Yorke Rhodes <yorke@useabacus.network>
3 years ago
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;
Multisig validator manager contracts & tooling (#334) * All contracts working together, need to separate local vs remote, clean up natspec, and add tests * Create Inbox/Outbox specific MultisigValidatorManagers * New Inbox.sol tests * MultisigValidatorManager tests * Comment for getCheckpointSignatures * Fix build * InboxMultisigValidatorManager tests * OutboxMultisigValidatorManager tests * Prettier * Test rust-produced domain hashes * Delete old ValidatorManager, rm IValidatorManager reference in Common.sol * rm validatorManager test, rm unused AbacusDeployment * Rm test/index.ts * Modify TestAbacusDeploy to work with new validator managers * Add inbox / outbox multisig validator managers to core contracts * Update core test addresses * Ensure validator set unenrolling does not violate a quorum threshold * Prettier * self nits * All builds passing, fixed invariant checker * nits * Minor fixes * rm IValidatorManager * Nit * ValidatorManager -> validator manager in comments * more moving away from ValidatorManager * some more... * Make domainHash internal as _domainHash, publicly expose in TestMultisigValidatorManager * Update solidity/core/contracts/validator-manager/InboxMultisigValidatorManager.sol Co-authored-by: Yorke Rhodes <yorke@useabacus.network> * Revert "Update solidity/core/contracts/validator-manager/InboxMultisigValidatorManager.sol" This reverts commit cf54d4b7656e9c830662e122f71a0bce4c49f1da. * some natspec fixes * PR comments, mostly small renames * Add backticks to natspec * Apply suggestions from code review Co-authored-by: Yorke Rhodes <yorke@useabacus.network> * PR comments * Rename quorumThreshold -> threshold * Add isValidator and validatorCount * Add validatorCount to enroll/unenroll events * Remove multisig from sdk / deploy names * Rename InboxMultisig... and OutboxMultisig... to Inbox... and Outbox... * Better checking, check threshold * rm validator managers from TestAbacusDeploy * clean up comments * PR comments Co-authored-by: Yorke Rhodes <yorke@useabacus.network>
3 years ago
import {MultisigValidatorManager} from "../validator-manager/MultisigValidatorManager.sol";
/**
* This contract exists to test MultisigValidatorManager.sol, which is abstract
* and cannot be deployed directly.
*/
contract TestMultisigValidatorManager is MultisigValidatorManager {
// solhint-disable-next-line no-empty-blocks
constructor(
uint32 _domain,
address[] memory _validators,
uint256 _threshold
) MultisigValidatorManager(_domain, _validators, _threshold) {}
/**
* @notice Hash of domain concatenated with "ABACUS".
* @dev This is a public getter of _domainHash to test with.
* @param _domain The domain to hash.
*/
function getDomainHash(uint32 _domain) external pure returns (bytes32) {
return _domainHash(_domain);
}
}