Skip to content

fix: add Lava RPC node to default Free RPC Nodes #1335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/global/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ETransactionVersion } from '../types/api';
import { type LogLevel } from './logger.type';
import { RpcProvider } from 'starknet';

export { IS_BROWSER } from '../utils/encode';

Expand Down Expand Up @@ -71,10 +72,12 @@ export const RPC_NODES = {
SN_MAIN: [
`https://starknet-mainnet.public.blastapi.io/rpc/${RPC_DEFAULT_VERSION}`,
`https://free-rpc.nethermind.io/mainnet-juno/${RPC_DEFAULT_VERSION}`,
`https://starknet.lava.build/rpc/${RPC_DEFAULT_VERSION}`,
],
SN_SEPOLIA: [
`https://starknet-sepolia.public.blastapi.io/rpc/${RPC_DEFAULT_VERSION}`,
`https://free-rpc.nethermind.io/sepolia-juno/${RPC_DEFAULT_VERSION}`,
`https://starknet.lava.build/rpc/${RPC_DEFAULT_VERSION}`,
],
} as const;

Expand Down Expand Up @@ -106,3 +109,6 @@ export const SYSTEM_MESSAGES = {
legacyTxWarningMessage:
'You are using a deprecated transaction version (V0,V1,V2)!\nUpdate to the latest V3 transactions!',
};

// Provider will automatically select one of the available nodes, including Lava
const provider = new RpcProvider();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this ?