Skip to content

Commit

Permalink
revert sourcify changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LikoIlya committed Jun 17, 2024
1 parent 0abdcfb commit d0d265c
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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<string, any>;

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;

0 comments on commit d0d265c

Please sign in to comment.