From 5729a836a8660c85b58689836e14fefdecb846ac Mon Sep 17 00:00:00 2001 From: Andrei Vlad Birgaoanu <99738872+andreivladbrg@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:38:38 +0300 Subject: [PATCH] Rename `RPC_URL` and add more endpoints (#371) --- .env.example | 3 +-- .github/workflows/ci-deep.yml | 2 +- .github/workflows/ci-fork.yml | 2 +- .github/workflows/ci.yml | 2 +- CONTRIBUTING.md | 5 ++--- foundry.toml | 17 ++++++++++------- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.env.example b/.env.example index d0f0d17e..9e31018f 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,4 @@ -export API_KEY_INFURA="YOUR_API_KEY_INFURA" export EOA="YOUR_EOA_ADDRESS" export FOUNDRY_PROFILE="lite" export MNEMONIC="YOUR_MNEMONIC" -export RPC_URL_MAINNET="YOUR_RPC_URL_MAINNET" +export MAINNET_RPC_URL="YOUR_MAINNET_RPC_URL" diff --git a/.github/workflows/ci-deep.yml b/.github/workflows/ci-deep.yml index 19d75e16..18f48a5e 100644 --- a/.github/workflows/ci-deep.yml +++ b/.github/workflows/ci-deep.yml @@ -33,7 +33,7 @@ jobs: test-fork: needs: ["lint", "build"] secrets: - RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }} + MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main" with: foundry-fuzz-runs: ${{ fromJSON(inputs.forkFuzzRuns) || 1000 }} diff --git a/.github/workflows/ci-fork.yml b/.github/workflows/ci-fork.yml index 77430c31..860a906e 100644 --- a/.github/workflows/ci-fork.yml +++ b/.github/workflows/ci-fork.yml @@ -14,7 +14,7 @@ jobs: test-fork: needs: ["lint", "build"] secrets: - RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }} + MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main" with: foundry-profile: "test-optimized" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5817704..f79e8aad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: test-fork: needs: ["lint", "build"] secrets: - RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }} + MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main" with: foundry-fuzz-runs: 20 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2f4c5ccb..eba60d10 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,10 +67,9 @@ populate it with the appropriate environment values. You need to provide your mn ### Deployment To make CI work in your pull request, ensure that the necessary environment variables are configured in your forked -repository's secrets. Please add the following variables in your GitHub Secrets: +repository's secrets. Please add the following variable in your GitHub Secrets: -- API_KEY_INFURA -- RPC_URL_MAINNET +- MAINNET_RPC_URL ## Integration with VSCode: diff --git a/foundry.toml b/foundry.toml index bb3e8ab8..e76800cf 100644 --- a/foundry.toml +++ b/foundry.toml @@ -63,14 +63,17 @@ wrap_comments = true [rpc_endpoints] - arbitrum = "https://arbitrum-mainnet.infura.io/v3/${API_KEY_INFURA}" - avalanche = "https://avalanche-mainnet.infura.io/v3/${API_KEY_INFURA}" + arbitrum = "${ARBITRUM_RPC_URL}" + arbitrum_sepolia = "https://arbitrum-sepolia.blockpi.network/v1/rpc/public" + avalanche = "${AVALANCHE_RPC_URL}" base = "https://mainnet.base.org" + base_sepolia = "https://sepolia.base.org" bnb = "https://bsc-dataseed.binance.org" - ethereum = "${RPC_URL_MAINNET}" gnosis = "https://rpc.gnosischain.com" localhost = "http://localhost:8545" - mainnet = "${RPC_URL_MAINNET}" - optimism = "https://optimism-mainnet.infura.io/v3/${API_KEY_INFURA}" - polygon = "https://polygon-mainnet.infura.io/v3/${API_KEY_INFURA}" - sepolia = "https://sepolia.infura.io/v3/${API_KEY_INFURA}" + mainnet = "${MAINNET_RPC_URL}" + optimism = "${OPTIMISM_RPC_URL}" + optimism_sepolia = "https://sepolia.optimism.io" + polygon = "${POLYGON_RPC_URL}" + scroll = "https://rpc.scroll.io/" + sepolia = "${SEPOLIA_RPC_URL}" \ No newline at end of file