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/abacus-core/contracts/test/TestGovernanceRouter.sol

31 lines
963 B

// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.6.11;
pragma experimental ABIEncoderV2;
import "../governance/GovernanceRouter.sol";
import {TypeCasts} from "../XAppConnectionManager.sol";
contract TestGovernanceRouter is GovernanceRouter {
constructor(uint32 _localDomain, uint256 _recoveryTimelock)
GovernanceRouter(_localDomain, 50)
{} // solhint-disable-line no-empty-blocks
function testSetRouter(uint32 _domain, bytes32 _router) external {
_setRouter(_domain, _router); // set the router locally
bytes memory _setRouterMessage = GovernanceMessage.formatSetRouter(
_domain,
_router
);
_sendToAllRemoteRouters(_setRouterMessage);
}
function containsDomain(uint32 _domain) external view returns (bool) {
for (uint256 i = 0; i < domains.length; i++) {
if (domains[i] == _domain) return true;
}
return false;
}
}