Skip to content

Commit

Permalink
fix: agent config artifact includes only chains user deployed to (hyp…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalaji authored and ltyu committed Mar 13, 2024
1 parent f4b591e commit 35e09d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions typescript/cli/src/deploy/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,18 +472,20 @@ async function writeAgentConfig(
multiProvider: MultiProvider,
) {
const startBlocks: ChainMap<number> = {};
const core = HyperlaneCore.fromAddressesMap(artifacts, multiProvider);

for (const chain of chains) {
const core = HyperlaneCore.fromAddressesMap(artifacts, multiProvider);
const mailbox = core.getContracts(chain).mailbox;
startBlocks[chain] = (await mailbox.deployedBlock()).toNumber();
}

const mergedAddressesMap = objMerge(
sdkContractAddressesMap,
artifacts,
) as ChainMap<HyperlaneDeploymentArtifacts>;

const agentConfig = buildAgentConfig(
Object.keys(mergedAddressesMap),
chains, // Use only the chains that were deployed to
multiProvider,
mergedAddressesMap,
startBlocks,
Expand Down

0 comments on commit 35e09d8

Please sign in to comment.