Skip to content

Commit

Permalink
feat: def rpc 0_6, sepolia nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni committed Dec 11, 2023
1 parent 7581906 commit 4f59a8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const UDC = {
ENTRYPOINT: 'deployContract',
};

export const RPC_DEFAULT_VERSION = 'v0_5';
export const RPC_DEFAULT_VERSION = 'v0_6';

export const RPC_NODES = {
SN_GOERLI: [
Expand Down
4 changes: 2 additions & 2 deletions src/utils/provider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NetworkName, RPC_GOERLI_NODES, RPC_MAINNET_NODES } from '../constants';
import { NetworkName, RPC_NODES } from '../constants';
import {
BigNumberish,
BlockIdentifier,
Expand Down Expand Up @@ -73,7 +73,7 @@ export const getDefaultNodeUrl = (networkName?: NetworkName, mute: boolean = fal
if (!mute)
// eslint-disable-next-line no-console
console.warn('Using default public node url, please provide nodeUrl in provider options!');
const nodes = networkName === NetworkName.SN_MAIN ? RPC_MAINNET_NODES : RPC_GOERLI_NODES;
const nodes = RPC_NODES[networkName ?? NetworkName.SN_GOERLI]; // TODO: when goerli deprecated switch default to sepolia
const randIdx = Math.floor(Math.random() * nodes.length);
return nodes[randIdx];
};
Expand Down

0 comments on commit 4f59a8f

Please sign in to comment.