Skip to content

Commit

Permalink
Merge pull request #325 from VenusProtocol/add-deployed-contracts-inf…
Browse files Browse the repository at this point in the history
…o-to-readme

chore: add information about deployed contracts to readme
  • Loading branch information
coreyar authored Nov 17, 2023
2 parents 492b39f + 4950a26 commit 49aca86
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,38 @@ jobs:

- name: Verify deployments work
run: yarn hardhat deploy

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 hardhat export --network ethereum --export ./deployments/ethereum.json
yarn prettier
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "feat: updating deployment files"
file_pattern: "deployments/*.json"
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ npx hardhat deploy
- In the deployment scripts you have added `tags` for example: - `func.tags = ["MockTokens"];`
- Once this is done, adding `--tags "<tag_name>,<tag_name>..."` to the deployment command will execute only the scripts containing the tags.

### Deployed Contracts

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
```

## Source Code Verification

In order to verify the source code of already deployed contracts, run:
Expand Down
5 changes: 5 additions & 0 deletions deployments/ethereum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "ethereum",
"chainId": "1",
"contracts": {}
}
5 changes: 5 additions & 0 deletions deployments/sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "sepolia",
"chainId": "11155111",
"contracts": {}
}
12 changes: 12 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,18 @@ const config: HardhatUserConfig = {
mnemonic: process.env.MNEMONIC || "",
},
},
sepolia: {
url: process.env.RPC_URL || "https://rpc.notadegen.com/eth/sepolia",
chainId: 11155111,
live: true,
gasPrice: 20000000000, // 20 gwei
},
ethereum: {
url: process.env.ETHEREUM_ARCHIVE_NODE_URL || "https://eth-mainnet.public.blastapi.io",
chainId: 1,
live: true,
timeout: 1200000, // 20 minutes
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
Expand Down

0 comments on commit 49aca86

Please sign in to comment.