mirror of
https://github.com/getwax/wax.git
synced 2026-01-09 15:18:02 -05:00
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.
37 lines
1.1 KiB
TypeScript
Executable File
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;
|
|
});
|