Skip to content

Commit

Permalink
add drpc nodes (#956)
Browse files Browse the repository at this point in the history
* add drpc nodes

* changeset
  • Loading branch information
franzns authored Sep 19, 2024
1 parent 776d534 commit 3fb6c32
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-cycles-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'backend': patch
---

change RPCs to dRPC
4 changes: 4 additions & 0 deletions apps/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const schema = {
optional: true,
type: String,
},
DRPC_API_KEY: {
optional: true,
type: String,
},
COINGECKO_API_KEY: {
optional: true,
type: String,
Expand Down
4 changes: 3 additions & 1 deletion config/arbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export default <NetworkData>{
platformId: 'arbitrum-one',
excludedTokenAddresses: ['0x6dbf2155b0636cb3fd5359fccefb8a2c02b6cb51'], // plsRDNT, has coingecko entry but no price
},
rpcUrl: env.ALCHEMY_API_KEY ? `https://arb-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}` : 'https://1rpc.io/arb',
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=arbitrum&dkey=${env.DRPC_API_KEY}`
: 'https://1rpc.io/arb',
rpcMaxBlockRange: 2000,
protocolToken: 'bal',
bal: {
Expand Down
4 changes: 2 additions & 2 deletions config/avalanche.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export default <NetworkData>{
platformId: 'avalanche',
excludedTokenAddresses: [],
},
rpcUrl: env.ALCHEMY_API_KEY
? `https://avax-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=avalanche&dkey=${env.DRPC_API_KEY}`
: 'https://rpc.ankr.com/avalanche',
rpcMaxBlockRange: 2000,
protocolToken: 'bal',
Expand Down
4 changes: 2 additions & 2 deletions config/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default <NetworkData>{
platformId: 'base',
excludedTokenAddresses: [],
},
rpcUrl: env.ALCHEMY_API_KEY
? `https://base-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=base&dkey=${env.DRPC_API_KEY}`
: 'https://base.gateway.tenderly.co/7mM7DbBouY1JjnQd9MMDsd',
rpcMaxBlockRange: 500,
protocolToken: 'bal',
Expand Down
4 changes: 2 additions & 2 deletions config/fantom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export default <NetworkData>{
'0xb7c2ddb1ebac1056231ef22c1b0a13988537a274', // new tarot
],
},
rpcUrl: env.ALCHEMY_API_KEY
? `https://fantom-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=fantom&dkey=${env.DRPC_API_KEY}`
: `https://rpc.ankr.com/fantom`,
rpcMaxBlockRange: 1000,
protocolToken: 'beets',
Expand Down
5 changes: 4 additions & 1 deletion config/fraxtal.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { env } from '../apps/env';
import { NetworkData } from '../modules/network/network-config-types';

export default <NetworkData>{
Expand Down Expand Up @@ -34,7 +35,9 @@ export default <NetworkData>{
platformId: 'fraxtal',
excludedTokenAddresses: [],
},
rpcUrl: 'https://rpc.frax.com/',
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=fraxtal&dkey=${env.DRPC_API_KEY}`
: 'https://rpc.frax.com/',
rpcMaxBlockRange: 5000,
protocolToken: 'bal',
bal: {
Expand Down
4 changes: 2 additions & 2 deletions config/gnosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default <NetworkData>{
platformId: 'xdai',
excludedTokenAddresses: [],
},
rpcUrl: env.ALCHEMY_API_KEY
? `https://gnosis-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=gnosis&dkey=${env.DRPC_API_KEY}`
: 'https://gnosis.drpc.org',
rpcMaxBlockRange: 2000,
protocolToken: 'bal',
Expand Down
4 changes: 2 additions & 2 deletions config/mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export default <NetworkData>{
'0xb45ad160634c528cc3d2926d9807104fa3157305', // sDOLA, has Coingecko entry but no price
],
},
rpcUrl: env.ALCHEMY_API_KEY
? `https://eth-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=ethereum&dkey=${env.DRPC_API_KEY}`
: 'https://rpc.ankr.com/eth',
rpcMaxBlockRange: 700,
protocolToken: 'bal',
Expand Down
5 changes: 4 additions & 1 deletion config/mode.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { env } from '../apps/env';
import { NetworkData } from '../modules/network/network-config-types';

export default <NetworkData>{
Expand Down Expand Up @@ -31,7 +32,9 @@ export default <NetworkData>{
platformId: 'mode',
excludedTokenAddresses: [],
},
rpcUrl: 'https://mainnet.mode.network',
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=mode&dkey=${env.DRPC_API_KEY}`
: 'https://mainnet.mode.network',
rpcMaxBlockRange: 5000,
protocolToken: 'bal',
bal: {
Expand Down
4 changes: 2 additions & 2 deletions config/optimism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export default <NetworkData>{
platformId: 'optimistic-ethereum',
excludedTokenAddresses: ['0x97513e975a7fa9072c72c92d8000b0db90b163c5'], //multibeets
},
rpcUrl: env.ALCHEMY_API_KEY
? `https://opt-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=optimism&dkey=${env.DRPC_API_KEY}`
: 'https://mainnet.optimism.io',
rpcMaxBlockRange: 2000,
protocolToken: 'beets',
Expand Down
4 changes: 2 additions & 2 deletions config/polygon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export default <NetworkData>{
platformId: 'polygon-pos',
excludedTokenAddresses: [],
},
rpcUrl: env.ALCHEMY_API_KEY
? `https://polygon-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=polygon&dkey=${env.DRPC_API_KEY}`
: 'https://1rpc.io/matic',
rpcMaxBlockRange: 2000,
protocolToken: 'bal',
Expand Down
4 changes: 2 additions & 2 deletions config/sepolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export default <NetworkData>{
platformId: 'ethereum',
excludedTokenAddresses: [],
},
rpcUrl: env.ALCHEMY_API_KEY
? `https://eth-sepolia.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=sepolia&dkey=${env.DRPC_API_KEY}`
: 'https://gateway.tenderly.co/public/sepolia',
rpcMaxBlockRange: 700,
protocolToken: 'bal',
Expand Down
4 changes: 2 additions & 2 deletions config/zkevm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export default <NetworkData>{
platformId: 'polygon-zkevm',
excludedTokenAddresses: [],
},
rpcUrl: env.ALCHEMY_API_KEY
? `https://polygonzkevm-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
rpcUrl: env.DRPC_API_KEY
? `https://lb.drpc.org/ogrpc?network=polygon-zkevm&dkey=${env.DRPC_API_KEY}`
: 'https://zkevm-rpc.com',
rpcMaxBlockRange: 2000,
protocolToken: 'bal',
Expand Down

0 comments on commit 3fb6c32

Please sign in to comment.