Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve connector build errors #4705

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"event SendRateLimitUpdated(address updater, uint256 newRateLimit)",
"event SenderAdded(address sender)",
"event SenderRemoved(address sender)",
"event SnapshotRootSaved(uint256 indexed snapshotId, bytes32 indexed root, uint256 indexed count)",
"event Unpaused(address account)",
"event WatcherManagerChanged(address watcherManager)",
"function AMB() view returns (address)",
Expand All @@ -50,6 +51,8 @@
"function delay() view returns (uint256)",
"function delayBlocks() view returns (uint256)",
"function dispatch(uint32 _destinationDomain, bytes32 _recipientAddress, bytes _messageBody) returns (bytes32, bytes)",
"function getLastCompletedSnapshotId() view returns (uint256 _lastCompletedSnapshotId)",
"function getSnapshotDuration() pure returns (uint256 _snapshotDuration)",
"function home() view returns (address)",
"function isReplica(address _potentialReplica) view returns (bool)",
"function lastSentBlock() view returns (uint256)",
Expand Down Expand Up @@ -86,6 +89,7 @@
"function setRateLimitBlocks(uint256 _rateLimit)",
"function setRefundAddress(address _updated)",
"function setWatcherManager(address _watcherManager)",
"function snapshotRoots(uint256) view returns (bytes32)",
"function unpause()",
"function verifySender(address _expected) returns (bool)",
"function watcherManager() view returns (address)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment): Promise<voi
console.log("network: ", network, chain);
const protocol = MESSAGING_PROTOCOL_CONFIGS[network];

if (+chain !== protocol.hub) {
if (+chain !== protocol.hub.chain) {
console.warn(`Admin connector must be deployed on network hub (${protocol.hub}), not ${chain})`);
return;
}
Expand All @@ -36,7 +36,7 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment): Promise<voi
const mirrorChain = network === ProtocolNetwork.TESTNET ? 97 : 56;
const contract = "AdminHubConnector";
const deploymentName = getDeploymentName(
getConnectorName(protocol, mirrorChain, protocol.hub),
getConnectorName(protocol, mirrorChain, protocol.hub.chain),
undefined,
protocol.configs[mirrorChain].networkName,
);
Expand All @@ -51,7 +51,7 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment): Promise<voi
const deployment = await hre.deployments.deploy(deploymentName, {
contract,
from: deployer.address,
args: [chainIdToDomain(protocol.hub), chainIdToDomain(mirrorChain), rootManager.address],
args: [chainIdToDomain(protocol.hub.chain), chainIdToDomain(mirrorChain), rootManager.address],
skipIfAlreadyDeployed: true,
log: true,
});
Expand Down