Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ cache/
out/

# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/
/broadcast

# Docs
docs/
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,19 @@ All contracts in this repo can be deployed and verified on the block explorer as
forge script 'script/DeployableVM.s.sol:DeployableVMScript' -vvvv --rpc-url "$ETH_RPC_URL" --private-key "$PK" --verify --broadcast
```

### 7. Commit the deployment file

After successfully deploying the contracts, a deployment file is automatically generated in the [./broadcast/DeployableVM.s.sol](broadcast/DeployableVM.s.sol) directory under the relevant chain subdirectory. Make sure to commit this file to the repository.

### 8. Deployment addresses
### 7. Deployment addresses
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All sections use the imperative form to command the reader to do something

I would suggest to use a verb here. i.e. Update deployment addresses


The file [`networks.json`](./networks.json) lists all official deployments of the contracts in this repository by chain id.

The deployment address file is generated with:
```shell
bash dev/generate-networks-file.sh > networks.json
Update it by adding address and transaction hash for the new chain.

You can extract the information you need from the automatically generated deployment file in the [./broadcast/DeployableVM.s.sol](broadcast/DeployableVM.s.sol) directory with the following command.

```sh
chain_id=$(cast chain-id --rpc-url "$ETH_RPC_URL")
jq --arg chainId "$chain_id" '
.transactions[]
| select(.transactionType == "CREATE2")
| select(.hash != null)
| {($chainId): {address: .contractAddress, transactionHash: .hash }}
' <"./broadcast/DeployableVM.s.sol/${chain_id}/run-latest.json"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given its complexity, do you think is worth it to move to a script?

```
47 changes: 0 additions & 47 deletions broadcast/DeployableVM.s.sol/1/run-1728545914.json

This file was deleted.

Loading