Skip to content

Commit

Permalink
Merge pull request #39 from VenusProtocol/organize-deployments
Browse files Browse the repository at this point in the history
refactor: organize deployments in files per network
  • Loading branch information
coreyar authored Nov 17, 2023
2 parents e203df6 + 94151cd commit 088dc38
Show file tree
Hide file tree
Showing 5 changed files with 4,128 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,37 @@ jobs:

- name: Create docgen
run: yarn docgen

export-deployments:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Check out code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.VENUS_TOOLS_TOKEN }}

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 18
cache: "yarn"

- name: Install dependencies
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error
run: YARN_CHECKSUM_BEHAVIOR=update yarn

- name: Export deployments
run: |
yarn hardhat export --network bsctestnet --export ./deployments/bsctestnet.json
yarn hardhat export --network bscmainnet --export ./deployments/bscmainnet.json
yarn hardhat export --network sepolia --export ./deployments/sepolia.json
yarn prettier
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "feat: updating deployment files"
file_pattern: "deployments/*.json"
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,14 @@ MNEMONIC="<>" BSC_API_KEY="<>" npx hardhat run ./script/hardhat/deploy.ts --netw
Documentation is autogenerated using [solidity-docgen](https://github.com/OpenZeppelin/solidity-docgen).

They can be generated by running `yarn docgen`

### Deployments

Deployments are managed using [hardhat-deploy](https://github.com/wighawag/hardhat-deploy).
Deployment scripts are in the `deploy` directory and run automatically when starting the hardhat node.

Deployed contract abis and addresses are exported in the `deployments` directory. To create a summary export of all contracts deployed to a network run

```
$ yarn hardhat export --network <network-name> --export ./deployments/<network-name>.json
```
Loading

0 comments on commit 088dc38

Please sign in to comment.