Skip to content

Commit

Permalink
update arb mainnet rpc endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
cyri113 authored Dec 5, 2024
1 parent dca816d commit 2633058
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/rpc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Injectable, OnModuleInit, Logger } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { fallback, http, Transport } from 'viem';
import { arbitrumSepolia, baseSepolia, mainnet, sepolia } from 'viem/chains';
import { arbitrum, baseSepolia } from 'viem/chains';

@Injectable()
export class RpcService implements OnModuleInit {
Expand All @@ -16,22 +16,14 @@ export class RpcService implements OnModuleInit {
const infuraApiKey = this.configService.get<string>('rpc.infuraApiKey');

this.transport = {
[mainnet.id]: fallback([
http(`https://eth-mainnet.g.alchemy.com/v2/${alchemyApiKey}`),
http(`https://mainnet.infura.io/v3/${infuraApiKey}`),
]),
[sepolia.id]: fallback([
http(`https://eth-sepolia.g.alchemy.com/v2/${alchemyApiKey}`),
http(`https://sepolia.infura.io/v3/${infuraApiKey}`),
]),
[arbitrumSepolia.id]: fallback([
http(`https://arb-sepolia.g.alchemy.com/v2/${alchemyApiKey}`),
http(`https://arbitrum-sepolia.infura.io/v3/${infuraApiKey}`),
]),
[baseSepolia.id]: fallback([
http(`https://base-sepolia.g.alchemy.com/v2/${alchemyApiKey}`),
http(`https://base-sepolia.infura.io/v3/${infuraApiKey}`),
]),
[arbitrum.id]: fallback([
http(`https://arb-mainnet.g.alchemy.com/v2/${alchemyApiKey}`),
http(`https://arbitrum-mainnet.infura.io/v3/${infuraApiKey}`),
]),
};
}

Expand Down

0 comments on commit 2633058

Please sign in to comment.