Files
wax/packages/plugins/script/deploySafeZkEmailRecoveryPlugin.ts
jacque006 42d49837ae Flesh out configure recovery
Update recovery plugin to allow acces to router.
Remove multicalls as we can get them from wagmi config.
Add utils for account code & guardian address.
Add nodejs polyfill for vite.
Add wagmi config to link contracts in future.
Remove router deploy from script.
2024-04-06 23:24:43 -04:00

37 lines
1.1 KiB
TypeScript
Executable File

import hre from "hardhat";
import { SafeZkEmailRecoveryPlugin__factory } from "../typechain-types";
// base sepolia
// TODO make configurable
const emailAuthContracts = {
verifier: "0xEdC642bbaD91E21cCE6cd436Fdc6F040FD0fF998",
dkimRegistry: "0xC83256CCf7B94d310e49edA05077899ca036eb78",
emailAuthImpl: "0x1C76Aa365c17B40c7E944DcCdE4dC6e6D2A7b748",
};
async function deploySafeZkEmailRecoveryPlugin() {
console.log("Deploying SafeZkEmailRecoveryPlugin");
const [firstSigner] = await hre.ethers.getSigners();
console.log(`Using ${await firstSigner.getAddress()} as signer/deployer`);
const recoveryPlugin = await new SafeZkEmailRecoveryPlugin__factory()
.connect(firstSigner)
.deploy(
emailAuthContracts.verifier,
emailAuthContracts.dkimRegistry,
emailAuthContracts.emailAuthImpl,
);
await recoveryPlugin.waitForDeployment();
console.log(
`SafeZkEmailRecoveryPlugin deployed to ${await recoveryPlugin.getAddress()}`,
);
}
deploySafeZkEmailRecoveryPlugin().catch((error: Error) => {
console.error(error);
process.exitCode = 1;
});