Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
d1b1089b
Unverified
Commit
d1b1089b
authored
Jun 28, 2022
by
Mark Tyneway
Committed by
GitHub
Jun 28, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2872 from ethereum-optimism/fix/oom
fix: oom in hardhat tasks
parents
8004eadb
6ec60435
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
66 deletions
+77
-66
shaggy-trainers-move.md
.changeset/shaggy-trainers-move.md
+5
-0
hardhat.ts
packages/contracts-bedrock/deploy-config/hardhat.ts
+2
-3
hardhat.config.ts
packages/contracts-bedrock/hardhat.config.ts
+0
-1
package.json
packages/contracts-bedrock/package.json
+2
-3
genesis-l1.ts
packages/contracts-bedrock/tasks/genesis-l1.ts
+31
-35
genesis-l2.ts
packages/contracts-bedrock/tasks/genesis-l2.ts
+20
-8
plugin.ts
packages/hardhat-deploy-config/src/plugin.ts
+2
-1
yarn.lock
yarn.lock
+15
-15
No files found.
.changeset/shaggy-trainers-move.md
0 → 100644
View file @
d1b1089b
---
'
@eth-optimism/hardhat-deploy-config'
:
patch
---
Use lazyObject
packages/contracts-bedrock/deploy-config/hardhat.ts
View file @
d1b1089b
...
...
@@ -5,7 +5,7 @@ const { env } = process
const
startingTimestamp
=
typeof
env
.
L2OO_STARTING_BLOCK_TIMESTAMP
===
'
string
'
?
ethers
.
BigNumber
.
from
(
env
.
L2OO_STARTING_BLOCK_TIMESTAMP
).
toNumber
()
:
Date
.
now
()
/
1000
:
Math
.
floor
(
Date
.
now
()
/
1000
)
const
config
=
{
submissionInterval
:
6
,
...
...
@@ -15,11 +15,10 @@ const config = {
l2BlockTime
:
2
,
startingTimestamp
,
sequencerAddress
:
'
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
'
,
maxSequencerDrift
:
10
,
sequencerWindowSize
:
2
,
ownerAddress
:
'
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
'
,
fundDevAccounts
:
true
,
}
export
default
config
packages/contracts-bedrock/hardhat.config.ts
View file @
d1b1089b
...
...
@@ -5,7 +5,6 @@ import { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } from 'hardhat/builtin-tasks/ta
// Hardhat plugins
import
'
@nomiclabs/hardhat-ethers
'
import
'
@typechain/hardhat
'
import
'
solidity-coverage
'
import
'
hardhat-deploy
'
import
'
@foundry-rs/hardhat-forge
'
import
'
@eth-optimism/hardhat-deploy-config
'
...
...
packages/contracts-bedrock/package.json
View file @
d1b1089b
...
...
@@ -23,7 +23,7 @@
"gas-snapshot"
:
"forge snapshot"
,
"storage-snapshot"
:
"./scripts/storage-snapshot.sh"
,
"slither"
:
"slither ."
,
"clean"
:
"rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./
coverage ./
tsconfig.tsbuildinfo"
,
"clean"
:
"rm -rf ./dist ./artifacts ./forge-artifacts ./cache ./tsconfig.tsbuildinfo"
,
"lint:ts:check"
:
"eslint . --max-warnings=0"
,
"lint:contracts:check"
:
"yarn solhint -f table 'contracts/**/*.sol'"
,
"lint:check"
:
"yarn lint:contracts:check && yarn lint:ts:check"
,
...
...
@@ -47,7 +47,7 @@
"devDependencies"
:
{
"@eth-optimism/hardhat-deploy-config"
:
"^0.2.0"
,
"@defi-wonderland/smock"
:
"^2.0.2"
,
"@foundry-rs/hardhat-forge"
:
"^0.1.
9
"
,
"@foundry-rs/hardhat-forge"
:
"^0.1.
10
"
,
"@nomiclabs/hardhat-ethers"
:
"^2.0.0"
,
"@nomiclabs/hardhat-waffle"
:
"^2.0.0"
,
"@typechain/ethers-v5"
:
"^7.0.1"
,
...
...
@@ -62,7 +62,6 @@
"hardhat-deploy"
:
"^0.11.4"
,
"solhint"
:
"^3.3.6"
,
"solhint-plugin-prettier"
:
"^0.0.5"
,
"solidity-coverage"
:
"^0.7.16"
,
"ts-node"
:
"^10.1.0"
,
"typechain"
:
"^5.1.2"
,
"typescript"
:
"^4.6.2"
...
...
packages/contracts-bedrock/tasks/genesis-l1.ts
View file @
d1b1089b
...
...
@@ -11,8 +11,8 @@ task('genesis-l1', 'create a genesis config')
'
genesis.json
'
)
.
setAction
(
async
(
args
,
hre
)
=>
{
// TODO: type needs to be updated to work with modern geth
const
alloc
:
State
|
any
=
{}
const
{
deployConfig
}
=
hre
const
alloc
:
State
=
{}
// Give each predeploy a single wei
for
(
let
i
=
0
;
i
<=
0xff
;
i
++
)
{
...
...
@@ -27,40 +27,36 @@ task('genesis-l1', 'create a genesis config')
}
}
// Prefund dev accounts
const
accounts
=
[
'
0x14dC79964da2C08b23698B3D3cc7Ca32193d9955
'
,
'
0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65
'
,
'
0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec
'
,
'
0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f
'
,
'
0x2546BcD3c84621e976D8185a91A922aE77ECEc30
'
,
'
0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
'
,
'
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
'
,
'
0x71bE63f3384f5fb98995898A86B02Fb2426c5788
'
,
'
0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199
'
,
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
'
0x976EA74026E726554dB657fA54763abd0C3a0aa9
'
,
'
0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc
'
,
'
0xBcd4042DE499D14e55001CcbB24a551F3b954096
'
,
'
0xFABB0ac9d68B0B445fB7357272Ff202C5651694a
'
,
'
0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
'
,
'
0xbDA5747bFD65F08deb54cb465eB87D40e51B197E
'
,
'
0xcd3B766CCDd6AE721141F452C550Ca635964ce71
'
,
'
0xdD2FD4581271e230360230F9337D5c0430Bf44C0
'
,
'
0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097
'
,
'
0xde3829a23df1479438622a08a116e8eb3f620bb5
'
,
'
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
'
,
]
if
(
deployConfig
.
fundDevAccounts
)
{
const
accounts
=
[
'
0x14dC79964da2C08b23698B3D3cc7Ca32193d9955
'
,
'
0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65
'
,
'
0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec
'
,
'
0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f
'
,
'
0x2546BcD3c84621e976D8185a91A922aE77ECEc30
'
,
'
0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
'
,
'
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
'
,
'
0x71bE63f3384f5fb98995898A86B02Fb2426c5788
'
,
'
0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199
'
,
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
'
0x976EA74026E726554dB657fA54763abd0C3a0aa9
'
,
'
0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc
'
,
'
0xBcd4042DE499D14e55001CcbB24a551F3b954096
'
,
'
0xFABB0ac9d68B0B445fB7357272Ff202C5651694a
'
,
'
0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
'
,
'
0xbDA5747bFD65F08deb54cb465eB87D40e51B197E
'
,
'
0xcd3B766CCDd6AE721141F452C550Ca635964ce71
'
,
'
0xdD2FD4581271e230360230F9337D5c0430Bf44C0
'
,
'
0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097
'
,
'
0xde3829a23df1479438622a08a116e8eb3f620bb5
'
,
'
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
'
,
]
const
signers
=
await
hre
.
ethers
.
getSigners
()
for
(
const
signer
of
signers
)
{
accounts
.
push
(
signer
.
address
)
}
for
(
const
account
of
accounts
)
{
alloc
[
ethers
.
utils
.
getAddress
(
account
)]
=
{
balance
:
'
0x200000000000000000000000000000000000000000000000000000000000000
'
,
for
(
const
account
of
accounts
)
{
alloc
[
ethers
.
utils
.
getAddress
(
account
)]
=
{
balance
:
'
0x200000000000000000000000000000000000000000000000000000000000000
'
,
}
}
}
...
...
packages/contracts-bedrock/tasks/genesis-l2.ts
View file @
d1b1089b
...
...
@@ -190,17 +190,29 @@ task('genesis-l2', 'create a genesis config')
if
(
deployConfig
.
fundDevAccounts
)
{
const
accounts
=
[
'
0xde3829a23df1479438622a08a116e8eb3f620bb5
'
,
'
0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
'
,
'
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
'
,
'
0x14dC79964da2C08b23698B3D3cc7Ca32193d9955
'
,
'
0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65
'
,
'
0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec
'
,
'
0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f
'
,
'
0x2546BcD3c84621e976D8185a91A922aE77ECEc30
'
,
'
0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
'
,
'
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
'
,
'
0x71bE63f3384f5fb98995898A86B02Fb2426c5788
'
,
'
0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199
'
,
'
0x90F79bf6EB2c4f870365E785982E1f101E93b906
'
,
'
0x976EA74026E726554dB657fA54763abd0C3a0aa9
'
,
'
0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc
'
,
'
0xBcd4042DE499D14e55001CcbB24a551F3b954096
'
,
'
0xFABB0ac9d68B0B445fB7357272Ff202C5651694a
'
,
'
0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
'
,
'
0xbDA5747bFD65F08deb54cb465eB87D40e51B197E
'
,
'
0xcd3B766CCDd6AE721141F452C550Ca635964ce71
'
,
'
0xdD2FD4581271e230360230F9337D5c0430Bf44C0
'
,
'
0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097
'
,
'
0xde3829a23df1479438622a08a116e8eb3f620bb5
'
,
'
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
'
,
]
const
signers
=
await
hre
.
ethers
.
getSigners
()
for
(
const
signer
of
signers
)
{
accounts
.
push
(
signer
.
address
)
}
for
(
const
account
of
accounts
)
{
alloc
[
account
]
=
{
balance
:
...
...
packages/hardhat-deploy-config/src/plugin.ts
View file @
d1b1089b
...
...
@@ -6,6 +6,7 @@ import {
HardhatRuntimeEnvironment
,
HardhatUserConfig
,
}
from
'
hardhat/types
'
import
{
lazyObject
}
from
'
hardhat/plugins
'
import
{
ethers
}
from
'
ethers
'
// From: https://github.com/wighawag/hardhat-deploy/blob/master/src/index.ts#L63-L76
...
...
@@ -104,5 +105,5 @@ extendConfig(
)
extendEnvironment
((
hre
)
=>
{
hre
.
deployConfig
=
l
oadDeployConfig
(
hre
)
hre
.
deployConfig
=
l
azyObject
(()
=>
loadDeployConfig
(
hre
)
)
})
yarn.lock
View file @
d1b1089b
...
...
@@ -1614,10 +1614,10 @@
command-exists "^1.2.9"
ts-interface-checker "^0.1.9"
"@foundry-rs/hardhat-forge@^0.1.
9
":
version "0.1.
9
"
resolved "https://registry.yarnpkg.com/@foundry-rs/hardhat-forge/-/hardhat-forge-0.1.
9.tgz#43144d349b0d9ea00bcad28827c7f03187458c5a
"
integrity sha512-
y1k9bMV9LNgNnxvC7O/P2HPk8eNN2Jpan3fDl9/gii7NCT8J5028hABsCIEwFq4/4mMybJWu2KsHYDjZi8NGZQ
==
"@foundry-rs/hardhat-forge@^0.1.
10
":
version "0.1.
10
"
resolved "https://registry.yarnpkg.com/@foundry-rs/hardhat-forge/-/hardhat-forge-0.1.
10.tgz#031a85c1c8e51bbf72390d950721611d83f089df
"
integrity sha512-
L5E+zXF/AazR2yO0ZoHtj74uyetO/mXxjSx5hOtjEpUX6czRbGP+tPbbTGjKnoMUzUP5uF1N0TjfCe7T9UpBbA
==
dependencies:
"@foundry-rs/easy-foundryup" "^0.1.3"
"@nomiclabs/hardhat-ethers" "^2.0.0"
...
...
@@ -15714,17 +15714,18 @@ solidity-comments-extractor@^0.0.7:
resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19"
integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==
solidity-coverage@^0.7.1
6, solidity-coverage@^0.7.19
:
version "0.7.
21
"
resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.
21.tgz#20c5615a3a543086b243c2ca36e2951a75316b40
"
integrity sha512-
O8nuzJ9yXiKUx3NdzVvHrUW0DxoNVcGzq/I7NzewNO9EZE3wYAQ4l8BwcnV64r4aC/HB6Vnw/q2sF0BQHv/3f
g==
solidity-coverage@^0.7.1
7
:
version "0.7.
17
"
resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.
17.tgz#5139de8f6666d4755d88f453d8e35632a7bb3444
"
integrity sha512-
Erw2hd2xdACAvDX8jUdYkmgJlIIazGznwDJA5dhRaw4def2SisXN9jUjneeyOZnl/E7j6D3XJYug4Zg9iwods
g==
dependencies:
"@solidity-parser/parser" "^0.1
4.0
"
"@solidity-parser/parser" "^0.1
3.2
"
"@truffle/provider" "^0.2.24"
chalk "^2.4.2"
death "^1.1.0"
detect-port "^1.3.0"
fs-extra "^8.1.0"
ganache-cli "^6.12.2"
ghost-testrpc "^0.0.2"
global-modules "^2.0.0"
globby "^10.0.1"
...
...
@@ -15738,18 +15739,17 @@ solidity-coverage@^0.7.16, solidity-coverage@^0.7.19:
shelljs "^0.8.3"
web3-utils "^1.3.0"
solidity-coverage@^0.7.1
7
:
version "0.7.
17
"
resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.
17.tgz#5139de8f6666d4755d88f453d8e35632a7bb3444
"
integrity sha512-
Erw2hd2xdACAvDX8jUdYkmgJlIIazGznwDJA5dhRaw4def2SisXN9jUjneeyOZnl/E7j6D3XJYug4Zg9iwods
g==
solidity-coverage@^0.7.1
9
:
version "0.7.
21
"
resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.
21.tgz#20c5615a3a543086b243c2ca36e2951a75316b40
"
integrity sha512-
O8nuzJ9yXiKUx3NdzVvHrUW0DxoNVcGzq/I7NzewNO9EZE3wYAQ4l8BwcnV64r4aC/HB6Vnw/q2sF0BQHv/3f
g==
dependencies:
"@solidity-parser/parser" "^0.1
3.2
"
"@solidity-parser/parser" "^0.1
4.0
"
"@truffle/provider" "^0.2.24"
chalk "^2.4.2"
death "^1.1.0"
detect-port "^1.3.0"
fs-extra "^8.1.0"
ganache-cli "^6.12.2"
ghost-testrpc "^0.0.2"
global-modules "^2.0.0"
globby "^10.0.1"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment