Skip to content

Commit

Permalink
feat: testnet2
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni committed Nov 8, 2022
1 parent 6a663d4 commit 8a054d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const IS_RPC_DEVNET = Boolean(
);
const IS_SEQUENCER = !IS_RPC;
const IS_SEQUENCER_DEVNET = !BASE_URL.includes('starknet.io');
export const IS_SEQUENCER_GOERLI = BASE_URL === 'https://alpha4.starknet.io';
export const IS_SEQUENCER_GOERLI = BASE_URL === 'https://alpha4-2.starknet.io';
export const IS_DEVNET = IS_SEQUENCER ? IS_SEQUENCER_DEVNET : IS_RPC_DEVNET;

export const getTestProvider = () => {
Expand Down
5 changes: 4 additions & 1 deletion src/provider/sequencer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { GatewayError, HttpError } from './errors';
import { ProviderInterface } from './interface';
import { Block, BlockIdentifier } from './utils';

type NetworkName = 'mainnet-alpha' | 'goerli-alpha';
type NetworkName = 'mainnet-alpha' | 'goerli-alpha' | 'goerli-alpha-2';

function isEmptyQueryObject(obj?: Record<any, any>): obj is undefined {
return (
Expand Down Expand Up @@ -106,6 +106,9 @@ export class SequencerProvider implements ProviderInterface {
case 'mainnet-alpha':
return 'https://alpha-mainnet.starknet.io';
case 'goerli-alpha':
return 'https://alpha4.starknet.io';
case 'goerli-alpha-2':
return 'https://alpha4-2.starknet.io';
default:
return 'https://alpha4.starknet.io';
}
Expand Down

0 comments on commit 8a054d0

Please sign in to comment.