Updated dist files.

This commit is contained in:
Richard Moore 2020-07-16 05:35:32 -04:00
parent 9f20258d5d
commit fe2f0f7489
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
23 changed files with 152 additions and 50 deletions

View File

@ -3,9 +3,11 @@ Changelog
This change log is managed by `scripts/cmds/update-versions` but may be manually updated.
ethers/v5.0.6 (2020-07-14 22:56)
ethers/v5.0.6 (2020-07-16 05:35)
--------------------------------
- Longer Etherscan throttle slot interval. ([9f20258](https://github.com/ethers-io/ethers.js/commit/9f20258d5d39cd901d2078275323071eb0f3505b))
- Fixed ENS overrides for the default provider. ([#959](https://github.com/ethers-io/ethers.js/issues/959); [63dd3d4](https://github.com/ethers-io/ethers.js/commit/63dd3d4682b564445948988243fa9139c598587b))
- Added Retry-After support and adjustable slot interval to fetchJson. ([7d43545](https://github.com/ethers-io/ethers.js/commit/7d435453039f009b339d835ddee47e35a843711b))
- Added initial throttling support. ([#139](https://github.com/ethers-io/ethers.js/issues/139), [#904](https://github.com/ethers-io/ethers.js/issues/904), [#926](https://github.com/ethers-io/ethers.js/issues/926); [88c7eae](https://github.com/ethers-io/ethers.js/commit/88c7eaed061ae9a6798733a97e4e87011d36b8e7))
- Use status code 1000 on WebSocket hangup for compatibility. ([588f64c](https://github.com/ethers-io/ethers.js/commit/588f64c760ee49bfb5109bfbaafb4beafe41c52a))

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -19185,8 +19185,12 @@ const version$k = "networks/5.0.2";
"use strict";
const logger$o = new Logger(version$k);
;
function isRenetworkable(value) {
return (value && typeof (value.renetwork) === "function");
}
function ethDefaultProvider(network) {
return function (providers, options) {
const func = function (providers, options) {
if (options == null) {
options = {};
}
@ -19230,14 +19234,22 @@ function ethDefaultProvider(network) {
}
return providerList[0];
};
func.renetwork = function (network) {
return ethDefaultProvider(network);
};
return func;
}
function etcDefaultProvider(url, network) {
return function (providers, options) {
const func = function (providers, options) {
if (providers.JsonRpcProvider) {
return new providers.JsonRpcProvider(url, network);
}
return null;
};
func.renetwork = function (network) {
return etcDefaultProvider(url, network);
};
return func;
}
const homestead = {
chainId: 1,
@ -19356,12 +19368,23 @@ function getNetwork(network) {
if (network.chainId !== 0 && network.chainId !== standard.chainId) {
logger$o.throwArgumentError("network chainId mismatch", "network", network);
}
// @TODO: In the next major version add an attach function to a defaultProvider
// class and move the _defaultProvider internal to this file (extend Network)
let defaultProvider = network._defaultProvider || null;
if (defaultProvider == null && standard._defaultProvider) {
if (isRenetworkable(standard._defaultProvider)) {
defaultProvider = standard._defaultProvider.renetwork(network);
}
else {
defaultProvider = standard._defaultProvider;
}
}
// Standard Network (allow overriding the ENS address)
return {
name: network.name,
chainId: standard.chainId,
ensAddress: (network.ensAddress || standard.ensAddress || null),
_defaultProvider: (network._defaultProvider || standard._defaultProvider || null)
_defaultProvider: defaultProvider
};
}
@ -22306,6 +22329,7 @@ class EtherscanProvider extends BaseProvider {
});
const connection = {
url: url,
throttleSlotInterval: 1000,
throttleCallback: (attempt, url) => {
if (this.apiKey === defaultApiKey$1) {
showThrottleMessage();
@ -22492,6 +22516,7 @@ class EtherscanProvider extends BaseProvider {
});
const connection = {
url: url,
throttleSlotInterval: 1000,
throttleCallback: (attempt, url) => {
if (this.apiKey === defaultApiKey$1) {
showThrottleMessage();

File diff suppressed because one or more lines are too long

View File

@ -20943,8 +20943,12 @@
var logger = new lib.Logger(_version$E.version);
;
function isRenetworkable(value) {
return (value && typeof (value.renetwork) === "function");
}
function ethDefaultProvider(network) {
return function (providers, options) {
var func = function (providers, options) {
if (options == null) {
options = {};
}
@ -20988,14 +20992,22 @@
}
return providerList[0];
};
func.renetwork = function (network) {
return ethDefaultProvider(network);
};
return func;
}
function etcDefaultProvider(url, network) {
return function (providers, options) {
var func = function (providers, options) {
if (providers.JsonRpcProvider) {
return new providers.JsonRpcProvider(url, network);
}
return null;
};
func.renetwork = function (network) {
return etcDefaultProvider(url, network);
};
return func;
}
var homestead = {
chainId: 1,
@ -21114,12 +21126,23 @@
if (network.chainId !== 0 && network.chainId !== standard.chainId) {
logger.throwArgumentError("network chainId mismatch", "network", network);
}
// @TODO: In the next major version add an attach function to a defaultProvider
// class and move the _defaultProvider internal to this file (extend Network)
var defaultProvider = network._defaultProvider || null;
if (defaultProvider == null && standard._defaultProvider) {
if (isRenetworkable(standard._defaultProvider)) {
defaultProvider = standard._defaultProvider.renetwork(network);
}
else {
defaultProvider = standard._defaultProvider;
}
}
// Standard Network (allow overriding the ENS address)
return {
name: network.name,
chainId: standard.chainId,
ensAddress: (network.ensAddress || standard.ensAddress || null),
_defaultProvider: (network._defaultProvider || standard._defaultProvider || null)
_defaultProvider: defaultProvider
};
}
exports.getNetwork = getNetwork;
@ -25042,6 +25065,7 @@
});
connection = {
url: url,
throttleSlotInterval: 1000,
throttleCallback: function (attempt, url) {
if (_this.apiKey === defaultApiKey) {
formatter.showThrottleMessage();
@ -25264,6 +25288,7 @@
});
var connection = {
url: url,
throttleSlotInterval: 1000,
throttleCallback: function (attempt, url) {
if (_this.apiKey === defaultApiKey) {
formatter.showThrottleMessage();

File diff suppressed because one or more lines are too long

View File

@ -49,7 +49,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x0c02e224b11fb85cf79b867a703cb5a721b5eb908c09090ecf09e8ca74fccae7",
"tarballHash": "0x5cbf72bd9673e75ea995c21e8f0bd9acf2173e13d38417206b955c146581fc5d",
"types": "./lib/index.d.ts",
"version": "5.0.6"
}

View File

@ -2,8 +2,12 @@
import { Logger } from "@ethersproject/logger";
import { version } from "./_version";
const logger = new Logger(version);
;
function isRenetworkable(value) {
return (value && typeof (value.renetwork) === "function");
}
function ethDefaultProvider(network) {
return function (providers, options) {
const func = function (providers, options) {
if (options == null) {
options = {};
}
@ -47,14 +51,22 @@ function ethDefaultProvider(network) {
}
return providerList[0];
};
func.renetwork = function (network) {
return ethDefaultProvider(network);
};
return func;
}
function etcDefaultProvider(url, network) {
return function (providers, options) {
const func = function (providers, options) {
if (providers.JsonRpcProvider) {
return new providers.JsonRpcProvider(url, network);
}
return null;
};
func.renetwork = function (network) {
return etcDefaultProvider(url, network);
};
return func;
}
const homestead = {
chainId: 1,
@ -173,12 +185,23 @@ export function getNetwork(network) {
if (network.chainId !== 0 && network.chainId !== standard.chainId) {
logger.throwArgumentError("network chainId mismatch", "network", network);
}
// @TODO: In the next major version add an attach function to a defaultProvider
// class and move the _defaultProvider internal to this file (extend Network)
let defaultProvider = network._defaultProvider || null;
if (defaultProvider == null && standard._defaultProvider) {
if (isRenetworkable(standard._defaultProvider)) {
defaultProvider = standard._defaultProvider.renetwork(network);
}
else {
defaultProvider = standard._defaultProvider;
}
}
// Standard Network (allow overriding the ENS address)
return {
name: network.name,
chainId: standard.chainId,
ensAddress: (network.ensAddress || standard.ensAddress || null),
_defaultProvider: (network._defaultProvider || standard._defaultProvider || null)
_defaultProvider: defaultProvider
};
}
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
var logger_1 = require("@ethersproject/logger");
var _version_1 = require("./_version");
var logger = new logger_1.Logger(_version_1.version);
;
function isRenetworkable(value) {
return (value && typeof (value.renetwork) === "function");
}
function ethDefaultProvider(network) {
return function (providers, options) {
var func = function (providers, options) {
if (options == null) {
options = {};
}
@ -48,14 +52,22 @@ function ethDefaultProvider(network) {
}
return providerList[0];
};
func.renetwork = function (network) {
return ethDefaultProvider(network);
};
return func;
}
function etcDefaultProvider(url, network) {
return function (providers, options) {
var func = function (providers, options) {
if (providers.JsonRpcProvider) {
return new providers.JsonRpcProvider(url, network);
}
return null;
};
func.renetwork = function (network) {
return etcDefaultProvider(url, network);
};
return func;
}
var homestead = {
chainId: 1,
@ -174,12 +186,23 @@ function getNetwork(network) {
if (network.chainId !== 0 && network.chainId !== standard.chainId) {
logger.throwArgumentError("network chainId mismatch", "network", network);
}
// @TODO: In the next major version add an attach function to a defaultProvider
// class and move the _defaultProvider internal to this file (extend Network)
var defaultProvider = network._defaultProvider || null;
if (defaultProvider == null && standard._defaultProvider) {
if (isRenetworkable(standard._defaultProvider)) {
defaultProvider = standard._defaultProvider.renetwork(network);
}
else {
defaultProvider = standard._defaultProvider;
}
}
// Standard Network (allow overriding the ENS address)
return {
name: network.name,
chainId: standard.chainId,
ensAddress: (network.ensAddress || standard.ensAddress || null),
_defaultProvider: (network._defaultProvider || standard._defaultProvider || null)
_defaultProvider: defaultProvider
};
}
exports.getNetwork = getNetwork;

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x97f5617c112f9db027fe07174c564f5d6a913eab75336bd98393bee7541878a2",
"tarballHash": "0xf92fa76efc61d70c133a7da0853c71d23739a000ca9f588e5de524c7f000f991",
"types": "./lib/index.d.ts",
"version": "5.0.2"
}

View File

@ -138,6 +138,7 @@ export class EtherscanProvider extends BaseProvider {
});
const connection = {
url: url,
throttleSlotInterval: 1000,
throttleCallback: (attempt, url) => {
if (this.apiKey === defaultApiKey) {
showThrottleMessage();
@ -324,6 +325,7 @@ export class EtherscanProvider extends BaseProvider {
});
const connection = {
url: url,
throttleSlotInterval: 1000,
throttleCallback: (attempt, url) => {
if (this.apiKey === defaultApiKey) {
showThrottleMessage();

File diff suppressed because one or more lines are too long

View File

@ -192,6 +192,7 @@ var EtherscanProvider = /** @class */ (function (_super) {
});
connection = {
url: url,
throttleSlotInterval: 1000,
throttleCallback: function (attempt, url) {
if (_this.apiKey === defaultApiKey) {
formatter_1.showThrottleMessage();
@ -414,6 +415,7 @@ var EtherscanProvider = /** @class */ (function (_super) {
});
var connection = {
url: url,
throttleSlotInterval: 1000,
throttleCallback: function (attempt, url) {
if (_this.apiKey === defaultApiKey) {
formatter_1.showThrottleMessage();

File diff suppressed because one or more lines are too long

View File

@ -56,7 +56,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0xb990b748245872f8bd26e2e711161e0896217bb2f5b8ea8c810481c0a5624c48",
"tarballHash": "0x4037514c8693061300f9e72c0dc441786b640e3de69ef48dc7ff61467260d361",
"types": "./lib/index.d.ts",
"version": "5.0.5"
}

View File

@ -435,7 +435,7 @@ function testProvider(providerName, networkName) {
// Note: These tests could be fiddled with if someone sends ether
// to our address; we just have to live with jerks sending us
// money. *smile emoji*
this.timeout(20000);
this.timeout(60000);
return provider.getBalance(test.address).then((balance) => {
equals("Balance", test.balance, balance);
return waiter(delay);
@ -444,7 +444,7 @@ function testProvider(providerName, networkName) {
}
if (test.code) {
it(`fetches address code: ${test.address}`, function () {
this.timeout(20000);
this.timeout(60000);
return provider.getCode(test.address).then((code) => {
equals("Code", test.code, code);
return waiter(delay);
@ -454,7 +454,7 @@ function testProvider(providerName, networkName) {
if (test.storage) {
Object.keys(test.storage).forEach((position) => {
it(`fetches storage: ${test.address}:${position}`, function () {
this.timeout(20000);
this.timeout(60000);
return provider.getStorageAt(test.address, bnify(position)).then((value) => {
equals("Storage", test.storage[position], value);
return waiter(delay);
@ -464,7 +464,7 @@ function testProvider(providerName, networkName) {
}
if (test.name) {
it(`fetches the ENS name: ${test.name}`, function () {
this.timeout(20000);
this.timeout(60000);
return provider.resolveName(test.name).then((address) => {
equals("ENS Name", test.address, address);
return waiter(delay);
@ -482,7 +482,7 @@ function testProvider(providerName, networkName) {
});
}
it(`fetches block (by number) #${test.number}`, function () {
this.timeout(20000);
this.timeout(60000);
return checkBlock(provider.getBlock(test.number));
});
// Etherscan does not support getBlockByBlockhash... *sad emoji*
@ -490,7 +490,7 @@ function testProvider(providerName, networkName) {
return;
}
it(`fetches block (by hash) ${test.hash}`, function () {
this.timeout(20000);
this.timeout(60000);
return checkBlock(provider.getBlock(test.hash));
});
});
@ -510,7 +510,7 @@ function testProvider(providerName, networkName) {
});
}
it(`fetches transaction: ${test.hash}`, function () {
this.timeout(20000);
this.timeout(60000);
return testTransaction(test);
});
});
@ -529,7 +529,7 @@ function testProvider(providerName, networkName) {
});
}
it(`fetches transaction receipt: ${test.transactionHash}`, function () {
this.timeout(100000);
this.timeout(60000);
return testTransactionReceipt(test);
});
});
@ -588,7 +588,7 @@ describe("Test Basic Authentication", function () {
// https://stackoverflow.com/questions/6509278/authentication-test-servers#16756383
function test(name, url) {
it("tests " + name, function () {
this.timeout(20000);
this.timeout(60000);
return ethers.utils.fetchJson(url).then((data) => {
assert.equal(data.authenticated, true, "authenticates user");
});
@ -613,7 +613,7 @@ describe("Test Basic Authentication", function () {
test("secure url", secure);
test("insecure url", insecureForced);
it("tests insecure connections fail", function () {
this.timeout(20000);
this.timeout(60000);
assert.throws(() => {
return ethers.utils.fetchJson(insecure);
}, (error) => {
@ -721,7 +721,7 @@ describe("Test Events", function () {
}
it("InfuraProvider", function () {
return __awaiter(this, void 0, void 0, function* () {
this.timeout(50000);
this.timeout(60000);
const provider = new ethers.providers.InfuraProvider("rinkeby");
yield testBlockEvent(provider);
});

File diff suppressed because one or more lines are too long

View File

@ -466,7 +466,7 @@ function testProvider(providerName, networkName) {
// Note: These tests could be fiddled with if someone sends ether
// to our address; we just have to live with jerks sending us
// money. *smile emoji*
this.timeout(20000);
this.timeout(60000);
return provider.getBalance(test.address).then(function (balance) {
equals("Balance", test.balance, balance);
return waiter(delay);
@ -475,7 +475,7 @@ function testProvider(providerName, networkName) {
}
if (test.code) {
it("fetches address code: " + test.address, function () {
this.timeout(20000);
this.timeout(60000);
return provider.getCode(test.address).then(function (code) {
equals("Code", test.code, code);
return waiter(delay);
@ -485,7 +485,7 @@ function testProvider(providerName, networkName) {
if (test.storage) {
Object.keys(test.storage).forEach(function (position) {
it("fetches storage: " + test.address + ":" + position, function () {
this.timeout(20000);
this.timeout(60000);
return provider.getStorageAt(test.address, bnify(position)).then(function (value) {
equals("Storage", test.storage[position], value);
return waiter(delay);
@ -495,7 +495,7 @@ function testProvider(providerName, networkName) {
}
if (test.name) {
it("fetches the ENS name: " + test.name, function () {
this.timeout(20000);
this.timeout(60000);
return provider.resolveName(test.name).then(function (address) {
equals("ENS Name", test.address, address);
return waiter(delay);
@ -513,7 +513,7 @@ function testProvider(providerName, networkName) {
});
}
it("fetches block (by number) #" + test.number, function () {
this.timeout(20000);
this.timeout(60000);
return checkBlock(provider.getBlock(test.number));
});
// Etherscan does not support getBlockByBlockhash... *sad emoji*
@ -521,7 +521,7 @@ function testProvider(providerName, networkName) {
return;
}
it("fetches block (by hash) " + test.hash, function () {
this.timeout(20000);
this.timeout(60000);
return checkBlock(provider.getBlock(test.hash));
});
});
@ -541,7 +541,7 @@ function testProvider(providerName, networkName) {
});
}
it("fetches transaction: " + test.hash, function () {
this.timeout(20000);
this.timeout(60000);
return testTransaction(test);
});
});
@ -560,7 +560,7 @@ function testProvider(providerName, networkName) {
});
}
it("fetches transaction receipt: " + test.transactionHash, function () {
this.timeout(100000);
this.timeout(60000);
return testTransactionReceipt(test);
});
});
@ -619,7 +619,7 @@ describe("Test Basic Authentication", function () {
// https://stackoverflow.com/questions/6509278/authentication-test-servers#16756383
function test(name, url) {
it("tests " + name, function () {
this.timeout(20000);
this.timeout(60000);
return ethers_1.ethers.utils.fetchJson(url).then(function (data) {
assert_1.default.equal(data.authenticated, true, "authenticates user");
});
@ -644,7 +644,7 @@ describe("Test Basic Authentication", function () {
test("secure url", secure);
test("insecure url", insecureForced);
it("tests insecure connections fail", function () {
this.timeout(20000);
this.timeout(60000);
assert_1.default.throws(function () {
return ethers_1.ethers.utils.fetchJson(insecure);
}, function (error) {
@ -774,7 +774,7 @@ describe("Test Events", function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.timeout(50000);
this.timeout(60000);
provider = new ethers_1.ethers.providers.InfuraProvider("rinkeby");
return [4 /*yield*/, testBlockEvent(provider)];
case 1:

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,7 @@
"scripts": {
"test": "exit 1"
},
"tarballHash": "0x9fbfd932bc2e66db5510360a3973e3f6f4dc67d55f8efad18c2f14bbcd398a07",
"tarballHash": "0xb348c246bc5832dc37b6e798836c9410b8b09dfd795a377c7f53b573b12450e8",
"types": "./lib/index.d.ts",
"version": "5.0.3"
}