Commit af984d60 authored by Mark Tyneway's avatar Mark Tyneway

readme: update

parent 9e0f73b3
...@@ -92,19 +92,27 @@ yarn echidna:aliasing ...@@ -92,19 +92,27 @@ yarn echidna:aliasing
### Deployment ### 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 #### Configuration
1. Create or modify a file `<network-name>.ts` inside of the [`deploy-config`](./deploy-config/) folder. Create or modify a file `<network-name>.json` 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) The network name will be selected automatically based on the chainid or the `DEPLOYMENT_CONTEXT` env
3. Optionally: Run `npx hardhat generate-deploy-config --network <network-name>` to generate the associated JSON var can be used to override needing to use the chainid as the network name.
file. This is required if using `op-chain-ops`. The spec for the deploy config can is defined by the `deployConfigSpec` located inside of the [`hardhat.config.ts`](./hardhat.config.ts).
#### Execution #### Execution
1. Copy `.env.example` into `.env` 1. Set the env vars `ETH_RPC_URL`, `PRIVATE_KEY` and `ETHERSCAN_API_KEY` if contract verification is desired
2. Fill out the `L1_RPC` and `PRIVATE_KEY_DEPLOYER` environment variables in `.env` 1. Deploy the contracts with `forge script -vvv scripts/Deploy.s.sol:Deploy --rpc-url $ETH_RPC_URL --broadcast --private-key $PRIVATE_KEY`
3. Run `npx hardhat deploy --network <network-name>` to deploy the L1 contracts Pass the `--verify` flag to verify the deployments automatically with Etherscan.
4. Run `npx hardhat etherscan-verify --network <network-name> --sleep` to verify contracts on 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 ## Tools
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment