@1delta/providers 0.0.43 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -7270,6 +7270,326 @@ declare function getEvmChain(chain: string): {
7270
7270
  }] | undefined;
7271
7271
  serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
7272
7272
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
7273
+ } | {
7274
+ blockExplorers: {
7275
+ readonly default: {
7276
+ readonly name: "Worldscan";
7277
+ readonly url: "https://worldscan.org";
7278
+ readonly apiUrl: "https://api.worldscan.org/api";
7279
+ };
7280
+ readonly blockscout: {
7281
+ readonly name: "Blockscout";
7282
+ readonly url: "https://worldchain-mainnet.explorer.alchemy.com";
7283
+ readonly apiUrl: "https://worldchain-mainnet.explorer.alchemy.com/api";
7284
+ };
7285
+ };
7286
+ blockTime: 2000;
7287
+ contracts: {
7288
+ readonly multicall3: {
7289
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
7290
+ readonly blockCreated: 0;
7291
+ };
7292
+ readonly disputeGameFactory: {
7293
+ readonly 1: {
7294
+ readonly address: "0x069c4c579671f8c120b1327a73217D01Ea2EC5ea";
7295
+ };
7296
+ };
7297
+ readonly l2OutputOracle: {
7298
+ readonly 1: {
7299
+ readonly address: "0x19A6d1E9034596196295CF148509796978343c5D";
7300
+ };
7301
+ };
7302
+ readonly portal: {
7303
+ readonly 1: {
7304
+ readonly address: "0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C";
7305
+ };
7306
+ };
7307
+ readonly l1StandardBridge: {
7308
+ readonly 1: {
7309
+ readonly address: "0x470458C91978D2d929704489Ad730DC3E3001113";
7310
+ };
7311
+ };
7312
+ readonly gasPriceOracle: {
7313
+ readonly address: "0x420000000000000000000000000000000000000F";
7314
+ };
7315
+ readonly l1Block: {
7316
+ readonly address: "0x4200000000000000000000000000000000000015";
7317
+ };
7318
+ readonly l2CrossDomainMessenger: {
7319
+ readonly address: "0x4200000000000000000000000000000000000007";
7320
+ };
7321
+ readonly l2Erc721Bridge: {
7322
+ readonly address: "0x4200000000000000000000000000000000000014";
7323
+ };
7324
+ readonly l2StandardBridge: {
7325
+ readonly address: "0x4200000000000000000000000000000000000010";
7326
+ };
7327
+ readonly l2ToL1MessagePasser: {
7328
+ readonly address: "0x4200000000000000000000000000000000000016";
7329
+ };
7330
+ };
7331
+ ensTlds?: readonly string[] | undefined;
7332
+ id: 480;
7333
+ name: "World Chain";
7334
+ nativeCurrency: {
7335
+ readonly name: "Ether";
7336
+ readonly symbol: "ETH";
7337
+ readonly decimals: 18;
7338
+ };
7339
+ experimental_preconfirmationTime?: number | undefined | undefined;
7340
+ rpcUrls: {
7341
+ readonly default: {
7342
+ readonly http: readonly ["https://worldchain-mainnet.g.alchemy.com/public"];
7343
+ };
7344
+ };
7345
+ sourceId: 1;
7346
+ testnet: false;
7347
+ custom?: Record<string, unknown> | undefined;
7348
+ extendSchema?: Record<string, unknown> | undefined;
7349
+ fees?: viem.ChainFees<undefined> | undefined;
7350
+ formatters: {
7351
+ readonly block: {
7352
+ exclude: [] | undefined;
7353
+ format: (args: viem_chains.OpStackRpcBlock, action?: string | undefined) => {
7354
+ baseFeePerGas: bigint | null;
7355
+ blobGasUsed: bigint;
7356
+ difficulty: bigint;
7357
+ excessBlobGas: bigint;
7358
+ extraData: viem.Hex;
7359
+ gasLimit: bigint;
7360
+ gasUsed: bigint;
7361
+ hash: `0x${string}` | null;
7362
+ logsBloom: `0x${string}` | null;
7363
+ miner: viem.Address;
7364
+ mixHash: viem.Hash;
7365
+ nonce: `0x${string}` | null;
7366
+ number: bigint | null;
7367
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
7368
+ parentHash: viem.Hash;
7369
+ receiptsRoot: viem.Hex;
7370
+ sealFields: viem.Hex[];
7371
+ sha3Uncles: viem.Hash;
7372
+ size: bigint;
7373
+ stateRoot: viem.Hash;
7374
+ timestamp: bigint;
7375
+ totalDifficulty: bigint | null;
7376
+ transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[];
7377
+ transactionsRoot: viem.Hash;
7378
+ uncles: viem.Hash[];
7379
+ withdrawals?: viem.Withdrawal[] | undefined | undefined;
7380
+ withdrawalsRoot?: `0x${string}` | undefined;
7381
+ } & {};
7382
+ type: "block";
7383
+ };
7384
+ readonly transaction: {
7385
+ exclude: [] | undefined;
7386
+ format: (args: viem_chains.OpStackRpcTransaction, action?: string | undefined) => ({
7387
+ blockHash: `0x${string}` | null;
7388
+ blockNumber: bigint | null;
7389
+ from: viem.Address;
7390
+ gas: bigint;
7391
+ hash: viem.Hash;
7392
+ input: viem.Hex;
7393
+ nonce: number;
7394
+ r: viem.Hex;
7395
+ s: viem.Hex;
7396
+ to: viem.Address | null;
7397
+ transactionIndex: number | null;
7398
+ typeHex: viem.Hex | null;
7399
+ v: bigint;
7400
+ value: bigint;
7401
+ yParity: number;
7402
+ gasPrice?: undefined | undefined;
7403
+ maxFeePerBlobGas?: undefined | undefined;
7404
+ maxFeePerGas: bigint;
7405
+ maxPriorityFeePerGas: bigint;
7406
+ isSystemTx?: boolean;
7407
+ mint?: bigint | undefined | undefined;
7408
+ sourceHash: viem.Hex;
7409
+ type: "deposit";
7410
+ } | {
7411
+ r: viem.Hex;
7412
+ s: viem.Hex;
7413
+ v: bigint;
7414
+ to: viem.Address | null;
7415
+ from: viem.Address;
7416
+ gas: bigint;
7417
+ nonce: number;
7418
+ value: bigint;
7419
+ blockHash: `0x${string}` | null;
7420
+ blockNumber: bigint | null;
7421
+ hash: viem.Hash;
7422
+ input: viem.Hex;
7423
+ transactionIndex: number | null;
7424
+ typeHex: viem.Hex | null;
7425
+ accessList?: undefined | undefined;
7426
+ authorizationList?: undefined | undefined;
7427
+ blobVersionedHashes?: undefined | undefined;
7428
+ chainId?: number | undefined;
7429
+ yParity?: undefined | undefined;
7430
+ type: "legacy";
7431
+ gasPrice: bigint;
7432
+ maxFeePerBlobGas?: undefined | undefined;
7433
+ maxFeePerGas?: undefined | undefined;
7434
+ maxPriorityFeePerGas?: undefined | undefined;
7435
+ isSystemTx?: undefined | undefined;
7436
+ mint?: undefined | undefined;
7437
+ sourceHash?: undefined | undefined;
7438
+ } | {
7439
+ blockHash: `0x${string}` | null;
7440
+ blockNumber: bigint | null;
7441
+ from: viem.Address;
7442
+ gas: bigint;
7443
+ hash: viem.Hash;
7444
+ input: viem.Hex;
7445
+ nonce: number;
7446
+ r: viem.Hex;
7447
+ s: viem.Hex;
7448
+ to: viem.Address | null;
7449
+ transactionIndex: number | null;
7450
+ typeHex: viem.Hex | null;
7451
+ v: bigint;
7452
+ value: bigint;
7453
+ yParity: number;
7454
+ accessList: viem.AccessList;
7455
+ authorizationList?: undefined | undefined;
7456
+ blobVersionedHashes?: undefined | undefined;
7457
+ chainId: number;
7458
+ type: "eip2930";
7459
+ gasPrice: bigint;
7460
+ maxFeePerBlobGas?: undefined | undefined;
7461
+ maxFeePerGas?: undefined | undefined;
7462
+ maxPriorityFeePerGas?: undefined | undefined;
7463
+ isSystemTx?: undefined | undefined;
7464
+ mint?: undefined | undefined;
7465
+ sourceHash?: undefined | undefined;
7466
+ } | {
7467
+ blockHash: `0x${string}` | null;
7468
+ blockNumber: bigint | null;
7469
+ from: viem.Address;
7470
+ gas: bigint;
7471
+ hash: viem.Hash;
7472
+ input: viem.Hex;
7473
+ nonce: number;
7474
+ r: viem.Hex;
7475
+ s: viem.Hex;
7476
+ to: viem.Address | null;
7477
+ transactionIndex: number | null;
7478
+ typeHex: viem.Hex | null;
7479
+ v: bigint;
7480
+ value: bigint;
7481
+ yParity: number;
7482
+ accessList: viem.AccessList;
7483
+ authorizationList?: undefined | undefined;
7484
+ blobVersionedHashes?: undefined | undefined;
7485
+ chainId: number;
7486
+ type: "eip1559";
7487
+ gasPrice?: undefined | undefined;
7488
+ maxFeePerBlobGas?: undefined | undefined;
7489
+ maxFeePerGas: bigint;
7490
+ maxPriorityFeePerGas: bigint;
7491
+ isSystemTx?: undefined | undefined;
7492
+ mint?: undefined | undefined;
7493
+ sourceHash?: undefined | undefined;
7494
+ } | {
7495
+ blockHash: `0x${string}` | null;
7496
+ blockNumber: bigint | null;
7497
+ from: viem.Address;
7498
+ gas: bigint;
7499
+ hash: viem.Hash;
7500
+ input: viem.Hex;
7501
+ nonce: number;
7502
+ r: viem.Hex;
7503
+ s: viem.Hex;
7504
+ to: viem.Address | null;
7505
+ transactionIndex: number | null;
7506
+ typeHex: viem.Hex | null;
7507
+ v: bigint;
7508
+ value: bigint;
7509
+ yParity: number;
7510
+ accessList: viem.AccessList;
7511
+ authorizationList?: undefined | undefined;
7512
+ blobVersionedHashes: readonly viem.Hex[];
7513
+ chainId: number;
7514
+ type: "eip4844";
7515
+ gasPrice?: undefined | undefined;
7516
+ maxFeePerBlobGas: bigint;
7517
+ maxFeePerGas: bigint;
7518
+ maxPriorityFeePerGas: bigint;
7519
+ isSystemTx?: undefined | undefined;
7520
+ mint?: undefined | undefined;
7521
+ sourceHash?: undefined | undefined;
7522
+ } | {
7523
+ blockHash: `0x${string}` | null;
7524
+ blockNumber: bigint | null;
7525
+ from: viem.Address;
7526
+ gas: bigint;
7527
+ hash: viem.Hash;
7528
+ input: viem.Hex;
7529
+ nonce: number;
7530
+ r: viem.Hex;
7531
+ s: viem.Hex;
7532
+ to: viem.Address | null;
7533
+ transactionIndex: number | null;
7534
+ typeHex: viem.Hex | null;
7535
+ v: bigint;
7536
+ value: bigint;
7537
+ yParity: number;
7538
+ accessList: viem.AccessList;
7539
+ authorizationList: viem.SignedAuthorizationList;
7540
+ blobVersionedHashes?: undefined | undefined;
7541
+ chainId: number;
7542
+ type: "eip7702";
7543
+ gasPrice?: undefined | undefined;
7544
+ maxFeePerBlobGas?: undefined | undefined;
7545
+ maxFeePerGas: bigint;
7546
+ maxPriorityFeePerGas: bigint;
7547
+ isSystemTx?: undefined | undefined;
7548
+ mint?: undefined | undefined;
7549
+ sourceHash?: undefined | undefined;
7550
+ }) & {};
7551
+ type: "transaction";
7552
+ };
7553
+ readonly transactionReceipt: {
7554
+ exclude: [] | undefined;
7555
+ format: (args: viem_chains.OpStackRpcTransactionReceipt, action?: string | undefined) => {
7556
+ blobGasPrice?: bigint | undefined;
7557
+ blobGasUsed?: bigint | undefined;
7558
+ blockHash: viem.Hash;
7559
+ blockNumber: bigint;
7560
+ contractAddress: viem.Address | null | undefined;
7561
+ cumulativeGasUsed: bigint;
7562
+ effectiveGasPrice: bigint;
7563
+ from: viem.Address;
7564
+ gasUsed: bigint;
7565
+ logs: viem.Log<bigint, number, false>[];
7566
+ logsBloom: viem.Hex;
7567
+ root?: `0x${string}` | undefined;
7568
+ status: "success" | "reverted";
7569
+ to: viem.Address | null;
7570
+ transactionHash: viem.Hash;
7571
+ transactionIndex: number;
7572
+ type: viem.TransactionType;
7573
+ l1GasPrice: bigint | null;
7574
+ l1GasUsed: bigint | null;
7575
+ l1Fee: bigint | null;
7576
+ l1FeeScalar: number | null;
7577
+ } & {};
7578
+ type: "transactionReceipt";
7579
+ };
7580
+ };
7581
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
7582
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
7583
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
7584
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
7585
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
7586
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
7587
+ }] | undefined;
7588
+ serializers: {
7589
+ readonly transaction: typeof viem_chains.serializeTransactionOpStack;
7590
+ };
7591
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
7592
+ readonly network: "worldchain";
7273
7593
  } | {
7274
7594
  contracts: {
7275
7595
  multicall3: {
@@ -7898,6 +8218,7 @@ declare function getEvmChain(chain: string): {
7898
8218
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
7899
8219
  };
7900
8220
 
8221
+ declare function filterHttpRpcs(rpcs: Record<string, string[]>): Record<string, string[]>;
7901
8222
  declare const LIST_OVERRIDES: Record<string, string[]>;
7902
8223
 
7903
8224
  declare function createTransport(url: string, config?: any): viem.WebSocketTransport | viem.HttpTransport<undefined, false>;
@@ -7936,7 +8257,7 @@ interface MulticallRetryParams {
7936
8257
  overrdies?: Record<string, string[]>;
7937
8258
  logErrors?: boolean;
7938
8259
  }
7939
- declare function createMulticallRetry(customRpcs?: Record<string, string[]>): (chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, logErrors?: boolean, revertedIndices?: Set<number>) => Promise<any[]>;
8260
+ declare function createMulticallRetry(customRpcs?: Record<string, string[]>): (chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, logErrors?: boolean, revertedIndices?: Set<number>, maxSkips?: number) => Promise<any[]>;
7940
8261
  /**
7941
8262
  * @deprecated use multicallRetryUniversal instead
7942
8263
  * @see multicallRetryUniversal
@@ -7944,4 +8265,4 @@ declare function createMulticallRetry(customRpcs?: Record<string, string[]>): (c
7944
8265
  declare function multicallRetry(chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, overrdies?: Record<string, string[]>, logErrors?: boolean): Promise<any[]>;
7945
8266
  declare function multicallRetryUniversal({ chain, calls, abi, batchSize, maxRetries, providerId, allowFailure, overrdies, logErrors, }: MulticallRetryParams): Promise<any[]>;
7946
8267
 
7947
- export { DEFAULT_BATCH_SIZE, LIST_OVERRIDES, type MulticallRetryParams, createMulticallRetry, createTransport, customChains, deepCompare, getEvmChain, getEvmClient, getEvmClientUniversal, getEvmClientWithCustomRpcs, getEvmClientWithCustomRpcsUniversal, getTransport, isArray, katana, multicallRetry, multicallRetryUniversal, plasma, trimTrailingSlash, uniq };
8268
+ export { DEFAULT_BATCH_SIZE, LIST_OVERRIDES, type MulticallRetryParams, createMulticallRetry, createTransport, customChains, deepCompare, filterHttpRpcs, getEvmChain, getEvmClient, getEvmClientUniversal, getEvmClientWithCustomRpcs, getEvmClientWithCustomRpcsUniversal, getTransport, isArray, katana, multicallRetry, multicallRetryUniversal, plasma, trimTrailingSlash, uniq };
package/dist/index.d.ts CHANGED
@@ -7270,6 +7270,326 @@ declare function getEvmChain(chain: string): {
7270
7270
  }] | undefined;
7271
7271
  serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
7272
7272
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
7273
+ } | {
7274
+ blockExplorers: {
7275
+ readonly default: {
7276
+ readonly name: "Worldscan";
7277
+ readonly url: "https://worldscan.org";
7278
+ readonly apiUrl: "https://api.worldscan.org/api";
7279
+ };
7280
+ readonly blockscout: {
7281
+ readonly name: "Blockscout";
7282
+ readonly url: "https://worldchain-mainnet.explorer.alchemy.com";
7283
+ readonly apiUrl: "https://worldchain-mainnet.explorer.alchemy.com/api";
7284
+ };
7285
+ };
7286
+ blockTime: 2000;
7287
+ contracts: {
7288
+ readonly multicall3: {
7289
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
7290
+ readonly blockCreated: 0;
7291
+ };
7292
+ readonly disputeGameFactory: {
7293
+ readonly 1: {
7294
+ readonly address: "0x069c4c579671f8c120b1327a73217D01Ea2EC5ea";
7295
+ };
7296
+ };
7297
+ readonly l2OutputOracle: {
7298
+ readonly 1: {
7299
+ readonly address: "0x19A6d1E9034596196295CF148509796978343c5D";
7300
+ };
7301
+ };
7302
+ readonly portal: {
7303
+ readonly 1: {
7304
+ readonly address: "0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C";
7305
+ };
7306
+ };
7307
+ readonly l1StandardBridge: {
7308
+ readonly 1: {
7309
+ readonly address: "0x470458C91978D2d929704489Ad730DC3E3001113";
7310
+ };
7311
+ };
7312
+ readonly gasPriceOracle: {
7313
+ readonly address: "0x420000000000000000000000000000000000000F";
7314
+ };
7315
+ readonly l1Block: {
7316
+ readonly address: "0x4200000000000000000000000000000000000015";
7317
+ };
7318
+ readonly l2CrossDomainMessenger: {
7319
+ readonly address: "0x4200000000000000000000000000000000000007";
7320
+ };
7321
+ readonly l2Erc721Bridge: {
7322
+ readonly address: "0x4200000000000000000000000000000000000014";
7323
+ };
7324
+ readonly l2StandardBridge: {
7325
+ readonly address: "0x4200000000000000000000000000000000000010";
7326
+ };
7327
+ readonly l2ToL1MessagePasser: {
7328
+ readonly address: "0x4200000000000000000000000000000000000016";
7329
+ };
7330
+ };
7331
+ ensTlds?: readonly string[] | undefined;
7332
+ id: 480;
7333
+ name: "World Chain";
7334
+ nativeCurrency: {
7335
+ readonly name: "Ether";
7336
+ readonly symbol: "ETH";
7337
+ readonly decimals: 18;
7338
+ };
7339
+ experimental_preconfirmationTime?: number | undefined | undefined;
7340
+ rpcUrls: {
7341
+ readonly default: {
7342
+ readonly http: readonly ["https://worldchain-mainnet.g.alchemy.com/public"];
7343
+ };
7344
+ };
7345
+ sourceId: 1;
7346
+ testnet: false;
7347
+ custom?: Record<string, unknown> | undefined;
7348
+ extendSchema?: Record<string, unknown> | undefined;
7349
+ fees?: viem.ChainFees<undefined> | undefined;
7350
+ formatters: {
7351
+ readonly block: {
7352
+ exclude: [] | undefined;
7353
+ format: (args: viem_chains.OpStackRpcBlock, action?: string | undefined) => {
7354
+ baseFeePerGas: bigint | null;
7355
+ blobGasUsed: bigint;
7356
+ difficulty: bigint;
7357
+ excessBlobGas: bigint;
7358
+ extraData: viem.Hex;
7359
+ gasLimit: bigint;
7360
+ gasUsed: bigint;
7361
+ hash: `0x${string}` | null;
7362
+ logsBloom: `0x${string}` | null;
7363
+ miner: viem.Address;
7364
+ mixHash: viem.Hash;
7365
+ nonce: `0x${string}` | null;
7366
+ number: bigint | null;
7367
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
7368
+ parentHash: viem.Hash;
7369
+ receiptsRoot: viem.Hex;
7370
+ sealFields: viem.Hex[];
7371
+ sha3Uncles: viem.Hash;
7372
+ size: bigint;
7373
+ stateRoot: viem.Hash;
7374
+ timestamp: bigint;
7375
+ totalDifficulty: bigint | null;
7376
+ transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[];
7377
+ transactionsRoot: viem.Hash;
7378
+ uncles: viem.Hash[];
7379
+ withdrawals?: viem.Withdrawal[] | undefined | undefined;
7380
+ withdrawalsRoot?: `0x${string}` | undefined;
7381
+ } & {};
7382
+ type: "block";
7383
+ };
7384
+ readonly transaction: {
7385
+ exclude: [] | undefined;
7386
+ format: (args: viem_chains.OpStackRpcTransaction, action?: string | undefined) => ({
7387
+ blockHash: `0x${string}` | null;
7388
+ blockNumber: bigint | null;
7389
+ from: viem.Address;
7390
+ gas: bigint;
7391
+ hash: viem.Hash;
7392
+ input: viem.Hex;
7393
+ nonce: number;
7394
+ r: viem.Hex;
7395
+ s: viem.Hex;
7396
+ to: viem.Address | null;
7397
+ transactionIndex: number | null;
7398
+ typeHex: viem.Hex | null;
7399
+ v: bigint;
7400
+ value: bigint;
7401
+ yParity: number;
7402
+ gasPrice?: undefined | undefined;
7403
+ maxFeePerBlobGas?: undefined | undefined;
7404
+ maxFeePerGas: bigint;
7405
+ maxPriorityFeePerGas: bigint;
7406
+ isSystemTx?: boolean;
7407
+ mint?: bigint | undefined | undefined;
7408
+ sourceHash: viem.Hex;
7409
+ type: "deposit";
7410
+ } | {
7411
+ r: viem.Hex;
7412
+ s: viem.Hex;
7413
+ v: bigint;
7414
+ to: viem.Address | null;
7415
+ from: viem.Address;
7416
+ gas: bigint;
7417
+ nonce: number;
7418
+ value: bigint;
7419
+ blockHash: `0x${string}` | null;
7420
+ blockNumber: bigint | null;
7421
+ hash: viem.Hash;
7422
+ input: viem.Hex;
7423
+ transactionIndex: number | null;
7424
+ typeHex: viem.Hex | null;
7425
+ accessList?: undefined | undefined;
7426
+ authorizationList?: undefined | undefined;
7427
+ blobVersionedHashes?: undefined | undefined;
7428
+ chainId?: number | undefined;
7429
+ yParity?: undefined | undefined;
7430
+ type: "legacy";
7431
+ gasPrice: bigint;
7432
+ maxFeePerBlobGas?: undefined | undefined;
7433
+ maxFeePerGas?: undefined | undefined;
7434
+ maxPriorityFeePerGas?: undefined | undefined;
7435
+ isSystemTx?: undefined | undefined;
7436
+ mint?: undefined | undefined;
7437
+ sourceHash?: undefined | undefined;
7438
+ } | {
7439
+ blockHash: `0x${string}` | null;
7440
+ blockNumber: bigint | null;
7441
+ from: viem.Address;
7442
+ gas: bigint;
7443
+ hash: viem.Hash;
7444
+ input: viem.Hex;
7445
+ nonce: number;
7446
+ r: viem.Hex;
7447
+ s: viem.Hex;
7448
+ to: viem.Address | null;
7449
+ transactionIndex: number | null;
7450
+ typeHex: viem.Hex | null;
7451
+ v: bigint;
7452
+ value: bigint;
7453
+ yParity: number;
7454
+ accessList: viem.AccessList;
7455
+ authorizationList?: undefined | undefined;
7456
+ blobVersionedHashes?: undefined | undefined;
7457
+ chainId: number;
7458
+ type: "eip2930";
7459
+ gasPrice: bigint;
7460
+ maxFeePerBlobGas?: undefined | undefined;
7461
+ maxFeePerGas?: undefined | undefined;
7462
+ maxPriorityFeePerGas?: undefined | undefined;
7463
+ isSystemTx?: undefined | undefined;
7464
+ mint?: undefined | undefined;
7465
+ sourceHash?: undefined | undefined;
7466
+ } | {
7467
+ blockHash: `0x${string}` | null;
7468
+ blockNumber: bigint | null;
7469
+ from: viem.Address;
7470
+ gas: bigint;
7471
+ hash: viem.Hash;
7472
+ input: viem.Hex;
7473
+ nonce: number;
7474
+ r: viem.Hex;
7475
+ s: viem.Hex;
7476
+ to: viem.Address | null;
7477
+ transactionIndex: number | null;
7478
+ typeHex: viem.Hex | null;
7479
+ v: bigint;
7480
+ value: bigint;
7481
+ yParity: number;
7482
+ accessList: viem.AccessList;
7483
+ authorizationList?: undefined | undefined;
7484
+ blobVersionedHashes?: undefined | undefined;
7485
+ chainId: number;
7486
+ type: "eip1559";
7487
+ gasPrice?: undefined | undefined;
7488
+ maxFeePerBlobGas?: undefined | undefined;
7489
+ maxFeePerGas: bigint;
7490
+ maxPriorityFeePerGas: bigint;
7491
+ isSystemTx?: undefined | undefined;
7492
+ mint?: undefined | undefined;
7493
+ sourceHash?: undefined | undefined;
7494
+ } | {
7495
+ blockHash: `0x${string}` | null;
7496
+ blockNumber: bigint | null;
7497
+ from: viem.Address;
7498
+ gas: bigint;
7499
+ hash: viem.Hash;
7500
+ input: viem.Hex;
7501
+ nonce: number;
7502
+ r: viem.Hex;
7503
+ s: viem.Hex;
7504
+ to: viem.Address | null;
7505
+ transactionIndex: number | null;
7506
+ typeHex: viem.Hex | null;
7507
+ v: bigint;
7508
+ value: bigint;
7509
+ yParity: number;
7510
+ accessList: viem.AccessList;
7511
+ authorizationList?: undefined | undefined;
7512
+ blobVersionedHashes: readonly viem.Hex[];
7513
+ chainId: number;
7514
+ type: "eip4844";
7515
+ gasPrice?: undefined | undefined;
7516
+ maxFeePerBlobGas: bigint;
7517
+ maxFeePerGas: bigint;
7518
+ maxPriorityFeePerGas: bigint;
7519
+ isSystemTx?: undefined | undefined;
7520
+ mint?: undefined | undefined;
7521
+ sourceHash?: undefined | undefined;
7522
+ } | {
7523
+ blockHash: `0x${string}` | null;
7524
+ blockNumber: bigint | null;
7525
+ from: viem.Address;
7526
+ gas: bigint;
7527
+ hash: viem.Hash;
7528
+ input: viem.Hex;
7529
+ nonce: number;
7530
+ r: viem.Hex;
7531
+ s: viem.Hex;
7532
+ to: viem.Address | null;
7533
+ transactionIndex: number | null;
7534
+ typeHex: viem.Hex | null;
7535
+ v: bigint;
7536
+ value: bigint;
7537
+ yParity: number;
7538
+ accessList: viem.AccessList;
7539
+ authorizationList: viem.SignedAuthorizationList;
7540
+ blobVersionedHashes?: undefined | undefined;
7541
+ chainId: number;
7542
+ type: "eip7702";
7543
+ gasPrice?: undefined | undefined;
7544
+ maxFeePerBlobGas?: undefined | undefined;
7545
+ maxFeePerGas: bigint;
7546
+ maxPriorityFeePerGas: bigint;
7547
+ isSystemTx?: undefined | undefined;
7548
+ mint?: undefined | undefined;
7549
+ sourceHash?: undefined | undefined;
7550
+ }) & {};
7551
+ type: "transaction";
7552
+ };
7553
+ readonly transactionReceipt: {
7554
+ exclude: [] | undefined;
7555
+ format: (args: viem_chains.OpStackRpcTransactionReceipt, action?: string | undefined) => {
7556
+ blobGasPrice?: bigint | undefined;
7557
+ blobGasUsed?: bigint | undefined;
7558
+ blockHash: viem.Hash;
7559
+ blockNumber: bigint;
7560
+ contractAddress: viem.Address | null | undefined;
7561
+ cumulativeGasUsed: bigint;
7562
+ effectiveGasPrice: bigint;
7563
+ from: viem.Address;
7564
+ gasUsed: bigint;
7565
+ logs: viem.Log<bigint, number, false>[];
7566
+ logsBloom: viem.Hex;
7567
+ root?: `0x${string}` | undefined;
7568
+ status: "success" | "reverted";
7569
+ to: viem.Address | null;
7570
+ transactionHash: viem.Hash;
7571
+ transactionIndex: number;
7572
+ type: viem.TransactionType;
7573
+ l1GasPrice: bigint | null;
7574
+ l1GasUsed: bigint | null;
7575
+ l1Fee: bigint | null;
7576
+ l1FeeScalar: number | null;
7577
+ } & {};
7578
+ type: "transactionReceipt";
7579
+ };
7580
+ };
7581
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
7582
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
7583
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
7584
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
7585
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
7586
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
7587
+ }] | undefined;
7588
+ serializers: {
7589
+ readonly transaction: typeof viem_chains.serializeTransactionOpStack;
7590
+ };
7591
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
7592
+ readonly network: "worldchain";
7273
7593
  } | {
7274
7594
  contracts: {
7275
7595
  multicall3: {
@@ -7898,6 +8218,7 @@ declare function getEvmChain(chain: string): {
7898
8218
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
7899
8219
  };
7900
8220
 
8221
+ declare function filterHttpRpcs(rpcs: Record<string, string[]>): Record<string, string[]>;
7901
8222
  declare const LIST_OVERRIDES: Record<string, string[]>;
7902
8223
 
7903
8224
  declare function createTransport(url: string, config?: any): viem.WebSocketTransport | viem.HttpTransport<undefined, false>;
@@ -7936,7 +8257,7 @@ interface MulticallRetryParams {
7936
8257
  overrdies?: Record<string, string[]>;
7937
8258
  logErrors?: boolean;
7938
8259
  }
7939
- declare function createMulticallRetry(customRpcs?: Record<string, string[]>): (chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, logErrors?: boolean, revertedIndices?: Set<number>) => Promise<any[]>;
8260
+ declare function createMulticallRetry(customRpcs?: Record<string, string[]>): (chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, logErrors?: boolean, revertedIndices?: Set<number>, maxSkips?: number) => Promise<any[]>;
7940
8261
  /**
7941
8262
  * @deprecated use multicallRetryUniversal instead
7942
8263
  * @see multicallRetryUniversal
@@ -7944,4 +8265,4 @@ declare function createMulticallRetry(customRpcs?: Record<string, string[]>): (c
7944
8265
  declare function multicallRetry(chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, overrdies?: Record<string, string[]>, logErrors?: boolean): Promise<any[]>;
7945
8266
  declare function multicallRetryUniversal({ chain, calls, abi, batchSize, maxRetries, providerId, allowFailure, overrdies, logErrors, }: MulticallRetryParams): Promise<any[]>;
7946
8267
 
7947
- export { DEFAULT_BATCH_SIZE, LIST_OVERRIDES, type MulticallRetryParams, createMulticallRetry, createTransport, customChains, deepCompare, getEvmChain, getEvmClient, getEvmClientUniversal, getEvmClientWithCustomRpcs, getEvmClientWithCustomRpcsUniversal, getTransport, isArray, katana, multicallRetry, multicallRetryUniversal, plasma, trimTrailingSlash, uniq };
8268
+ export { DEFAULT_BATCH_SIZE, LIST_OVERRIDES, type MulticallRetryParams, createMulticallRetry, createTransport, customChains, deepCompare, filterHttpRpcs, getEvmChain, getEvmClient, getEvmClientUniversal, getEvmClientWithCustomRpcs, getEvmClientWithCustomRpcsUniversal, getTransport, isArray, katana, multicallRetry, multicallRetryUniversal, plasma, trimTrailingSlash, uniq };
package/dist/index.js CHANGED
@@ -13424,6 +13424,7 @@ __export(index_exports, {
13424
13424
  createTransport: () => createTransport2,
13425
13425
  customChains: () => customChains,
13426
13426
  deepCompare: () => deepCompare,
13427
+ filterHttpRpcs: () => filterHttpRpcs,
13427
13428
  getEvmChain: () => getEvmChain,
13428
13429
  getEvmClient: () => getEvmClient,
13429
13430
  getEvmClientUniversal: () => getEvmClientUniversal,
@@ -24299,6 +24300,60 @@ var vanar = /* @__PURE__ */ defineChain({
24299
24300
  testnet: false
24300
24301
  });
24301
24302
 
24303
+ // ../../node_modules/.pnpm/viem@2.45.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/chains/definitions/worldchain.js
24304
+ var sourceId13 = 1;
24305
+ var worldchain = /* @__PURE__ */ defineChain({
24306
+ ...chainConfig2,
24307
+ id: 480,
24308
+ name: "World Chain",
24309
+ network: "worldchain",
24310
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
24311
+ rpcUrls: {
24312
+ default: { http: ["https://worldchain-mainnet.g.alchemy.com/public"] }
24313
+ },
24314
+ blockExplorers: {
24315
+ default: {
24316
+ name: "Worldscan",
24317
+ url: "https://worldscan.org",
24318
+ apiUrl: "https://api.worldscan.org/api"
24319
+ },
24320
+ blockscout: {
24321
+ name: "Blockscout",
24322
+ url: "https://worldchain-mainnet.explorer.alchemy.com",
24323
+ apiUrl: "https://worldchain-mainnet.explorer.alchemy.com/api"
24324
+ }
24325
+ },
24326
+ contracts: {
24327
+ ...chainConfig2.contracts,
24328
+ multicall3: {
24329
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
24330
+ blockCreated: 0
24331
+ },
24332
+ disputeGameFactory: {
24333
+ [sourceId13]: {
24334
+ address: "0x069c4c579671f8c120b1327a73217D01Ea2EC5ea"
24335
+ }
24336
+ },
24337
+ l2OutputOracle: {
24338
+ [sourceId13]: {
24339
+ address: "0x19A6d1E9034596196295CF148509796978343c5D"
24340
+ }
24341
+ },
24342
+ portal: {
24343
+ [sourceId13]: {
24344
+ address: "0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"
24345
+ }
24346
+ },
24347
+ l1StandardBridge: {
24348
+ [sourceId13]: {
24349
+ address: "0x470458C91978D2d929704489Ad730DC3E3001113"
24350
+ }
24351
+ }
24352
+ },
24353
+ testnet: false,
24354
+ sourceId: sourceId13
24355
+ });
24356
+
24302
24357
  // ../../node_modules/.pnpm/viem@2.45.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/chains/definitions/xdc.js
24303
24358
  var xdc = /* @__PURE__ */ defineChain({
24304
24359
  id: 50,
@@ -24382,7 +24437,7 @@ var zetachain = /* @__PURE__ */ defineChain({
24382
24437
  });
24383
24438
 
24384
24439
  // ../../node_modules/.pnpm/viem@2.45.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/chains/definitions/zircuit.js
24385
- var sourceId13 = 1;
24440
+ var sourceId14 = 1;
24386
24441
  var zircuit = /* @__PURE__ */ defineChain({
24387
24442
  ...chainConfig2,
24388
24443
  id: 48900,
@@ -24413,17 +24468,17 @@ var zircuit = /* @__PURE__ */ defineChain({
24413
24468
  address: "0xcA11bde05977b3631167028862bE2a173976CA11"
24414
24469
  },
24415
24470
  l2OutputOracle: {
24416
- [sourceId13]: {
24471
+ [sourceId14]: {
24417
24472
  address: "0x92Ef6Af472b39F1b363da45E35530c24619245A4"
24418
24473
  }
24419
24474
  },
24420
24475
  portal: {
24421
- [sourceId13]: {
24476
+ [sourceId14]: {
24422
24477
  address: "0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"
24423
24478
  }
24424
24479
  },
24425
24480
  l1StandardBridge: {
24426
- [sourceId13]: {
24481
+ [sourceId14]: {
24427
24482
  address: "0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"
24428
24483
  }
24429
24484
  }
@@ -24710,6 +24765,8 @@ function getEvmChain(chain) {
24710
24765
  return plasma;
24711
24766
  case import_chain_registry.Chain.MOONBEAM:
24712
24767
  return moonbeam;
24768
+ case import_chain_registry.Chain.WORLD_CHAIN:
24769
+ return worldchain;
24713
24770
  case import_chain_registry.Chain.MONAD_MAINNET:
24714
24771
  return customChains.monadMainnet;
24715
24772
  case import_chain_registry.Chain.ZKLINK_NOVA_MAINNET:
@@ -24729,6 +24786,14 @@ function getEvmChain(chain) {
24729
24786
 
24730
24787
  // src/rpc/rpcOverrides.ts
24731
24788
  var import_chain_registry2 = require("@1delta/chain-registry");
24789
+ function filterHttpRpcs(rpcs) {
24790
+ return Object.fromEntries(
24791
+ Object.entries(rpcs).map(([chain, urls]) => [
24792
+ chain,
24793
+ urls.filter((url) => !url.startsWith("wss://"))
24794
+ ])
24795
+ );
24796
+ }
24732
24797
  var LIST_OVERRIDES = {
24733
24798
  [import_chain_registry2.Chain.BASE]: [
24734
24799
  "https://base-rpc.publicnode.com",
@@ -24744,8 +24809,7 @@ var LIST_OVERRIDES = {
24744
24809
  "https://api.zan.top/base-mainnet",
24745
24810
  "https://endpoints.omniatech.io/v1/base/mainnet/public",
24746
24811
  "https://base.lava.build",
24747
- "https://0xrpc.io/base",
24748
- "https://base.therpc.io"
24812
+ "https://0xrpc.io/base"
24749
24813
  ],
24750
24814
  [import_chain_registry2.Chain.POLYGON_MAINNET]: [
24751
24815
  "https://polygon-bor-rpc.publicnode.com",
@@ -24753,7 +24817,6 @@ var LIST_OVERRIDES = {
24753
24817
  "https://polygon.drpc.org",
24754
24818
  "https://gateway.tenderly.co/public/polygon",
24755
24819
  "https://endpoints.omniatech.io/v1/matic/mainnet/public",
24756
- "https://polygon.therpc.io",
24757
24820
  "https://rpc-mainnet.matic.quiknode.pro",
24758
24821
  "https://polygon-pokt.nodies.app",
24759
24822
  "https://polygon.gateway.tenderly.co",
@@ -24808,14 +24871,12 @@ var LIST_OVERRIDES = {
24808
24871
  "https://scroll.drpc.org",
24809
24872
  "https://scroll.api.onfinality.io/public",
24810
24873
  "https://endpoints.omniatech.io/v1/scroll/mainnet/public",
24811
- "https://scroll-rpc.publicnode.com",
24812
- "https://scroll.therpc.io"
24874
+ "https://scroll-rpc.publicnode.com"
24813
24875
  ],
24814
24876
  [import_chain_registry2.Chain.SONIC_MAINNET]: [
24815
24877
  "https://sonic.api.onfinality.io/public",
24816
24878
  "https://sonic-rpc.publicnode.com",
24817
24879
  "https://rpc.soniclabs.com",
24818
- "https://sonic.therpc.io",
24819
24880
  "https://sonic.drpc.org",
24820
24881
  "https://sonic-json-rpc.stakely.io"
24821
24882
  ],
@@ -24877,8 +24938,7 @@ var LIST_OVERRIDES = {
24877
24938
  "https://arbitrum.public.blockpi.network/v1/rpc/public",
24878
24939
  "https://1rpc.io/arb",
24879
24940
  "https://arbitrum.api.onfinality.io/public",
24880
- "https://0xrpc.io/arb",
24881
- "https://arbitrum.therpc.io"
24941
+ "https://0xrpc.io/arb"
24882
24942
  ],
24883
24943
  [import_chain_registry2.Chain.LINEA]: [
24884
24944
  "https://rpc.linea.build",
@@ -25109,6 +25169,10 @@ function getEvmClientWithCustomRpcsUniversal({
25109
25169
  }
25110
25170
 
25111
25171
  // src/multicall/multicall.ts
25172
+ function isTransportError(e) {
25173
+ const msg = e instanceof Error ? (e.message ?? "") + (e.details ?? "") : "";
25174
+ return msg.includes("is not a constructor") || msg.includes("Dynamic require") || msg.includes("is not supported");
25175
+ }
25112
25176
  function isContractRevert(e) {
25113
25177
  if (!(e instanceof BaseError2)) return false;
25114
25178
  let err = e;
@@ -25122,7 +25186,7 @@ function isContractRevert(e) {
25122
25186
  return false;
25123
25187
  }
25124
25188
  function createMulticallRetry(customRpcs = LIST_OVERRIDES) {
25125
- return async function multicallRetry2(chain, calls, abi2, batchSize = DEFAULT_BATCH_SIZE, maxRetries = 3, providerId = 0, allowFailure = true, logErrors = false, revertedIndices = /* @__PURE__ */ new Set()) {
25189
+ return async function multicallRetry2(chain, calls, abi2, batchSize = DEFAULT_BATCH_SIZE, maxRetries = 3, providerId = 0, allowFailure = true, logErrors = false, revertedIndices = /* @__PURE__ */ new Set(), maxSkips = 3) {
25126
25190
  const abiIsArray = isArray(abi2[0]);
25127
25191
  try {
25128
25192
  const nonRevertedIndices = calls.map((_, i) => i).filter((i) => !revertedIndices.has(i));
@@ -25196,6 +25260,21 @@ function createMulticallRetry(customRpcs = LIST_OVERRIDES) {
25196
25260
  );
25197
25261
  }
25198
25262
  }
25263
+ if (isTransportError(e) && maxSkips > 0) {
25264
+ if (logErrors) console.debug(e);
25265
+ return await multicallRetry2(
25266
+ chain,
25267
+ calls,
25268
+ abi2,
25269
+ batchSize,
25270
+ maxRetries,
25271
+ providerId + 1,
25272
+ allowFailure,
25273
+ logErrors,
25274
+ revertedIndices,
25275
+ maxSkips - 1
25276
+ );
25277
+ }
25199
25278
  if (maxRetries === 0) {
25200
25279
  if (!allowFailure) throw e;
25201
25280
  if (logErrors) console.debug(e);
@@ -25211,7 +25290,8 @@ function createMulticallRetry(customRpcs = LIST_OVERRIDES) {
25211
25290
  providerId + 1,
25212
25291
  allowFailure,
25213
25292
  logErrors,
25214
- revertedIndices
25293
+ revertedIndices,
25294
+ maxSkips
25215
25295
  );
25216
25296
  }
25217
25297
  };
@@ -25273,6 +25353,7 @@ async function multicallRetryUniversal({
25273
25353
  createTransport,
25274
25354
  customChains,
25275
25355
  deepCompare,
25356
+ filterHttpRpcs,
25276
25357
  getEvmChain,
25277
25358
  getEvmClient,
25278
25359
  getEvmClientUniversal,
package/dist/index.mjs CHANGED
@@ -10575,6 +10575,60 @@ var vanar = /* @__PURE__ */ defineChain({
10575
10575
  testnet: false
10576
10576
  });
10577
10577
 
10578
+ // ../../node_modules/.pnpm/viem@2.45.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/chains/definitions/worldchain.js
10579
+ var sourceId13 = 1;
10580
+ var worldchain = /* @__PURE__ */ defineChain({
10581
+ ...chainConfig2,
10582
+ id: 480,
10583
+ name: "World Chain",
10584
+ network: "worldchain",
10585
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
10586
+ rpcUrls: {
10587
+ default: { http: ["https://worldchain-mainnet.g.alchemy.com/public"] }
10588
+ },
10589
+ blockExplorers: {
10590
+ default: {
10591
+ name: "Worldscan",
10592
+ url: "https://worldscan.org",
10593
+ apiUrl: "https://api.worldscan.org/api"
10594
+ },
10595
+ blockscout: {
10596
+ name: "Blockscout",
10597
+ url: "https://worldchain-mainnet.explorer.alchemy.com",
10598
+ apiUrl: "https://worldchain-mainnet.explorer.alchemy.com/api"
10599
+ }
10600
+ },
10601
+ contracts: {
10602
+ ...chainConfig2.contracts,
10603
+ multicall3: {
10604
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
10605
+ blockCreated: 0
10606
+ },
10607
+ disputeGameFactory: {
10608
+ [sourceId13]: {
10609
+ address: "0x069c4c579671f8c120b1327a73217D01Ea2EC5ea"
10610
+ }
10611
+ },
10612
+ l2OutputOracle: {
10613
+ [sourceId13]: {
10614
+ address: "0x19A6d1E9034596196295CF148509796978343c5D"
10615
+ }
10616
+ },
10617
+ portal: {
10618
+ [sourceId13]: {
10619
+ address: "0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"
10620
+ }
10621
+ },
10622
+ l1StandardBridge: {
10623
+ [sourceId13]: {
10624
+ address: "0x470458C91978D2d929704489Ad730DC3E3001113"
10625
+ }
10626
+ }
10627
+ },
10628
+ testnet: false,
10629
+ sourceId: sourceId13
10630
+ });
10631
+
10578
10632
  // ../../node_modules/.pnpm/viem@2.45.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/chains/definitions/xdc.js
10579
10633
  var xdc = /* @__PURE__ */ defineChain({
10580
10634
  id: 50,
@@ -10658,7 +10712,7 @@ var zetachain = /* @__PURE__ */ defineChain({
10658
10712
  });
10659
10713
 
10660
10714
  // ../../node_modules/.pnpm/viem@2.45.1_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/viem/_esm/chains/definitions/zircuit.js
10661
- var sourceId13 = 1;
10715
+ var sourceId14 = 1;
10662
10716
  var zircuit = /* @__PURE__ */ defineChain({
10663
10717
  ...chainConfig2,
10664
10718
  id: 48900,
@@ -10689,17 +10743,17 @@ var zircuit = /* @__PURE__ */ defineChain({
10689
10743
  address: "0xcA11bde05977b3631167028862bE2a173976CA11"
10690
10744
  },
10691
10745
  l2OutputOracle: {
10692
- [sourceId13]: {
10746
+ [sourceId14]: {
10693
10747
  address: "0x92Ef6Af472b39F1b363da45E35530c24619245A4"
10694
10748
  }
10695
10749
  },
10696
10750
  portal: {
10697
- [sourceId13]: {
10751
+ [sourceId14]: {
10698
10752
  address: "0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"
10699
10753
  }
10700
10754
  },
10701
10755
  l1StandardBridge: {
10702
- [sourceId13]: {
10756
+ [sourceId14]: {
10703
10757
  address: "0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"
10704
10758
  }
10705
10759
  }
@@ -10986,6 +11040,8 @@ function getEvmChain(chain) {
10986
11040
  return plasma;
10987
11041
  case Chain.MOONBEAM:
10988
11042
  return moonbeam;
11043
+ case Chain.WORLD_CHAIN:
11044
+ return worldchain;
10989
11045
  case Chain.MONAD_MAINNET:
10990
11046
  return customChains.monadMainnet;
10991
11047
  case Chain.ZKLINK_NOVA_MAINNET:
@@ -11005,6 +11061,14 @@ function getEvmChain(chain) {
11005
11061
 
11006
11062
  // src/rpc/rpcOverrides.ts
11007
11063
  import { Chain as Chain2 } from "@1delta/chain-registry";
11064
+ function filterHttpRpcs(rpcs) {
11065
+ return Object.fromEntries(
11066
+ Object.entries(rpcs).map(([chain, urls]) => [
11067
+ chain,
11068
+ urls.filter((url) => !url.startsWith("wss://"))
11069
+ ])
11070
+ );
11071
+ }
11008
11072
  var LIST_OVERRIDES = {
11009
11073
  [Chain2.BASE]: [
11010
11074
  "https://base-rpc.publicnode.com",
@@ -11020,8 +11084,7 @@ var LIST_OVERRIDES = {
11020
11084
  "https://api.zan.top/base-mainnet",
11021
11085
  "https://endpoints.omniatech.io/v1/base/mainnet/public",
11022
11086
  "https://base.lava.build",
11023
- "https://0xrpc.io/base",
11024
- "https://base.therpc.io"
11087
+ "https://0xrpc.io/base"
11025
11088
  ],
11026
11089
  [Chain2.POLYGON_MAINNET]: [
11027
11090
  "https://polygon-bor-rpc.publicnode.com",
@@ -11029,7 +11092,6 @@ var LIST_OVERRIDES = {
11029
11092
  "https://polygon.drpc.org",
11030
11093
  "https://gateway.tenderly.co/public/polygon",
11031
11094
  "https://endpoints.omniatech.io/v1/matic/mainnet/public",
11032
- "https://polygon.therpc.io",
11033
11095
  "https://rpc-mainnet.matic.quiknode.pro",
11034
11096
  "https://polygon-pokt.nodies.app",
11035
11097
  "https://polygon.gateway.tenderly.co",
@@ -11084,14 +11146,12 @@ var LIST_OVERRIDES = {
11084
11146
  "https://scroll.drpc.org",
11085
11147
  "https://scroll.api.onfinality.io/public",
11086
11148
  "https://endpoints.omniatech.io/v1/scroll/mainnet/public",
11087
- "https://scroll-rpc.publicnode.com",
11088
- "https://scroll.therpc.io"
11149
+ "https://scroll-rpc.publicnode.com"
11089
11150
  ],
11090
11151
  [Chain2.SONIC_MAINNET]: [
11091
11152
  "https://sonic.api.onfinality.io/public",
11092
11153
  "https://sonic-rpc.publicnode.com",
11093
11154
  "https://rpc.soniclabs.com",
11094
- "https://sonic.therpc.io",
11095
11155
  "https://sonic.drpc.org",
11096
11156
  "https://sonic-json-rpc.stakely.io"
11097
11157
  ],
@@ -11153,8 +11213,7 @@ var LIST_OVERRIDES = {
11153
11213
  "https://arbitrum.public.blockpi.network/v1/rpc/public",
11154
11214
  "https://1rpc.io/arb",
11155
11215
  "https://arbitrum.api.onfinality.io/public",
11156
- "https://0xrpc.io/arb",
11157
- "https://arbitrum.therpc.io"
11216
+ "https://0xrpc.io/arb"
11158
11217
  ],
11159
11218
  [Chain2.LINEA]: [
11160
11219
  "https://rpc.linea.build",
@@ -11385,6 +11444,10 @@ function getEvmClientWithCustomRpcsUniversal({
11385
11444
  }
11386
11445
 
11387
11446
  // src/multicall/multicall.ts
11447
+ function isTransportError(e) {
11448
+ const msg = e instanceof Error ? (e.message ?? "") + (e.details ?? "") : "";
11449
+ return msg.includes("is not a constructor") || msg.includes("Dynamic require") || msg.includes("is not supported");
11450
+ }
11388
11451
  function isContractRevert(e) {
11389
11452
  if (!(e instanceof BaseError)) return false;
11390
11453
  let err = e;
@@ -11398,7 +11461,7 @@ function isContractRevert(e) {
11398
11461
  return false;
11399
11462
  }
11400
11463
  function createMulticallRetry(customRpcs = LIST_OVERRIDES) {
11401
- return async function multicallRetry2(chain, calls, abi2, batchSize = DEFAULT_BATCH_SIZE, maxRetries = 3, providerId = 0, allowFailure = true, logErrors = false, revertedIndices = /* @__PURE__ */ new Set()) {
11464
+ return async function multicallRetry2(chain, calls, abi2, batchSize = DEFAULT_BATCH_SIZE, maxRetries = 3, providerId = 0, allowFailure = true, logErrors = false, revertedIndices = /* @__PURE__ */ new Set(), maxSkips = 3) {
11402
11465
  const abiIsArray = isArray(abi2[0]);
11403
11466
  try {
11404
11467
  const nonRevertedIndices = calls.map((_, i) => i).filter((i) => !revertedIndices.has(i));
@@ -11472,6 +11535,21 @@ function createMulticallRetry(customRpcs = LIST_OVERRIDES) {
11472
11535
  );
11473
11536
  }
11474
11537
  }
11538
+ if (isTransportError(e) && maxSkips > 0) {
11539
+ if (logErrors) console.debug(e);
11540
+ return await multicallRetry2(
11541
+ chain,
11542
+ calls,
11543
+ abi2,
11544
+ batchSize,
11545
+ maxRetries,
11546
+ providerId + 1,
11547
+ allowFailure,
11548
+ logErrors,
11549
+ revertedIndices,
11550
+ maxSkips - 1
11551
+ );
11552
+ }
11475
11553
  if (maxRetries === 0) {
11476
11554
  if (!allowFailure) throw e;
11477
11555
  if (logErrors) console.debug(e);
@@ -11487,7 +11565,8 @@ function createMulticallRetry(customRpcs = LIST_OVERRIDES) {
11487
11565
  providerId + 1,
11488
11566
  allowFailure,
11489
11567
  logErrors,
11490
- revertedIndices
11568
+ revertedIndices,
11569
+ maxSkips
11491
11570
  );
11492
11571
  }
11493
11572
  };
@@ -11548,6 +11627,7 @@ export {
11548
11627
  createTransport2 as createTransport,
11549
11628
  customChains,
11550
11629
  deepCompare,
11630
+ filterHttpRpcs,
11551
11631
  getEvmChain,
11552
11632
  getEvmClient,
11553
11633
  getEvmClientUniversal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1delta/providers",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -18,8 +18,8 @@
18
18
  "license": "ISC",
19
19
  "dependencies": {
20
20
  "vitest": "^4.0.18",
21
- "@1delta/chain-registry": "0.0.4",
22
- "@1delta/data-sdk": "0.0.14"
21
+ "@1delta/data-sdk": "0.0.14",
22
+ "@1delta/chain-registry": "0.0.4"
23
23
  },
24
24
  "devDependencies": {
25
25
  "tsup": "^8.5.1",
@@ -68,6 +68,7 @@ import {
68
68
  taraxa,
69
69
  meter,
70
70
  morph,
71
+ worldchain,
71
72
  moonbeam,
72
73
  zkLinkNova,
73
74
  vana,
@@ -296,6 +297,8 @@ export function getEvmChain(chain: string) {
296
297
  return plasma
297
298
  case Chain.MOONBEAM:
298
299
  return moonbeam
300
+ case Chain.WORLD_CHAIN:
301
+ return worldchain
299
302
  case Chain.MONAD_MAINNET:
300
303
  return customChains.monadMainnet
301
304
  case Chain.ZKLINK_NOVA_MAINNET:
@@ -7,6 +7,17 @@ import { LIST_OVERRIDES } from '../rpc/rpcOverrides'
7
7
  import { getEvmClientWithCustomRpcsUniversal } from '../client/client'
8
8
  import { DEFAULT_BATCH_SIZE, deepCompare, isArray } from '../utils/utils'
9
9
 
10
+ /** Return true if the error is a transport/environment issue (not an RPC or contract error) */
11
+ function isTransportError(e: unknown): boolean {
12
+ const msg =
13
+ e instanceof Error ? (e.message ?? '') + ((e as any).details ?? '') : ''
14
+ return (
15
+ msg.includes('is not a constructor') ||
16
+ msg.includes('Dynamic require') ||
17
+ msg.includes('is not supported')
18
+ )
19
+ }
20
+
10
21
  /** Return true if it is a revert case */
11
22
  function isContractRevert(e: unknown): boolean {
12
23
  if (!(e instanceof BaseError)) return false
@@ -56,6 +67,7 @@ export function createMulticallRetry(
56
67
  allowFailure = true,
57
68
  logErrors = false,
58
69
  revertedIndices: Set<number> = new Set(),
70
+ maxSkips = 3,
59
71
  ): Promise<any[]> {
60
72
  const abiIsArray = isArray(abi[0])
61
73
 
@@ -150,6 +162,24 @@ export function createMulticallRetry(
150
162
  }
151
163
  }
152
164
 
165
+ // Transport/environment errors (e.g. WebSocket not available):
166
+ // skip to next RPC without consuming a retry
167
+ if (isTransportError(e) && maxSkips > 0) {
168
+ if (logErrors) console.debug(e)
169
+ return await multicallRetry(
170
+ chain,
171
+ calls,
172
+ abi,
173
+ batchSize,
174
+ maxRetries,
175
+ providerId + 1,
176
+ allowFailure,
177
+ logErrors,
178
+ revertedIndices,
179
+ maxSkips - 1,
180
+ )
181
+ }
182
+
153
183
  if (maxRetries === 0) {
154
184
  if (!allowFailure) throw e
155
185
  if (logErrors) console.debug(e)
@@ -168,6 +198,7 @@ export function createMulticallRetry(
168
198
  allowFailure,
169
199
  logErrors,
170
200
  revertedIndices,
201
+ maxSkips,
171
202
  )
172
203
  }
173
204
  }
@@ -1,5 +1,16 @@
1
1
  import { Chain } from '@1delta/chain-registry'
2
2
 
3
+ export function filterHttpRpcs(
4
+ rpcs: Record<string, string[]>,
5
+ ): Record<string, string[]> {
6
+ return Object.fromEntries(
7
+ Object.entries(rpcs).map(([chain, urls]) => [
8
+ chain,
9
+ urls.filter((url) => !url.startsWith('wss://')),
10
+ ]),
11
+ )
12
+ }
13
+
3
14
  export const LIST_OVERRIDES: Record<string, string[]> = {
4
15
  [Chain.BASE]: [
5
16
  'https://base-rpc.publicnode.com',
@@ -16,7 +27,6 @@ export const LIST_OVERRIDES: Record<string, string[]> = {
16
27
  'https://endpoints.omniatech.io/v1/base/mainnet/public',
17
28
  'https://base.lava.build',
18
29
  'https://0xrpc.io/base',
19
- 'https://base.therpc.io',
20
30
  ],
21
31
  [Chain.POLYGON_MAINNET]: [
22
32
  'https://polygon-bor-rpc.publicnode.com',
@@ -24,7 +34,6 @@ export const LIST_OVERRIDES: Record<string, string[]> = {
24
34
  'https://polygon.drpc.org',
25
35
  'https://gateway.tenderly.co/public/polygon',
26
36
  'https://endpoints.omniatech.io/v1/matic/mainnet/public',
27
- 'https://polygon.therpc.io',
28
37
  'https://rpc-mainnet.matic.quiknode.pro',
29
38
  'https://polygon-pokt.nodies.app',
30
39
  'https://polygon.gateway.tenderly.co',
@@ -80,13 +89,11 @@ export const LIST_OVERRIDES: Record<string, string[]> = {
80
89
  'https://scroll.api.onfinality.io/public',
81
90
  'https://endpoints.omniatech.io/v1/scroll/mainnet/public',
82
91
  'https://scroll-rpc.publicnode.com',
83
- 'https://scroll.therpc.io',
84
92
  ],
85
93
  [Chain.SONIC_MAINNET]: [
86
94
  'https://sonic.api.onfinality.io/public',
87
95
  'https://sonic-rpc.publicnode.com',
88
96
  'https://rpc.soniclabs.com',
89
- 'https://sonic.therpc.io',
90
97
  'https://sonic.drpc.org',
91
98
  'https://sonic-json-rpc.stakely.io',
92
99
  ],
@@ -149,7 +156,6 @@ export const LIST_OVERRIDES: Record<string, string[]> = {
149
156
  'https://1rpc.io/arb',
150
157
  'https://arbitrum.api.onfinality.io/public',
151
158
  'https://0xrpc.io/arb',
152
- 'https://arbitrum.therpc.io',
153
159
  ],
154
160
  [Chain.LINEA]: [
155
161
  'https://rpc.linea.build',