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
5f376ee5
Unverified
Commit
5f376ee5
authored
Apr 23, 2021
by
Mark Tyneway
Committed by
GitHub
Apr 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: proper config parsing for `bin/deploy.ts` (#586)
* deployer: fix configuration * chore: add changeset
parent
7bfe391c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
10 deletions
+41
-10
seven-kids-smash.md
.changeset/seven-kids-smash.md
+5
-0
deploy.ts
packages/contracts/bin/deploy.ts
+36
-10
No files found.
.changeset/seven-kids-smash.md
0 → 100644
View file @
5f376ee5
---
"
@eth-optimism/contracts"
:
patch
---
Adds config parsing to the deploy script for local deployments
packages/contracts/bin/deploy.ts
View file @
5f376ee5
...
...
@@ -21,17 +21,19 @@ const main = async () => {
const
sequencer
=
new
Wallet
(
process
.
env
.
SEQUENCER_PRIVATE_KEY
)
const
deployer
=
new
Wallet
(
process
.
env
.
DEPLOYER_PRIVATE_KEY
)
const
config
=
parseEnv
()
await
hre
.
run
(
'
deploy
'
,
{
l1BlockTimeSeconds
:
process
.
env
.
BLOCK_TIME_SECONDS
,
ctcForceInclusionPeriodSeconds
:
process
.
env
.
FORCE_INCLUSION_PERIOD_SECONDS
,
ctcMaxTransactionGasLimit
:
process
.
env
.
MAX_TRANSACTION_GAS_LIMIT
,
emMinTransactionGasLimit
:
process
.
env
.
MIN_TRANSACTION_GAS_LIMIT
,
emMaxtransactionGasLimit
:
process
.
env
.
MAX_TRANSACTION_GAS_LIMIT
,
emMaxGasPerQueuePerEpoch
:
process
.
env
.
MAX_GAS_PER_QUEUE_PER_EPOCH
,
emSecondsPerEpoch
:
process
.
env
.
SECONDS_PER_EPOCH
,
emOvmChainId
:
process
.
env
.
CHAIN_ID
,
sccFraudProofWindow
:
parseInt
(
process
.
env
.
FRAUD_PROOF_WINDOW_SECONDS
,
10
)
,
sccSequencerPublishWindow
:
process
.
env
.
SEQUENCER_PUBLISH_WINDOW_SECONDS
,
l1BlockTimeSeconds
:
config
.
l1BlockTimeSeconds
,
ctcForceInclusionPeriodSeconds
:
config
.
ctcForceInclusionPeriodSeconds
,
ctcMaxTransactionGasLimit
:
config
.
ctcMaxTransactionGasLimit
,
emMinTransactionGasLimit
:
config
.
emMinTransactionGasLimit
,
emMaxtransactionGasLimit
:
config
.
emMaxtransactionGasLimit
,
emMaxGasPerQueuePerEpoch
:
config
.
emMaxGasPerQueuePerEpoch
,
emSecondsPerEpoch
:
config
.
emSecondsPerEpoch
,
emOvmChainId
:
config
.
emOvmChainId
,
sccFraudProofWindow
:
config
.
sccFraudProofWindow
,
sccSequencerPublishWindow
:
config
.
sccFraudProofWindow
,
ovmSequencerAddress
:
sequencer
.
address
,
ovmProposerAddress
:
sequencer
.
address
,
ovmRelayerAddress
:
sequencer
.
address
,
...
...
@@ -75,3 +77,27 @@ main()
)
process
.
exit
(
1
)
})
function
parseEnv
()
{
function
ensure
(
env
,
type
)
{
if
(
typeof
process
.
env
[
env
]
===
'
undefined
'
)
return
undefined
if
(
type
===
'
number
'
)
return
parseInt
(
process
.
env
[
env
],
10
)
return
process
.
env
[
env
]
}
return
{
l1BlockTimeSeconds
:
ensure
(
'
BLOCK_TIME_SECONDS
'
,
'
number
'
),
ctcForceInclusionPeriodSeconds
:
ensure
(
'
FORCE_INCLUSION_PERIOD_SECONDS
'
,
'
number
'
),
ctcMaxTransactionGasLimit
:
ensure
(
'
MAX_TRANSACTION_GAS_LIMIT
'
,
'
number
'
),
emMinTransactionGasLimit
:
ensure
(
'
MIN_TRANSACTION_GAS_LIMIT
'
,
'
number
'
),
emMaxtransactionGasLimit
:
ensure
(
'
MAX_TRANSACTION_GAS_LIMIT
'
,
'
number
'
),
emMaxGasPerQueuePerEpoch
:
ensure
(
'
MAX_GAS_PER_QUEUE_PER_EPOCH
'
,
'
number
'
),
emSecondsPerEpoch
:
ensure
(
'
ECONDS_PER_EPOCH
'
,
'
number
'
),
emOvmChainId
:
ensure
(
'
CHAIN_ID
'
,
'
number
'
),
sccFraudProofWindow
:
ensure
(
'
FRAUD_PROOF_WINDOW_SECONDS
'
,
'
number
'
),
sccSequencerPublishWindow
:
ensure
(
'
SEQUENCER_PUBLISH_WINDOW_SECONDS
'
,
'
number
'
),
}
}
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