From 9c65d77f659e5ef05e906f83c4762c309bcb68ec Mon Sep 17 00:00:00 2001 From: franz Date: Wed, 21 Feb 2024 12:49:22 +0100 Subject: [PATCH] add gateway fm rpc --- app/env.ts | 4 ++++ modules/network/gnosis.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/env.ts b/app/env.ts index e202e8c90..843b1d4f6 100644 --- a/app/env.ts +++ b/app/env.ts @@ -25,6 +25,10 @@ export const schema = { optional: true, type: String, }, + GATEWAYFM_API_KEY: { + optional: true, + type: String, + }, ALCHEMY_API_KEY: { optional: true, type: String, diff --git a/modules/network/gnosis.ts b/modules/network/gnosis.ts index 8df1f6612..e8532f9c8 100644 --- a/modules/network/gnosis.ts +++ b/modules/network/gnosis.ts @@ -53,8 +53,8 @@ const gnosisNetworkData: NetworkData = { excludedTokenAddresses: [], }, rpcUrl: - (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main' - ? `https://rpc.eu-central-2.gateway.fm/v4/gnosis/non-archival/mainnet` + env.GATEWAYFM_API_KEY && (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main' + ? `https://rpc.eu-central-2.gateway.fm/v4/gnosis/archival/mainnet?apiKey=${env.GATEWAYFM_API_KEY}` : 'https://gnosis.drpc.org', rpcMaxBlockRange: 2000, protocolToken: 'bal',