mirror of
https://github.com/selfxyz/self.git
synced 2026-01-14 09:08:03 -05:00
* refactor: remove namespace imports * refactor: use named fs imports * refactor(app): replace path and fs namespace imports * format * format
29 lines
1.4 KiB
TypeScript
29 lines
1.4 KiB
TypeScript
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";
|
|
import hre from "hardhat";
|
|
import path from "path";
|
|
|
|
module.exports = buildModule("UpdateVerifyAllAddresses", (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"));
|
|
|
|
// Get the addresses from the deployed_addresses.json file
|
|
// const verifyAllAddress = deployedAddresses["DeployVerifyAllModule#VerifyAll"];
|
|
// const hubAddress = deployedAddresses["DeployHubModule#IdentityVerificationHub"];
|
|
// const registryAddress = deployedAddresses["DeployRegistryModule#IdentityRegistry"];
|
|
const verifyAllAddress = "0x03237E7b4c2b1AdEBdBC33d91478Eaef05D0fF85";
|
|
const hubAddress = "0x3e2487a250e2A7b56c7ef5307Fb591Cc8C83623D";
|
|
const registryAddress = "0xD961B67B35739cCF16326B087C9aD2c0095cCc4E";
|
|
|
|
// Get the deployed VerifyAll contract instance
|
|
const deployedVerifyAllInstance = m.contractAt("VerifyAll", verifyAllAddress);
|
|
console.log("Deployed VerifyAll instance", deployedVerifyAllInstance);
|
|
|
|
// Call setHub and setRegistry functions
|
|
m.call(deployedVerifyAllInstance, "setHub", [hubAddress]);
|
|
m.call(deployedVerifyAllInstance, "setRegistry", [registryAddress]);
|
|
|
|
return { deployedVerifyAllInstance };
|
|
});
|