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
4 changes: 2 additions & 2 deletions core/src/exchanges/limitless/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { HttpClient, OrderClient, OrderBuilder, OrderSigner, MarketFetcher, Side, OrderType } from '@limitless-exchange/sdk';
import { Wallet, providers, Contract, utils } from 'ethers';
import { LIMITLESS_RPC_URL } from './config';

const DEFAULT_LIMITLESS_API_URL = process.env.LIMITLESS_BASE_URL || 'https://api.limitless.exchange';

Expand Down Expand Up @@ -378,8 +379,7 @@ export class LimitlessClient {
const USDC_ADDRESS = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
const ABI = ["function balanceOf(address) view returns (uint256)", "function decimals() view returns (uint8)"];

// Use a public RPC for Base
const provider = new providers.StaticJsonRpcProvider('https://mainnet.base.org', {
const provider = new providers.StaticJsonRpcProvider(LIMITLESS_RPC_URL, {
chainId: 8453,
name: 'base',
});
Expand Down
1 change: 1 addition & 0 deletions core/src/exchanges/limitless/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const LIMITLESS_RPC_URL = process.env.LIMITLESS_RPC_URL || 'https://mainnet.base.org';
3 changes: 2 additions & 1 deletion core/src/exchanges/limitless/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { FetcherContext } from '../interfaces';
import { limitlessApiSpec } from './api';
import { LimitlessAuth } from './auth';
import { LimitlessClient } from './client';
import { LIMITLESS_RPC_URL } from './config';
import { limitlessErrorMapper } from './errors';
import { LimitlessFetcher } from './fetcher';
import { LimitlessNormalizer } from './normalizer';
Expand Down Expand Up @@ -553,7 +554,7 @@ export class LimitlessExchange extends PredictionMarketExchange {
//
// Static network avoids ethers v5 auto-detect (eth_chainId), which can throw
// noNetwork / NETWORK_ERROR on flaky public RPCs (#92).
const provider = new providers.StaticJsonRpcProvider('https://mainnet.base.org', {
const provider = new providers.StaticJsonRpcProvider(LIMITLESS_RPC_URL, {
chainId: 8453,
name: 'base',
});
Expand Down
2 changes: 1 addition & 1 deletion core/src/exchanges/opinion/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export const OPINION_MAX_PAGE_SIZE = 20;

// CLOB SDK chain constants
export const OPINION_CHAIN_ID = 56;
export const OPINION_DEFAULT_RPC_URL = 'https://bsc-dataseed.binance.org';
export const OPINION_DEFAULT_RPC_URL = process.env.OPINION_RPC_URL || 'https://bsc-dataseed.binance.org';
Loading