From 738bedc8b9c6bbddd1cda17638a58b6de005e39f Mon Sep 17 00:00:00 2001 From: Makoto Inoue <2630+makoto@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:58:47 +0000 Subject: [PATCH] Add deployment script --- crosschain-resolver/README.md | 10 +++++- .../deploy_l1/10_l1resolver.ts | 8 +++-- crosschain-resolver/hardhat.config.ts | 2 +- crosschain-reverse-resolver/README.md | 31 +++++++++++++++++++ .../deploy_l2/01_l2resolver .ts | 2 ++ crosschain-reverse-resolver/hardhat.config.ts | 2 +- 6 files changed, 50 insertions(+), 5 deletions(-) diff --git a/crosschain-resolver/README.md b/crosschain-resolver/README.md index d3f6ff6a..efdbc16e 100644 --- a/crosschain-resolver/README.md +++ b/crosschain-resolver/README.md @@ -70,7 +70,8 @@ Create `.env` and set the following variables - L1_ETHERSCAN_API_KEY - L2_ETHERSCAN_API_KEY - VERIFIER_ADDRESS - +- ENS_ADDRESS +- WRAPPER_ADDRESS ``` bun run hardhat deploy --network optimismGoerli ``` @@ -82,3 +83,10 @@ bun run hardhat deploy --network goerli ``` ## Deployments + +### OP +#### L2 +- DelegatableResolver = [0xE00739Fc93e27aBf44343fD5FAA151c67C0A0Aa3](https://goerli-optimism.etherscan.io/address/0xE00739Fc93e27aBf44343fD5FAA151c67C0A0Aa3) +- DelegatableResolverFactory = [0xacB9771923873614d77C914D716d8E25dAF09b8d](https://goerli-optimism.etherscan.io/address/0xacB9771923873614d77C914D716d8E25dAF09b8d) +#### L1 +- L1Resolver = [0x65a0963A2941A13a96FcDCfE36c94c6a341f26E5](https://goerli.etherscan.io/address/0x65a0963A2941A13a96FcDCfE36c94c6a341f26E5) \ No newline at end of file diff --git a/crosschain-resolver/deploy_l1/10_l1resolver.ts b/crosschain-resolver/deploy_l1/10_l1resolver.ts index fff2313c..c010d234 100644 --- a/crosschain-resolver/deploy_l1/10_l1resolver.ts +++ b/crosschain-resolver/deploy_l1/10_l1resolver.ts @@ -9,11 +9,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployer} = await getNamedAccounts(); const VERIFIER_ADDRESS = process.env.VERIFIER_ADDRESS + const ENS_ADDRESS = process.env.ENS_ADDRESS + const WRAPPER_ADDRESS = process.env.WRAPPER_ADDRESS if(!VERIFIER_ADDRESS) throw ('Set $VERIFIER_ADDRESS') - console.log({VERIFIER_ADDRESS}) + if(!ENS_ADDRESS) throw ('Set $ENS_ADDRESS') + if(!WRAPPER_ADDRESS) throw ('Set $WRAPPER_ADDRESS') + console.log({VERIFIER_ADDRESS,ENS_ADDRESS, WRAPPER_ADDRESS}) await deploy('L1Resolver', { from: deployer, - args: [VERIFIER_ADDRESS], + args: [VERIFIER_ADDRESS,ENS_ADDRESS,WRAPPER_ADDRESS], log: true, }); }; diff --git a/crosschain-resolver/hardhat.config.ts b/crosschain-resolver/hardhat.config.ts index 9e54c70e..7db5fd37 100644 --- a/crosschain-resolver/hardhat.config.ts +++ b/crosschain-resolver/hardhat.config.ts @@ -7,7 +7,7 @@ const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY ?? "ac0974bec39a17 const L1_PROVIDER_URL = process.env.L1_PROVIDER_URL || ''; const L1_ETHERSCAN_API_KEY = process.env.L1_ETHERSCAN_API_KEY || ''; const L2_ETHERSCAN_API_KEY = process.env.L2_ETHERSCAN_API_KEY || ''; - +console.log({L1_PROVIDER_URL,L1_ETHERSCAN_API_KEY,L2_ETHERSCAN_API_KEY}) const config: HardhatUserConfig = { solidity: { version: "0.8.19", diff --git a/crosschain-reverse-resolver/README.md b/crosschain-reverse-resolver/README.md index 3e785eb9..404e57ba 100644 --- a/crosschain-reverse-resolver/README.md +++ b/crosschain-reverse-resolver/README.md @@ -3,3 +3,34 @@ A reverse resolver contract that is built on top of evm-verifier. For a detailed readme and usage instructions, see the [monorepo readme](https://github.com/ensdomains/evmgateway/tree/main). + + +## Deploying (Goerli) + +Create `.env` and set the following variables + +- DEPLOYER_PRIVATE_KEY +- L1_PROVIDER_URL +- L2_PROVIDER_URL +- L1_ETHERSCAN_API_KEY +- L2_ETHERSCAN_API_KEY +- VERIFIER_ADDRESS +- REVERSE_NAMESPACE + +``` +bun run hardhat deploy --network optimismGoerli +``` + +Followed by the L1 contract: + +``` +bun run hardhat deploy --network goerli +``` + +## Deployments + +### OP +#### L2 +- L2ReverseRegistrar = [0x7D006EFd21eb282C8B0a425BAB546517bfEC2cc2](https://goerli-optimism.etherscan.io/address/0x7D006EFd21eb282C8B0a425BAB546517bfEC2cc2) +#### L1 +- L1ReverseResolver = [0xeEB5832Ea8732f7EF06d468E40F562c9D7347795](https://goerli.etherscan.io/address/0xeEB5832Ea8732f7EF06d468E40F562c9D7347795) diff --git a/crosschain-reverse-resolver/deploy_l2/01_l2resolver .ts b/crosschain-reverse-resolver/deploy_l2/01_l2resolver .ts index da56c50d..7ccc8b0d 100644 --- a/crosschain-reverse-resolver/deploy_l2/01_l2resolver .ts +++ b/crosschain-reverse-resolver/deploy_l2/01_l2resolver .ts @@ -17,6 +17,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { from: deployer, args: [reversenode], log: true, + gasPrice:20000007, + gas:20000007 }); }; export default func; diff --git a/crosschain-reverse-resolver/hardhat.config.ts b/crosschain-reverse-resolver/hardhat.config.ts index 1989c071..836106fd 100644 --- a/crosschain-reverse-resolver/hardhat.config.ts +++ b/crosschain-reverse-resolver/hardhat.config.ts @@ -7,7 +7,7 @@ const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY ?? "ac0974bec39a17 const L1_PROVIDER_URL = process.env.L1_PROVIDER_URL || ''; const L1_ETHERSCAN_API_KEY = process.env.L1_ETHERSCAN_API_KEY || ''; const L2_ETHERSCAN_API_KEY = process.env.L2_ETHERSCAN_API_KEY || ''; - +console.log({L1_PROVIDER_URL,L1_ETHERSCAN_API_KEY,L2_ETHERSCAN_API_KEY}) const config: HardhatUserConfig = { solidity: '0.8.19', networks: {