Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ethersproject/providers

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/providers - npm Package Compare versions

Comparing version 5.6.1 to 5.6.2

lib.esm/ankr-provider.d.ts

2

lib.esm/_version.d.ts

@@ -1,2 +0,2 @@

export declare const version = "providers/5.6.1";
export declare const version = "providers/5.6.2";
//# sourceMappingURL=_version.d.ts.map

@@ -1,2 +0,2 @@

export const version = "providers/5.6.1";
export const version = "providers/5.6.2";
//# sourceMappingURL=_version.js.map

@@ -6,2 +6,3 @@ import { Block, BlockTag, EventType, FeeData, Filter, Log, Listener, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";

import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider";
import { AnkrProvider } from "./ankr-provider";
import { CloudflareProvider } from "./cloudflare-provider";

@@ -22,3 +23,3 @@ import { EtherscanProvider } from "./etherscan-provider";

declare function getDefaultProvider(network?: Networkish, options?: any): BaseProvider;
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
//# sourceMappingURL=index.d.ts.map

@@ -6,2 +6,3 @@ "use strict";

import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider";
import { AnkrProvider } from "./ankr-provider";
import { CloudflareProvider } from "./cloudflare-provider";

@@ -55,2 +56,3 @@ import { EtherscanProvider } from "./etherscan-provider";

AlchemyProvider,
AnkrProvider,
CloudflareProvider,

@@ -73,3 +75,3 @@ EtherscanProvider,

// Concrete Providers
FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider,
FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider,
///////////////////////

@@ -76,0 +78,0 @@ // Signer

@@ -24,9 +24,36 @@ "use strict";

const errorGas = ["call", "estimateGas"];
function spelunk(value) {
if (value == null) {
return null;
}
// These *are* the droids we're looking for.
if (typeof (value.message) === "string" && value.message.match("reverted") && isHexString(value.data)) {
return { message: value.message, data: value.data };
}
// Spelunk further...
if (typeof (value) === "object") {
for (const key in value) {
const result = spelunk(value[key]);
if (result) {
return result;
}
}
return null;
}
// Might be a JSON string we can further descend...
if (typeof (value) === "string") {
try {
return spelunk(JSON.parse(value));
}
catch (error) { }
}
return null;
}
function checkError(method, error, params) {
// Undo the "convenience" some nodes are attempting to prevent backwards
// incompatibility; maybe for v6 consider forwarding reverts as errors
if (method === "call" && error.code === Logger.errors.SERVER_ERROR) {
const e = error.error;
if (e && e.message.match("reverted") && isHexString(e.data)) {
return e.data;
if (method === "call") {
const result = spelunk(error);
if (result) {
return result.data;
}

@@ -37,2 +64,3 @@ logger.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, {

}
// @TODO: Should we spelunk for message too?
let message = error.message;

@@ -39,0 +67,0 @@ if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof (error.error.message) === "string") {

@@ -1,2 +0,2 @@

export declare const version = "providers/5.6.1";
export declare const version = "providers/5.6.2";
//# sourceMappingURL=_version.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "providers/5.6.1";
exports.version = "providers/5.6.2";
//# sourceMappingURL=_version.js.map

@@ -6,2 +6,3 @@ import { Block, BlockTag, EventType, FeeData, Filter, Log, Listener, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";

import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider";
import { AnkrProvider } from "./ankr-provider";
import { CloudflareProvider } from "./cloudflare-provider";

@@ -22,3 +23,3 @@ import { EtherscanProvider } from "./etherscan-provider";

declare function getDefaultProvider(network?: Networkish, options?: any): BaseProvider;
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AnkrProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
var abstract_provider_1 = require("@ethersproject/abstract-provider");

@@ -14,2 +14,4 @@ Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return abstract_provider_1.Provider; } });

Object.defineProperty(exports, "AlchemyWebSocketProvider", { enumerable: true, get: function () { return alchemy_provider_1.AlchemyWebSocketProvider; } });
var ankr_provider_1 = require("./ankr-provider");
Object.defineProperty(exports, "AnkrProvider", { enumerable: true, get: function () { return ankr_provider_1.AnkrProvider; } });
var cloudflare_provider_1 = require("./cloudflare-provider");

@@ -82,2 +84,3 @@ Object.defineProperty(exports, "CloudflareProvider", { enumerable: true, get: function () { return cloudflare_provider_1.CloudflareProvider; } });

AlchemyProvider: alchemy_provider_1.AlchemyProvider,
AnkrProvider: ankr_provider_1.AnkrProvider,
CloudflareProvider: cloudflare_provider_1.CloudflareProvider,

@@ -84,0 +87,0 @@ EtherscanProvider: etherscan_provider_1.EtherscanProvider,

@@ -68,9 +68,36 @@ "use strict";

var errorGas = ["call", "estimateGas"];
function spelunk(value) {
if (value == null) {
return null;
}
// These *are* the droids we're looking for.
if (typeof (value.message) === "string" && value.message.match("reverted") && (0, bytes_1.isHexString)(value.data)) {
return { message: value.message, data: value.data };
}
// Spelunk further...
if (typeof (value) === "object") {
for (var key in value) {
var result = spelunk(value[key]);
if (result) {
return result;
}
}
return null;
}
// Might be a JSON string we can further descend...
if (typeof (value) === "string") {
try {
return spelunk(JSON.parse(value));
}
catch (error) { }
}
return null;
}
function checkError(method, error, params) {
// Undo the "convenience" some nodes are attempting to prevent backwards
// incompatibility; maybe for v6 consider forwarding reverts as errors
if (method === "call" && error.code === logger_1.Logger.errors.SERVER_ERROR) {
var e = error.error;
if (e && e.message.match("reverted") && (0, bytes_1.isHexString)(e.data)) {
return e.data;
if (method === "call") {
var result = spelunk(error);
if (result) {
return result.data;
}

@@ -82,2 +109,3 @@ logger.throwError("missing revert data in call exception", logger_1.Logger.errors.CALL_EXCEPTION, {

}
// @TODO: Should we spelunk for message too?
var message = error.message;

@@ -84,0 +112,0 @@ if (error.code === logger_1.Logger.errors.SERVER_ERROR && error.error && typeof (error.error.message) === "string") {

@@ -49,3 +49,3 @@ {

],
"gitHead": "dca0d14d380ad3c4112431ffb6a73b714f10b351",
"gitHead": "ef1b28e958b50cea7ff44da43b3c5ff054e4b483",
"keywords": [

@@ -71,5 +71,5 @@ "Ethereum",

"sideEffects": false,
"tarballHash": "0xbf42b88442c3a39c744a11e5fa21f26b88282742fe14c3019898882a6a1da541",
"tarballHash": "0x181e53d30739aad39e89df28361535c019b173d2fc07c78c150cdf32b8831056",
"types": "./lib/index.d.ts",
"version": "5.6.1"
"version": "5.6.2"
}

@@ -1,1 +0,1 @@

export const version = "providers/5.6.1";
export const version = "providers/5.6.2";

@@ -23,2 +23,3 @@ "use strict";

import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider";
import { AnkrProvider } from "./ankr-provider";
import { CloudflareProvider } from "./cloudflare-provider";

@@ -80,2 +81,3 @@ import { EtherscanProvider } from "./etherscan-provider";

AlchemyProvider,
AnkrProvider,
CloudflareProvider,

@@ -113,2 +115,3 @@ EtherscanProvider,

AlchemyWebSocketProvider,
AnkrProvider,
CloudflareProvider,

@@ -115,0 +118,0 @@ EtherscanProvider,

@@ -25,10 +25,36 @@ "use strict";

function spelunk(value: any): null | { message: string, data: string } {
if (value == null) { return null; }
// These *are* the droids we're looking for.
if (typeof(value.message) === "string" && value.message.match("reverted") && isHexString(value.data)) {
return { message: value.message, data: value.data };
}
// Spelunk further...
if (typeof(value) === "object") {
for (const key in value) {
const result = spelunk(value[key]);
if (result) { return result; }
}
return null;
}
// Might be a JSON string we can further descend...
if (typeof(value) === "string") {
try {
return spelunk(JSON.parse(value));
} catch (error) { }
}
return null;
}
function checkError(method: string, error: any, params: any): any {
// Undo the "convenience" some nodes are attempting to prevent backwards
// incompatibility; maybe for v6 consider forwarding reverts as errors
if (method === "call" && error.code === Logger.errors.SERVER_ERROR) {
const e = error.error;
if (e && e.message.match("reverted") && isHexString(e.data)) {
return e.data;
}
if (method === "call") {
const result = spelunk(error);
if (result) { return result.data; }

@@ -40,2 +66,4 @@ logger.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, {

// @TODO: Should we spelunk for message too?
let message = error.message;

@@ -42,0 +70,0 @@ if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof(error.error.message) === "string") {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc