Skip to content

Commit 7072634

Browse files
committed
Added hardhat config for L1 testnet and mainnet Alchemy as a provider
Fixing a mistake Quick undo Latest changes for L1 mainnet deploy L1testnet run details Added a dummy transfer script A minor tidy up of step 0 and step 1 Further fixes to the deployment README Added a step0.ts
1 parent 12f1ef2 commit 7072634

File tree

22 files changed

+199
-21
lines changed

22 files changed

+199
-21
lines changed

hardhat.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,18 @@ const config: HardhatUserConfig = {
4949
url: 'https://rpc.testnet.immutable.com',
5050
accounts: []
5151
},
52+
l1testnet: {
53+
url: 'https://eth-sepolia.g.alchemy.com/v2/<CHANGE_ME>',
54+
accounts: []
55+
},
5256
mainnet: {
5357
url: 'https://rpc.immutable.com',
5458
accounts: []
5559
},
60+
l1mainnet: {
61+
url: 'https://eth-mainnet.g.alchemy.com/v2/<CHANGE_ME>',
62+
accounts: []
63+
},
5664
},
5765
mocha: {
5866
timeout: process.env.COVERAGE ? 15 * 60 * 1000 : 30 * 1000

scripts/README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,26 @@ Create a `.env` file. Use the `env.example` as a template. Set the following val
4848

4949
## Execution steps
5050

51+
### `step0.ts`
52+
53+
In this step we deploy the `MultiCallDeploy` only. We use the standard deployment key (Orange key) for this deployment, as the address of the MultiCallDeploy strictly does
54+
not need to be the same across all the environments.
55+
56+
* Set the value of RELAYER_SUBMITTER_EOA_PUB_KEY to match the EOA of the primary Relayer submitter. The Submitter EOA is granted execute permission on the MultiCallDeploy.
57+
* Set the value of MULTICALL_ADMIN_PUB_KEY
58+
* Set the `accountIndex` to 0 in `wallet-options.ts`.
59+
* Execute the command `npx hardhat run scripts/step0.ts --network <ENV>`
60+
5161
### `step1.ts`
5262

53-
In this step we deploy the `MultiCallDeploy`, and the `Factory` contracts. We use the Passport Nonce reserver
63+
In this step we deploy the `Factory` contract. We use the Passport Nonce reserver
5464
in this step because we want the `Factory` contract to have the same address across all our chains, as
5565
this address is used to produce a deterministic counter factual address for the smart contract wallets across
5666
all the chains.
5767

5868
* Set the value of RELAYER_SUBMITTER_EOA_PUB_KEY to match the EOA of the primary Relayer submitter.
69+
* Set the value of the FACTORY_ADMIN_PUB_KEY to the privileged mulstisig pub key (Purple ledger)
70+
* Set the value of `multiCallDeployAddress` to match the address of the contract deployed in Step0.
5971
* Set the `accountIndex` to 10 in `wallet-options.ts`.
6072
* Execute the command `npx hardhat run scripts/step1.ts --network <ENV>`
6173

@@ -64,7 +76,8 @@ all the chains.
6476
In this step we deploy the contract that tracks the location of the latest wallet implementation. As this step
6577
just uses the CREATE2 contract factory we use the standard deployment key (Orange Key!!!).
6678

67-
* Set the value of WALLET_IMPL_LOCATOR_ADMIN, and WALLET_IMPL_CHANGER_ADMIN environment variables to the public key of the Priveleged key.
79+
* Set the value of DEPLOYER_CONTRACT_ADDRESS to the address of the CREATE2 factory contract.
80+
* Set the value of WALLET_IMPL_LOCATOR_ADMIN, and WALLET_IMPL_CHANGER_ADMIN environment variables to the public key of the Privileged key.
6881
* Set the `accountIndex` to 0.
6982
* Execute the command `npx hardhat run scripts/step2.ts --network <ENV>`
7083

scripts/contract.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ export async function deployContract(
6262
constructorArgs: Array<string | undefined>): Promise<Contract> {
6363
const contractFactory: ContractFactory = await newContractFactory(walletsOptions.getWallet(), contractName);
6464
const contract: Contract = await contractFactory.connect(walletsOptions.getWallet()).deploy(...constructorArgs, {
65-
gasLimit: 30000000,
66-
maxFeePerGas: 10000000000,
67-
maxPriorityFeePerGas: 10000000000,
65+
gasLimit: 100000,
66+
maxFeePerGas: 30000000000,
67+
maxPriorityFeePerGas: 1000000000,
6868
});
6969
console.log(`[${env.network}] Deployed ${contractName} to ${contract.address}`);
7070
return contract;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"multiCallAdminPubKey": "0x0E2D55943f4EF07c336C12A85d083c20FF189182",
3+
"multiCallDeploy": "0x9129211efEcAf4A1cD76104f5A4082220a783078",
4+
"submitterAddress": "0xa45a81EA5AE3ad978C176A6E54e41Df1cff4DF3a"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"factoryAdminPubKey": "0x0E2D55943f4EF07c336C12A85d083c20FF189182",
3+
"multiCallDeploy": "0x9129211efEcAf4A1cD76104f5A4082220a783078",
4+
"factory": "0x8Fa5088dF65855E0DaF87FA6591659893b24871d"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"walletImplLocatorAdmin": "0x0E2D55943f4EF07c336C12A85d083c20FF189182",
3+
"walletImplChangerAdmin": "0x0E2D55943f4EF07c336C12A85d083c20FF189182",
4+
"latestWalletImplLocator": "0xDB4b8F9D2C0C731A345a405b6335b3750d197b6C"
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"walletImplLocatorAddress": "0xDB4b8F9D2C0C731A345a405b6335b3750d197b6C",
3+
"startupWalletImpl": "0x8FD900677aabcbB368e0a27566cCd0C7435F1926"
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"factoryAddress": "0x8Fa5088dF65855E0DaF87FA6591659893b24871d",
3+
"startupWalletImplAddress": "0x8FD900677aabcbB368e0a27566cCd0C7435F1926",
4+
"mainModuleDynamicAuth": "0xC2d54E4D795469f8616612CC343af078A892F36F"
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"signerRootAdminPubKey": "0x0E2D55943f4EF07c336C12A85d083c20FF189182",
3+
"signerAdminPubKey": "0x3aF5DE2846aB3195BCD7b8880483E63D21261c49",
4+
"signerAddress": "0x71639470D21D69456D6e98e7Cc877ABA671ab7fA",
5+
"immutableSigner": "0xcff469E561D9dCe5B1185CD2AC1Fa961F8fbDe61"
6+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"mainModuleDynamicAuth": "0xC2d54E4D795469f8616612CC343af078A892F36F",
3+
"walletImplLocatorContractAddress": "0xDB4b8F9D2C0C731A345a405b6335b3750d197b6C",
4+
"signerAddress": "0x71639470D21D69456D6e98e7Cc877ABA671ab7fA"
5+
}

0 commit comments

Comments
 (0)