Skip to content

Failure during manifest setup #1612

@DimaStebaev

Description

@DimaStebaev

The bug description
There are 3 places where asynchronous functions are called wrong

It causes wrong behavior when a manifest file is not present.

Besides the manifest filename is generated incorrectly for globally known networks such as mainnet, goerli, sepolia, et cetera.

const correctManifestPath = `.openzeppelin/unknown-${chainId}.json`;

Probably the manifestSetup function is relevant only for actions on schain but it is used in upgrade script for mainnet smart contracts.

await manifestSetup(pathToManifest);

To Reproduce
Run upgrade of IMA mainnet smart contracts

  1. npx hardhat run migrations/upgradeMainnet.ts --network custom

Expected behavior
Smart contracts are upgraded.

Screenshots

> npx hardhat run migrations/upgradeMainnet.ts --network custom
Current Manifest file detected - will use this one
Error: ENOENT: no such file or directory, access '.openzeppelin/unknown-5.json'

Desktop:

  • OS: Ubuntu 23.04
  • Browser: Firefox
  • Version: 118.0.1

Smartphone:

  • Device: Google Pixel 6 Pro
  • OS: Android 13
  • Browser: Chrome
  • Version: 117.0.5938.153

Additional context
The issue is present for IMA 2.0.0-beta.16.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions