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
6ce47f38
Unverified
Commit
6ce47f38
authored
Jul 31, 2022
by
Matthew Slipper
Committed by
GitHub
Jul 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hardhat-deploy-config: Support JSON-formatted deploy configs (#3145)
Also adds a new `deployer` network for use with automation.
parent
70bf922a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
fast-mangos-smoke.md
.changeset/fast-mangos-smoke.md
+5
-0
hardhat.config.ts
packages/contracts-bedrock/hardhat.config.ts
+5
-0
plugin.ts
packages/hardhat-deploy-config/src/plugin.ts
+10
-2
No files found.
.changeset/fast-mangos-smoke.md
0 → 100644
View file @
6ce47f38
---
'
@eth-optimism/hardhat-deploy-config'
:
patch
---
Support JSON-formatted deploy configs
packages/contracts-bedrock/hardhat.config.ts
View file @
6ce47f38
...
@@ -46,6 +46,11 @@ const config: HardhatUserConfig = {
...
@@ -46,6 +46,11 @@ const config: HardhatUserConfig = {
url
:
process
.
env
.
L1_RPC
||
''
,
url
:
process
.
env
.
L1_RPC
||
''
,
accounts
:
[
process
.
env
.
PRIVATE_KEY_DEPLOYER
||
ethers
.
constants
.
HashZero
],
accounts
:
[
process
.
env
.
PRIVATE_KEY_DEPLOYER
||
ethers
.
constants
.
HashZero
],
},
},
deployer
:
{
chainId
:
Number
(
process
.
env
.
CHAIN_ID
),
url
:
process
.
env
.
L1_RPC
||
''
,
accounts
:
[
process
.
env
.
PRIVATE_KEY_DEPLOYER
||
ethers
.
constants
.
HashZero
],
},
},
},
foundry
:
{
foundry
:
{
buildInfo
:
true
,
buildInfo
:
true
,
...
...
packages/hardhat-deploy-config/src/plugin.ts
View file @
6ce47f38
import
*
as
path
from
'
path
'
import
*
as
path
from
'
path
'
import
*
as
fs
from
'
fs
'
import
{
extendEnvironment
,
extendConfig
}
from
'
hardhat/config
'
import
{
extendEnvironment
,
extendConfig
}
from
'
hardhat/config
'
import
{
import
{
...
@@ -28,9 +29,16 @@ const normalizePath = (
...
@@ -28,9 +29,16 @@ const normalizePath = (
export
const
loadDeployConfig
=
(
hre
:
HardhatRuntimeEnvironment
):
any
=>
{
export
const
loadDeployConfig
=
(
hre
:
HardhatRuntimeEnvironment
):
any
=>
{
let
config
:
any
let
config
:
any
try
{
try
{
config
=
const
base
=
`
${
hre
.
config
.
paths
.
deployConfig
}
/
${
hre
.
network
.
name
}
`
if
(
fs
.
existsSync
(
`
${
base
}
.ts`
))
{
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires
require
(
`
${
hre
.
config
.
paths
.
deployConfig
}
/
${
hre
.
network
.
name
}
.ts`
).
default
config
=
require
(
`
${
base
}
.ts`
).
default
}
else
if
(
fs
.
existsSync
(
`
${
base
}
.json`
))
{
// eslint-disable-next-line @typescript-eslint/no-var-requires
config
=
require
(
`
${
base
}
.json`
)
}
else
{
throw
new
Error
(
'
not found
'
)
}
}
catch
(
err
)
{
}
catch
(
err
)
{
throw
new
Error
(
throw
new
Error
(
`error while loading deploy config for network:
${
hre
.
network
.
name
}
,
${
err
}
`
`error while loading deploy config for network:
${
hre
.
network
.
name
}
,
${
err
}
`
...
...
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