@skalenetwork/upgrade-tools 3.0.0-191-version.1 → 3.0.0-develop.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,6 +64,7 @@ class Upgrader {
64
64
  implementationAddress: newImplementationAddress,
65
65
  name: contract
66
66
  });
67
+ await (0, verification_1.verify)(contract, newImplementationAddress, []);
67
68
  }
68
69
  else {
69
70
  console.log(chalk_1.default.gray(`Contract ${contract} is up to date`));
@@ -82,15 +83,6 @@ class Upgrader {
82
83
  await this.setVersion(version);
83
84
  await fs_1.promises.writeFile(`data/transactions-${version}-${hardhat_2.network.name}.json`, JSON.stringify(this.transactions, null, 4));
84
85
  await this.submitter.submit(this.transactions);
85
- if (process.env.NO_VERIFY) {
86
- console.log("Skip verification");
87
- }
88
- else {
89
- console.log("Start verification");
90
- for (const contract of contractsToUpgrade) {
91
- await (0, verification_1.verify)(contract.name, contract.implementationAddress, []);
92
- }
93
- }
94
86
  console.log("Done");
95
87
  }
96
88
  // private
@@ -5,12 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.verifyProxy = exports.verify = void 0;
7
7
  const hardhat_1 = require("hardhat");
8
- const chain_config_1 = require("@nomicfoundation/hardhat-verify/internal/chain-config");
9
8
  const chalk_1 = __importDefault(require("chalk"));
10
9
  const upgrades_core_1 = require("@openzeppelin/upgrades-core");
11
10
  async function verify(contractName, contractAddress, constructorArguments) {
12
- const chainId = (await hardhat_1.ethers.provider.getNetwork()).chainId;
13
- if (chain_config_1.builtinChains.find(chain => chain.chainId === chainId) !== undefined) {
11
+ if (![1337, 31337].includes((await hardhat_1.ethers.provider.getNetwork()).chainId)) {
14
12
  for (let retry = 0; retry <= 5; ++retry) {
15
13
  try {
16
14
  await (0, hardhat_1.run)("verify:verify", {
@@ -5,23 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getVersion = void 0;
7
7
  const child_process_1 = require("child_process");
8
- const path_1 = require("path");
9
8
  const fs_1 = require("fs");
10
9
  const util_1 = __importDefault(require("util"));
11
10
  const exec = util_1.default.promisify(child_process_1.exec);
12
- async function getVersionFilename(folder) {
13
- if (folder === undefined) {
14
- return getVersionFilename(process.cwd());
15
- }
16
- const path = `${folder}/VERSION`;
17
- if ((0, fs_1.existsSync)(path)) {
18
- return path;
19
- }
20
- if (folder === '/') {
21
- throw Error("Can't find version file");
22
- }
23
- return getVersionFilename((0, path_1.dirname)(folder));
24
- }
25
11
  const getVersion = async () => {
26
12
  if (process.env.VERSION) {
27
13
  return process.env.VERSION;
@@ -31,7 +17,7 @@ const getVersion = async () => {
31
17
  return tag;
32
18
  }
33
19
  catch {
34
- return (await fs_1.promises.readFile(await getVersionFilename(), "utf-8")).trim();
20
+ return (await fs_1.promises.readFile("VERSION", "utf-8")).trim();
35
21
  }
36
22
  };
37
23
  exports.getVersion = getVersion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skalenetwork/upgrade-tools",
3
- "version": "3.0.0-191-version.1",
3
+ "version": "3.0.0-develop.0",
4
4
  "description": "Scripts to support upgrades of smart contracts",
5
5
  "files": [
6
6
  "dist/**/*"
@@ -48,7 +48,6 @@
48
48
  "ethereumjs-util": "^7.1.4"
49
49
  },
50
50
  "peerDependencies": {
51
- "@nomicfoundation/hardhat-verify": "^1.1.1",
52
51
  "@nomiclabs/hardhat-ethers": "^2.0.4",
53
52
  "@openzeppelin/hardhat-upgrades": "^1.14.0",
54
53
  "@openzeppelin/upgrades-core": "^1.27.1",