Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion __tests__/defaultNodes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SupportedRpcVersion } from '../src/global/constants';
import { getDefaultNodes, getSupportedRpcVersions } from '../src/utils/provider';

describe('unit tests', () => {
describe('getDefaultNodes', () => {
xdescribe('getDefaultNodes', () => {
it('constructs correct URLs for all supported RPC versions', () => {
const supportedVersions = getSupportedRpcVersions();
supportedVersions.forEach((version) => {
Expand Down
4 changes: 2 additions & 2 deletions src/global/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ export const DEFAULT_GLOBAL_CONFIG: {
};

export const RPC_DEFAULT_NODES = {
SN_MAIN: [`https://starknet-mainnet.public.blastapi.io/rpc/`],
SN_SEPOLIA: [`https://starknet-sepolia.public.blastapi.io/rpc/`],
SN_MAIN: [`https://starknet-mainnet.g.alchemy.com/starknet/version/rpc`],
SN_SEPOLIA: [`https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/`],
} as const;

export const PAYMASTER_RPC_NODES = {
Expand Down
6 changes: 6 additions & 0 deletions src/utils/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ export function getDefaultNodes(rpcVersion: SupportedRpcVersion) {

Object.keys(nodes).forEach(function (key, _) {
nodes[key] = nodes[key].map((it: any) => {
if (it === 'https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/') {
return `${it}${toApiVersion(rpcVersion)}/uYLxCteYbHTFJpKSoKdVm`;
}
if (it === 'https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/') {
return `${it}${toApiVersion(rpcVersion)}/uYLxCteYbHTFJpKSoKdVm`;
}
return `${it}${toApiVersion(rpcVersion)}`;
});
});
Expand Down
Loading