-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial refactor to make the code more readable
- Loading branch information
Showing
10 changed files
with
8,529 additions
and
7,945 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
"singleQuote": true, | ||
"trailingComma": "none", | ||
"arrowParens": "avoid", | ||
"printWidth": 130 | ||
"printWidth": 80 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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,79 @@ | ||
import { ethers } from 'ethers'; | ||
import { ethers as hardhat } from 'hardhat'; | ||
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; | ||
|
||
export async function deployFactory( | ||
deployer: SignerWithAddress, | ||
adminAddr: string, | ||
deployerAddr: string | ||
): Promise<ethers.Contract> { | ||
const Factory = await hardhat.getContractFactory('Factory'); | ||
return await Factory.connect(deployer).deploy(adminAddr, deployerAddr); | ||
} | ||
|
||
export async function deployWalletImplLocator( | ||
deployer: SignerWithAddress, | ||
adminAddr: string, | ||
implChangerAddr: string | ||
): Promise<ethers.Contract> { | ||
const LatestWalletImplLocator = await hardhat.getContractFactory( | ||
'LatestWalletImplLocator' | ||
); | ||
return await LatestWalletImplLocator.connect(deployer).deploy( | ||
adminAddr, | ||
implChangerAddr | ||
); | ||
} | ||
|
||
export async function deployStartUp( | ||
deployer: SignerWithAddress, | ||
walletImplLocatorAddr: string | ||
): Promise<ethers.Contract> { | ||
const StartupWalletImplImpl = await hardhat.getContractFactory( | ||
'StartupWalletImpl' | ||
); | ||
return await StartupWalletImplImpl.connect(deployer).deploy( | ||
walletImplLocatorAddr | ||
); | ||
} | ||
|
||
export async function deployMainModule( | ||
deployer: SignerWithAddress, | ||
factoryAddr: string, | ||
startUpAddr: string | ||
): Promise<ethers.Contract> { | ||
const MainModuleDynamicAuth = await hardhat.getContractFactory( | ||
'MainModuleDynamicAuth' | ||
); | ||
return await MainModuleDynamicAuth.connect(deployer).deploy( | ||
factoryAddr, | ||
startUpAddr | ||
); | ||
} | ||
|
||
export async function deployImmutableSigner( | ||
deployer: SignerWithAddress, | ||
rootAdminAddr: string, | ||
signerAdminAddr: string, | ||
signerAddr?: string | ||
): Promise<ethers.Contract> { | ||
const ImmutableSigner = await hardhat.getContractFactory('ImmutableSigner'); | ||
return await ImmutableSigner.connect(deployer).deploy( | ||
rootAdminAddr, | ||
signerAdminAddr, | ||
signerAddr | ||
); | ||
} | ||
|
||
export async function deployMultiCallDeploy( | ||
deployer: SignerWithAddress, | ||
adminAddr: string, | ||
executorAddr?: string | ||
): Promise<ethers.Contract> { | ||
const MultiCallDeploy = await hardhat.getContractFactory('MultiCallDeploy'); | ||
return await MultiCallDeploy.connect(deployer).deploy( | ||
adminAddr, | ||
executorAddr, | ||
{} | ||
); | ||
} |
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
Oops, something went wrong.