Files
self/contracts/ignition/modules/deployVerifyAll.ts
2025-02-11 00:17:13 +09:00

19 lines
753 B
TypeScript

import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";
import hre from "hardhat";
import fs from "fs";
import path from "path";
export default buildModule("DeployVerifyAll", (m) => {
const networkName = hre.network.config.chainId;
const deployedAddressesPath = path.join(__dirname, `../deployments/chain-${networkName}/deployed_addresses.json`);
const deployedAddresses = JSON.parse(fs.readFileSync(deployedAddressesPath, "utf8"));
const hubAddress = deployedAddresses["DeployHub#IdentityVerificationHub"];
const registryAddress = deployedAddresses["DeployRegistryModule#IdentityRegistry"];
const verifyAll = m.contract("VerifyAll", [hubAddress, registryAddress]);
return {
verifyAll,
};
});