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
af984d60
Commit
af984d60
authored
Jun 21, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme: update
parent
9e0f73b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
README.md
packages/contracts-bedrock/README.md
+16
-8
No files found.
packages/contracts-bedrock/README.md
View file @
af984d60
...
...
@@ -92,19 +92,27 @@ yarn echidna:aliasing
### Deployment
The smart contracts are deployed using
`foundry`
with a
`hardhat-deploy`
compatibility layer. When the contracts are deployed,
they will write a temp file to disk that can then be formatted into a
`hardhat-deploy`
style artifact by calling another script.
#### Configuration
1.
Create or modify a file
`<network-name>.ts
`
inside of the
[
`deploy-config`
](
./deploy-config/
)
folder.
2.
Fill out this file according to the
`deployConfigSpec`
located inside of the
[
`hardhat.config.ts
](
./hardhat.config.ts
)
3.
Optionally: Run
`npx hardhat generate-deploy-config --network <network-name>`
to generate the associated JSON
file. This is required if using
`op-chain-ops`
.
Create or modify a file
`<network-name>.json
`
inside of the
[
`deploy-config`
](
./deploy-config/
)
folder.
The network name will be selected automatically based on the chainid or the
`DEPLOYMENT_CONTEXT`
env
var can be used to override needing to use the chainid as the network name.
The spec for the deploy config can is defined by the
`deployConfigSpec`
located inside of the
[
`hardhat.config.ts`
](
./hardhat.config.ts
)
.
#### Execution
1.
Copy
`.env.example`
into
`.env`
2.
Fill out the
`L1_RPC`
and
`PRIVATE_KEY_DEPLOYER`
environment variables in
`.env`
3.
Run
`npx hardhat deploy --network <network-name>`
to deploy the L1 contracts
4.
Run
`npx hardhat etherscan-verify --network <network-name> --sleep`
to verify contracts on Etherscan
1.
Set the env vars
`ETH_RPC_URL`
,
`PRIVATE_KEY`
and
`ETHERSCAN_API_KEY`
if contract verification is desired
1.
Deploy the contracts with
`forge script -vvv scripts/Deploy.s.sol:Deploy --rpc-url $ETH_RPC_URL --broadcast --private-key $PRIVATE_KEY`
Pass the
`--verify`
flag to verify the deployments automatically with Etherscan.
1.
Generate the hardhat deploy artifacts with
`forge script -vvv scripts/Deploy.s.sol:Deploy --sig 'sync()' --rpc-url $ETH_RPC_URL --broadcast --private-key $PRIVATE_KEY`
#### Deploying a single contract
All of functions for deploying a single contract are
`public`
meaning that the
`--sig`
argument to
`forge script`
can be used to
target the deployment of a single contract.
## Tools
...
...
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