-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
22 changed files
with
199 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"multiCallAdminPubKey": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"multiCallDeploy": "0x9129211efEcAf4A1cD76104f5A4082220a783078", | ||
"submitterAddress": "0xa45a81EA5AE3ad978C176A6E54e41Df1cff4DF3a" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"factoryAdminPubKey": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"multiCallDeploy": "0x9129211efEcAf4A1cD76104f5A4082220a783078", | ||
"factory": "0x8Fa5088dF65855E0DaF87FA6591659893b24871d" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"walletImplLocatorAdmin": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"walletImplChangerAdmin": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"latestWalletImplLocator": "0xDB4b8F9D2C0C731A345a405b6335b3750d197b6C" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"walletImplLocatorAddress": "0xDB4b8F9D2C0C731A345a405b6335b3750d197b6C", | ||
"startupWalletImpl": "0x8FD900677aabcbB368e0a27566cCd0C7435F1926" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"factoryAddress": "0x8Fa5088dF65855E0DaF87FA6591659893b24871d", | ||
"startupWalletImplAddress": "0x8FD900677aabcbB368e0a27566cCd0C7435F1926", | ||
"mainModuleDynamicAuth": "0xC2d54E4D795469f8616612CC343af078A892F36F" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"signerRootAdminPubKey": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"signerAdminPubKey": "0x3aF5DE2846aB3195BCD7b8880483E63D21261c49", | ||
"signerAddress": "0x71639470D21D69456D6e98e7Cc877ABA671ab7fA", | ||
"immutableSigner": "0xcff469E561D9dCe5B1185CD2AC1Fa961F8fbDe61" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"mainModuleDynamicAuth": "0xC2d54E4D795469f8616612CC343af078A892F36F", | ||
"walletImplLocatorContractAddress": "0xDB4b8F9D2C0C731A345a405b6335b3750d197b6C", | ||
"signerAddress": "0x71639470D21D69456D6e98e7Cc877ABA671ab7fA" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"multiCallAdminPubKey": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"multiCallDeploy": "0x0039Ae5ae1Dc345508b859d40903dDBA0C36Fc90", | ||
"submitterAddress": "0x92fdaB84b46D49A5f999425c06D31A40C7d9E386" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"factoryAdminPubKey": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"multiCallDeploy": "0x0039Ae5ae1Dc345508b859d40903dDBA0C36Fc90", | ||
"factory": "0x8Fa5088dF65855E0DaF87FA6591659893b24871d" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"walletImplLocatorAdmin": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"walletImplChangerAdmin": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"latestWalletImplLocator": "0xDB4b8F9D2C0C731A345a405b6335b3750d197b6C" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"walletImplLocatorAddress": "0xDB4b8F9D2C0C731A345a405b6335b3750d197b6C", | ||
"startupWalletImpl": "0x8FD900677aabcbB368e0a27566cCd0C7435F1926" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"factoryAddress": "0x8Fa5088dF65855E0DaF87FA6591659893b24871d", | ||
"startupWalletImplAddress": "0x8FD900677aabcbB368e0a27566cCd0C7435F1926", | ||
"mainModuleDynamicAuth": "0xC2d54E4D795469f8616612CC343af078A892F36F" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"signerRootAdminPubKey": "0x0E2D55943f4EF07c336C12A85d083c20FF189182", | ||
"signerAdminPubKey": "0xB3533118Ff0f823fAF916AC499bB2a3E9054A698", | ||
"signerAddress": "0x1cE50560686b1297B6311F36B47dbe5d6E04D0f8", | ||
"immutableSigner": "0xcff469E561D9dCe5B1185CD2AC1Fa961F8fbDe61" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"mainModuleDynamicAuth": "0xC2d54E4D795469f8616612CC343af078A892F36F", | ||
"walletImplLocatorContractAddress": "0xDB4b8F9D2C0C731A345a405b6335b3750d197b6C", | ||
"signerAddress": "0x1cE50560686b1297B6311F36B47dbe5d6E04D0f8" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import * as hre from 'hardhat'; | ||
import { EnvironmentInfo, loadEnvironmentInfo } from './environment'; | ||
import { newWalletOptions, WalletOptions } from './wallet-options'; | ||
import { waitForInput } from './helper-functions'; | ||
|
||
async function dummyTransfer(): Promise<EnvironmentInfo> { | ||
const env = loadEnvironmentInfo(hre.network.name); | ||
const { network } = env; | ||
|
||
console.log(`[${network}] Consuming nonce, PROCEED WITH CARE!...`); | ||
|
||
await waitForInput(); | ||
|
||
// Setup wallet | ||
const wallets: WalletOptions = await newWalletOptions(env); | ||
const signer = wallets.getWallet(); | ||
const signerAddress = await signer.getAddress(); | ||
|
||
console.log(`[${env.network}] Starting a 0 value transfer from ${signerAddress} to ${signerAddress}`); | ||
|
||
const tx = await signer.sendTransaction({ | ||
to: signerAddress, | ||
value: 0, | ||
}) | ||
await tx.wait(); | ||
console.log(`[${env.network}] Transfer completed with hash ${tx.hash}`); | ||
|
||
return env; | ||
} | ||
|
||
// Call primary function | ||
dummyTransfer() | ||
.then((env: EnvironmentInfo) => { | ||
console.log(`[${env.network}] Transfer successful...`); | ||
process.exit(0); | ||
}) | ||
.catch(err => { | ||
console.error(err.message); | ||
process.exit(1); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import * as fs from 'fs'; | ||
import * as hre from 'hardhat'; | ||
import { EnvironmentInfo, loadEnvironmentInfo } from './environment'; | ||
import { newWalletOptions, WalletOptions } from './wallet-options'; | ||
import { deployContract } from './contract'; | ||
import { waitForInput } from './helper-functions'; | ||
|
||
// Addresses that need to be pre-determined | ||
// 1. Factory | ||
// 2. StartupWalletImpl | ||
// 3. SignerContract | ||
|
||
/** | ||
* Step 0. | ||
**/ | ||
async function step0(): Promise<EnvironmentInfo> { | ||
const env = loadEnvironmentInfo(hre.network.name); | ||
const { network, submitterAddress } = env; | ||
const multiCallAdminPubKey = process.env.MULTICALL_ADMIN_PUB_KEY; | ||
|
||
console.log(`[${network}] Starting deployment...`); | ||
console.log(`[${network}] Submitter address ${submitterAddress}`); | ||
console.log(`[${network}] multiCallAdminPubKey ${multiCallAdminPubKey}`); | ||
|
||
await waitForInput(); | ||
|
||
// Setup wallet | ||
const wallets: WalletOptions = await newWalletOptions(env); | ||
|
||
// --- STEP 0: Deployed using deployer key (Orange Key) | ||
const multiCallDeploy = await deployContract(env, wallets, 'MultiCallDeploy', [multiCallAdminPubKey, submitterAddress]); | ||
|
||
fs.writeFileSync('step0.json', JSON.stringify({ | ||
multiCallAdminPubKey: multiCallAdminPubKey, | ||
multiCallDeploy: multiCallDeploy.address, | ||
submitterAddress: submitterAddress, | ||
}, null, 1)); | ||
|
||
return env; | ||
} | ||
|
||
// Call primary function | ||
step0() | ||
.then((env: EnvironmentInfo) => { | ||
console.log(`[${env.network}] Contracts deployment successful...`); | ||
process.exit(0); | ||
}) | ||
.catch(err => { | ||
console.error(err.message); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters