From a64336a4743a01ec5f1976dff7101e81d3f6f73e Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Fri, 10 Nov 2023 14:20:03 -0300 Subject: [PATCH 1/4] chore: add information about deployed contracts to readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 2ae44fe6b..6481943b6 100644 --- a/README.md +++ b/README.md @@ -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 ",..."` 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 --export ./deployments/.json +``` + ## Source Code Verification In order to verify the source code of already deployed contracts, run: From 33f92fc23ff11cbd75138a18b31bc6ffb262281a Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Wed, 15 Nov 2023 15:27:12 -0300 Subject: [PATCH 2/4] feat: add github job to export and commit deployment by network --- .github/workflows/ci.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 387c1f5f5..448d689fe 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -89,3 +89,35 @@ 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 prettier + + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "feat: updating deployment files" \ No newline at end of file From db0ef9cd1c7df3ed05174203b8a4b0f19075b749 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Thu, 16 Nov 2023 16:46:14 -0300 Subject: [PATCH 3/4] feat: support exporting sepolia and ethereum deployments --- .github/workflows/ci.yaml | 5 ++++- hardhat.config.ts | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 448d689fe..47548dc01 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -116,8 +116,11 @@ jobs: 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" \ No newline at end of file + commit_message: "feat: updating deployment files" + file_pattern: "deployments/*.json" diff --git a/hardhat.config.ts b/hardhat.config.ts index 4b1ea96d1..4b5742b0d 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -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, From 4950a269f7c616e22502eebbd955bdb3ceb4e2fe Mon Sep 17 00:00:00 2001 From: coreyar Date: Fri, 17 Nov 2023 12:37:04 +0000 Subject: [PATCH 4/4] feat: updating deployment files --- deployments/ethereum.json | 5 +++++ deployments/sepolia.json | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 deployments/ethereum.json create mode 100644 deployments/sepolia.json diff --git a/deployments/ethereum.json b/deployments/ethereum.json new file mode 100644 index 000000000..dd24474d9 --- /dev/null +++ b/deployments/ethereum.json @@ -0,0 +1,5 @@ +{ + "name": "ethereum", + "chainId": "1", + "contracts": {} +} diff --git a/deployments/sepolia.json b/deployments/sepolia.json new file mode 100644 index 000000000..21a16fd45 --- /dev/null +++ b/deployments/sepolia.json @@ -0,0 +1,5 @@ +{ + "name": "sepolia", + "chainId": "11155111", + "contracts": {} +}