Skip to content

Commit

Permalink
Fix manifest name
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Jan 8, 2024
1 parent c29185e commit d913509
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion proxy/migrations/generateManifest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ethers } from "hardhat";
import { contracts, getContractKeyInAbiFile } from "./deploySchain";
import { networkNames } from "@openzeppelin/upgrades-core";
import { promises as fs } from "fs";
import {
getVersion,
Expand Down Expand Up @@ -134,7 +135,8 @@ export async function importAddresses(manifest: ManifestData, abi: {[ key in str

export async function manifestSetup(pathToManifest: string) {
const chainId = (await ethers.provider.getNetwork()).chainId;
const correctManifestPath = `.openzeppelin/unknown-${chainId}.json`;
const manifestName = networkNames[chainId] ?? `unknown-${chainId}`;
const correctManifestPath = `.openzeppelin/${manifestName}.json`;
if (pathToManifest === "" || pathToManifest === correctManifestPath) {
await fs.access(correctManifestPath);
console.log("Current Manifest file detected - will use this one");
Expand Down

0 comments on commit d913509

Please sign in to comment.