Skip to content

Commit

Permalink
Merge pull request #418 from balancer/optimism-env
Browse files Browse the repository at this point in the history
chore: add optimism rpc url to envs
  • Loading branch information
agualis authored Sep 24, 2024
2 parents b9f47a9 + 2be2b58 commit 1d6af52
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-months-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@balancer/sdk": patch
---

Add OPTIMISM_RPC_URL to test envs
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
ETHEREUM_RPC_URL: ${{ secrets.ETHEREUM_RPC_URL }}
POLYGON_RPC_URL: ${{ secrets.POLYGON_RPC_URL }}
FANTOM_RPC_URL: ${{ secrets.FANTOM_RPC_URL }}
OPTIMISM_RPC_URL: ${{ secrets.OPTIMISM_RPC_URL }}
SEPOLIA_RPC_URL: ${{ secrets.SEPOLIA_RPC_URL }}
build:
name: Build
Expand Down
4 changes: 2 additions & 2 deletions test/anvil/anvil-global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const ANVIL_NETWORKS: Record<NetworksWithFork, NetworkSetup> = {
},
OPTIMISM: {
rpcEnv: 'OPTIMISM_RPC_URL',
fallBackRpc: 'https://optimism.gateway.tenderly.co',
fallBackRpc: 'https://optimism.llamarpc.com',
port: ANVIL_PORTS.OPTIMISM,
forkBlockNumber: 117374265n,
},
Expand Down Expand Up @@ -111,7 +111,7 @@ function getAnvilOptions(
blockNumber?: bigint,
): CreateAnvilOptions {
let forkUrl: string;
if (process.env[network.rpcEnv] !== undefined) {
if (process.env[network.rpcEnv] !== 'undefined') {
forkUrl = process.env[network.rpcEnv] as string;
} else {
if (!network.fallBackRpc)
Expand Down
3 changes: 3 additions & 0 deletions vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export default defineConfig(({ mode }) => {
env.ARBITRUM_RPC_URL,
),
'process.env.FANTOM_RPC_URL': JSON.stringify(env.FANTOM_RPC_URL),
'process.env.OPTIMISM_RPC_URL': JSON.stringify(
env.OPTIMISM_RPC_URL,
),
'process.env.SKIP_GLOBAL_SETUP': JSON.stringify(
env.SKIP_GLOBAL_SETUP,
),
Expand Down

0 comments on commit 1d6af52

Please sign in to comment.