Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 45975a3

Browse files
authored
chore: use node 20 in github actions (#1146)
* chore: use node 20 in gitHub actions * chore: use alchemy key in polygon integration tests * chore: use dRPC key in polygon integration tests * chore: use dRPC key in polygon integration tests2 * chore: bump viem/wagmi/rainbowkit * chore: ALCHEMY comment * chore: test helper improvements * chore: update version in action.yml
1 parent 8b7c00c commit 45975a3

File tree

7 files changed

+74
-79
lines changed

7 files changed

+74
-79
lines changed

.github/actions/setup/action.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ runs:
77
uses: pnpm/action-setup@v4
88
with:
99
version: latest
10-
node-version: 18
1110
- name: Install Node.js
1211
uses: actions/setup-node@v4
1312
with:
1413
cache: pnpm
15-
node-version: 18
14+
version: latest
1615
- name: Install dependencies
1716
shell: bash
1817
run: pnpm i --frozen-lockfile

.github/workflows/checks.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
env:
77
NEXT_PUBLIC_BALANCER_API_URL: https://api-v3.balancer.fi/graphql
88
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.NEXT_PUBLIC_WALLET_CONNECT_ID }}
9+
NEXT_PRIVATE_ALCHEMY_KEY: ${{ secrets.PRIVATE_ALCHEMY_KEY }}
910
NEXT_PRIVATE_DRPC_KEY: ${{ secrets.PRIVATE_DRPC_KEY }}
1011

1112
jobs:

lib/modules/pool/__mocks__/getPoolMock.ts

+6
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,11 @@ export async function getPoolMock(
3939
.then(response => response.json())
4040
.then(result => result.data)) as GetPoolQuery
4141

42+
if (!getPoolQuery.pool) {
43+
throw new Error(
44+
`Pool not found in api ${process.env.NEXT_PUBLIC_BALANCER_API_URL} network ${chain} poolId ${poolId}`
45+
)
46+
}
47+
4248
return getPoolQuery.pool as GqlPoolElement
4349
}

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@emotion/react": "^11.11.1",
4747
"@emotion/styled": "^11.11.0",
4848
"@nikolovlazar/chakra-ui-prose": "^1.2.1",
49-
"@rainbow-me/rainbowkit": "^2.1.6",
49+
"@rainbow-me/rainbowkit": "^2.1.7",
5050
"@sentry/nextjs": "^8.13.0",
5151
"@studio-freight/react-lenis": "^0.0.47",
5252
"@tanstack/react-query": "^5.56.2",
@@ -85,8 +85,8 @@
8585
"use-debounce": "^10.0.0",
8686
"use-sound": "^4.0.1",
8787
"usehooks-ts": "^3.1.0",
88-
"viem": "^2.21.6",
89-
"wagmi": "^2.12.11"
88+
"viem": "^2.21.18",
89+
"wagmi": "^2.12.16"
9090
},
9191
"devDependencies": {
9292
"@apollo/experimental-nextjs-app-support": "^0.11.3",

pnpm-lock.yaml

+53-71
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/anvil/anvil-global-setup.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export async function setup() {
88
for (const chain of Object.values(testChains)) {
99
console.log('Starting proxy ', {
1010
port: chain.port,
11-
forkUrl: getForkUrl(ANVIL_NETWORKS[chain.name], false),
11+
forkUrl: getForkUrl(chain.name, false),
1212
forkBlockNumber: ANVIL_NETWORKS[chain.name].forkBlockNumber,
1313
})
1414
promises.push(
@@ -17,7 +17,7 @@ export async function setup() {
1717
host: '::',
1818
options: {
1919
chainId: chain.id,
20-
forkUrl: getForkUrl(ANVIL_NETWORKS[chain.name], false),
20+
forkUrl: getForkUrl(chain.name, false),
2121
forkBlockNumber: ANVIL_NETWORKS[chain.name].forkBlockNumber,
2222
noMining: false,
2323
},

test/anvil/anvil-setup.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,14 @@ export function getTestRpcSetup(networkName: NetworksWithFork) {
8383
return { port, rpcUrl }
8484
}
8585

86-
export function getForkUrl(network: NetworkSetup, verbose = false): string {
86+
/*
87+
* We currently use Drpc for all integration tests (Ethereum, Polygon and Sepolia networks)
88+
* In case you want to use a different RPC, you can set something like this (i.e. ALCHEMY)
89+
* const privateAlchemyKey = process.env['NEXT_PRIVATE_ALCHEMY_KEY']
90+
* return `https://polygon-mainnet.g.alchemy.com/v2/${privateAlchemyKey}`
91+
*/
92+
export function getForkUrl(networkName: NetworksWithFork, verbose = false): string {
93+
const network = ANVIL_NETWORKS[networkName]
8794
const privateKey = process.env['NEXT_PRIVATE_DRPC_KEY']
8895
const dRpcUrl = (chainName: string) =>
8996
`https://lb.drpc.org/ogrpc?network=${chainName}&dkey=${privateKey}`

0 commit comments

Comments
 (0)