Skip to content

Commit

Permalink
Add deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
makoto committed Nov 10, 2023
1 parent a5a9006 commit 738bedc
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 5 deletions.
10 changes: 9 additions & 1 deletion crosschain-resolver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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)
8 changes: 6 additions & 2 deletions crosschain-resolver/deploy_l1/10_l1resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
};
Expand Down
2 changes: 1 addition & 1 deletion crosschain-resolver/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
31 changes: 31 additions & 0 deletions crosschain-reverse-resolver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 2 additions & 0 deletions crosschain-reverse-resolver/deploy_l2/01_l2resolver .ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
from: deployer,
args: [reversenode],
log: true,
gasPrice:20000007,
gas:20000007
});
};
export default func;
Expand Down
2 changes: 1 addition & 1 deletion crosschain-reverse-resolver/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 738bedc

Please sign in to comment.