From d0d265c1c3ed047f06fa4dac9059bf7f7a5299bd Mon Sep 17 00:00:00 2001 From: Illia Likhoshva Date: Mon, 17 Jun 2024 19:10:42 +0300 Subject: [PATCH] revert sourcify changes --- hardhat.config.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 5e36c752..9ee3b30c 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -4,7 +4,7 @@ import "@openzeppelin/hardhat-upgrades"; import { ethers } from "ethers"; import * as dotenv from "dotenv"; -import { sourcifyOne, loadAllDeployments } from "@airdao/deployments/deploying"; +import { sourcifyAll } from "@airdao/deployments/deploying"; import { HardhatRuntimeEnvironment } from "hardhat/types"; dotenv.config(); @@ -75,17 +75,7 @@ const config: HardhatUserConfig = { task("sourcify", "verify contracts using sourcify").setAction(async (args: any, hre: HardhatRuntimeEnvironment) => { await hre.run("compile"); // compile contract first - // @ts-ignore - let { chainId } = await hre.ethers.provider.getNetwork(); - const deployments = require(`./deployments/${chainId}.json`) as Record; - - for (const [contractName, deployment] of Object.entries(deployments)) - if (deployment.proxy) { - await sourcifyOne(hre, deployment.proxy.fullyQualifiedName, deployment.address, chainId, contractName + " Proxy"); - await sourcifyOne(hre, deployment.fullyQualifiedName, deployment.proxy.implementation, chainId, contractName); - } else { - await sourcifyOne(hre, deployment.fullyQualifiedName, deployment.address, chainId, contractName); - } + await sourcifyAll(hre); }); export default config;