-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added scripts, FactoryStaker.sol and deployed and staked new factories
- Created scripts for deploying ModularEtherspotWalletFactory solely, staking, unlocking and withdrawing stake from EntryPoint. - Created ethers script for deploying ModularEtherspotWalletFactory and staking it with EntryPoint (for XDC). - Updated typings. - Added FactoryStaker contract for importing to ModularEtherspotWalletFactory (allows staking functionality for wallet factory). - Added network configs for XDC. - Deployed new factory to all chains.
- Loading branch information
1 parent
c7c519e
commit d40c857
Showing
54 changed files
with
4,221 additions
and
76 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/proxy/utils/Initializable.sol/Initializable.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol/UUPSUpgradeable.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
2 changes: 1 addition & 1 deletion
2
artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../../../build-info/7810ea4a0b1001fe4f85cee7595e8e6b.json" | ||
"buildInfo": "../../../../../build-info/47dc323db6fafbe3d93a9be5111ed9f5.json" | ||
} |
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,64 @@ | ||
import { ethers } from 'ethers'; | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import { DeployFunction } from 'hardhat-deploy/types'; | ||
|
||
const deployModular: DeployFunction = async function ( | ||
hre: HardhatRuntimeEnvironment | ||
) { | ||
const { deployments, getNamedAccounts } = hre; | ||
const { deploy, execute, read } = deployments; | ||
const { from } = await getNamedAccounts(); | ||
const ENTRYPOINT_07 = '0x0000000071727De22E5E9d8BAf0edAc6f37da032'; | ||
const IMPLEMENTATION = '0x202A5598bDba2cE62bFfA13EcccB04969719Fad9'; | ||
|
||
console.log('starting deployments...'); | ||
|
||
// Wait for 5 blocks | ||
let currentBlock = await hre.ethers.provider.getBlockNumber(); | ||
while (currentBlock + 5 > (await hre.ethers.provider.getBlockNumber())) {} | ||
|
||
console.log('deploying ModularEtherspotWalletFactory...'); | ||
const factory = await deploy('ModularEtherspotWalletFactory', { | ||
from, | ||
args: [IMPLEMENTATION, from], | ||
log: true, | ||
}); | ||
console.log('ModularEtherspotWalletFactory deployed at:', factory.address); | ||
|
||
// Wait for 5 blocks | ||
currentBlock = await hre.ethers.provider.getBlockNumber(); | ||
while (currentBlock + 5 > (await hre.ethers.provider.getBlockNumber())) {} | ||
|
||
// check implementation set correctly | ||
console.log('Checking implementation in ModularEtherspotWalletFactory...'); | ||
console.log( | ||
`check implementation matches: ${await read( | ||
'ModularEtherspotWalletFactory', | ||
'implementation' | ||
)} == ${IMPLEMENTATION}` | ||
); | ||
|
||
// Wait for 5 blocks | ||
currentBlock = await hre.ethers.provider.getBlockNumber(); | ||
while (currentBlock + 5 > (await hre.ethers.provider.getBlockNumber())) {} | ||
|
||
console.log('Staking ModularEtherspotWalletFactory with EntryPoint...'); | ||
await execute( | ||
'ModularEtherspotWalletFactory', | ||
{ | ||
from, | ||
value: await ethers.utils.parseEther('0.1'), | ||
log: true, | ||
gasLimit: 6e6, | ||
}, | ||
'addStake', | ||
ENTRYPOINT_07, | ||
86400 | ||
); | ||
|
||
console.log(`Done!`); | ||
}; | ||
|
||
deployModular.tags = ['deploy-modular']; | ||
|
||
export default deployModular; |
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 @@ | ||
50 |
Oops, something went wrong.