diff --git a/__tests__/cairo1.test.ts b/__tests__/cairo1.test.ts index a347d27fc..ba62d47f5 100644 --- a/__tests__/cairo1.test.ts +++ b/__tests__/cairo1.test.ts @@ -1,5 +1,4 @@ import { - Abi, Account, BigNumberish, CallData, @@ -27,7 +26,6 @@ import { compiledHelloSierraCasm, describeIfDevnet, describeIfDevnetSequencer, - describeIfSequencerTestnet2, getTestAccount, getTestProvider, } from './fixtures'; @@ -555,7 +553,8 @@ describeIfDevnet('Cairo 1 Devnet', () => { }); }); -describeIfSequencerTestnet2('Cairo1 Testnet2', () => { +// TODO: Refactor to Testnet +/* describeIfSequencerTestnet2('Cairo1 Testnet2', () => { describe('Sequencer API - C1 T2 C:0x771bbe2ba64f...', () => { const provider = getTestProvider() as SequencerProvider; const account = getTestAccount(provider); @@ -620,4 +619,4 @@ describeIfSequencerTestnet2('Cairo1 Testnet2', () => { expect(tx).toBe(true); }); }); -}); +}); */ diff --git a/__tests__/fixtures.ts b/__tests__/fixtures.ts index d23db726d..13bb125ae 100644 --- a/__tests__/fixtures.ts +++ b/__tests__/fixtures.ts @@ -2,7 +2,6 @@ import fs from 'fs'; import path from 'path'; import { Account, ProviderInterface, RpcProvider, SequencerProvider, json } from '../src'; -import { BaseUrl } from '../src/constants'; import { CairoVersion, CompiledSierra, @@ -71,7 +70,6 @@ export const IS_DEVNET_SEQUENCER = IS_LOCALHOST_DEVNET && !PROVIDER_URL.includes /* Definitions */ export const IS_RPC = !!RPC_URL; export const IS_SEQUENCER = !RPC_URL; -export const IS_SEQUENCER_TESTNET2 = PROVIDER_URL.includes(BaseUrl.SN_GOERLI2); export const getTestProvider = (): ProviderInterface => { const provider = RPC_URL @@ -121,7 +119,6 @@ export const describeIfNotDevnet = describeIf(!IS_LOCALHOST_DEVNET); export const describeIfDevnet = describeIf(IS_LOCALHOST_DEVNET); export const describeIfDevnetRpc = describeIf(IS_DEVNET_RPC); export const describeIfDevnetSequencer = describeIf(IS_DEVNET_SEQUENCER); -export const describeIfSequencerTestnet2 = describeIf(IS_SEQUENCER_TESTNET2); export const erc20ClassHash = '0x54328a1075b8820eb43caf0caa233923148c983742402dcfc38541dd843d01a'; export const wrongClassHash = '0x000000000000000000000000000000000000000000000000000000000000000'; diff --git a/__tests__/utils/starknetId.test.ts b/__tests__/utils/starknetId.test.ts index fa21f5d84..bdd080620 100644 --- a/__tests__/utils/starknetId.test.ts +++ b/__tests__/utils/starknetId.test.ts @@ -44,10 +44,6 @@ describe('Should tets StarknetId utils', () => { '0x3bab268e932d2cecd1946f100ae67ce3dff9fd234119ea2f6da57d16d29fce' ); - expect(() => { - getStarknetIdContract(StarknetChainId.SN_GOERLI2); - }).toThrow(); - expect(getStarknetIdContract(StarknetChainId.SN_MAIN)).toBe( '0x6ac597f8116f886fa1c97a23fa4e08299975ecaf6b598873ca6792b9bbfb678' ); diff --git a/src/constants.ts b/src/constants.ts index f5c07c06c..df5e0587e 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -11,19 +11,16 @@ export const API_VERSION = ZERO; export enum BaseUrl { SN_MAIN = 'https://alpha-mainnet.starknet.io', SN_GOERLI = 'https://alpha4.starknet.io', - SN_GOERLI2 = 'https://alpha4-2.starknet.io', } export enum NetworkName { SN_MAIN = 'SN_MAIN', SN_GOERLI = 'SN_GOERLI', - SN_GOERLI2 = 'SN_GOERLI2', } export enum StarknetChainId { SN_MAIN = '0x534e5f4d41494e', // encodeShortString('SN_MAIN'), - SN_GOERLI = '0x534e5f474f45524c49', // encodeShortString('SN_GOERLI'), - SN_GOERLI2 = '0x534e5f474f45524c4932', // encodeShortString('SN_GOERLI2'), + SN_GOERLI = '0x534e5f474f45524c49', // encodeShortString('SN_GOERLI') } export enum TransactionHashPrefix { diff --git a/src/provider/sequencer.ts b/src/provider/sequencer.ts index 11cc446d3..e95f60f17 100644 --- a/src/provider/sequencer.ts +++ b/src/provider/sequencer.ts @@ -69,7 +69,7 @@ function isEmptyQueryObject(obj?: Record): obj is undefined { } const defaultOptions = { - network: NetworkName.SN_GOERLI2, + network: NetworkName.SN_GOERLI, blockIdentifier: BlockTag.pending, }; @@ -116,9 +116,6 @@ export class SequencerProvider implements ProviderInterface { case NetworkName.SN_GOERLI: case StarknetChainId.SN_GOERLI: return BaseUrl.SN_GOERLI; - case NetworkName.SN_GOERLI2: - case StarknetChainId.SN_GOERLI2: - return BaseUrl.SN_GOERLI2; default: throw new Error('Could not detect base url from NetworkName'); } @@ -130,9 +127,6 @@ export class SequencerProvider implements ProviderInterface { if (url.host.includes('mainnet.starknet.io')) { return StarknetChainId.SN_MAIN; } - if (url.host.includes('alpha4-2.starknet.io')) { - return StarknetChainId.SN_GOERLI2; - } return StarknetChainId.SN_GOERLI; } catch { // eslint-disable-next-line no-console