Updated dist files.
This commit is contained in:
parent
e727efc33e
commit
29be1e37bc
@ -3,9 +3,11 @@ Changelog
|
||||
|
||||
This change log is managed by `admin/cmds/update-versions` but may be manually updated.
|
||||
|
||||
ethers/v5.0.27 (2021-01-31 19:36)
|
||||
ethers/v5.0.27 (2021-02-01 15:55)
|
||||
---------------------------------
|
||||
|
||||
- Added support for networks with slightly incorrect EIP-658 implementations. ([#952](https://github.com/ethers-io/ethers.js/issues/952), [#1251](https://github.com/ethers-io/ethers.js/issues/1251); [e727efc](https://github.com/ethers-io/ethers.js/commit/e727efc33eaa31c3af6adbb64a893caf354d0ba7))
|
||||
- Added Pocket network to the default provider. ([#1030](https://github.com/ethers-io/ethers.js/issues/1030), [#1052](https://github.com/ethers-io/ethers.js/issues/1052); [4af2c19](https://github.com/ethers-io/ethers.js/commit/4af2c19f455bb43406d3cc5421c3b3fdda75f78f))
|
||||
- Added TypeScript declaration maps. ([#401](https://github.com/ethers-io/ethers.js/issues/401); [3396846](https://github.com/ethers-io/ethers.js/commit/3396846a30a4be0ed58fe449589e7e4e54f3d32e))
|
||||
|
||||
ethers/v5.0.26 (2021-01-13 14:47)
|
||||
@ -217,4 +219,4 @@ ethers/v5.0.0 (2020-06-12 19:58)
|
||||
--------------------------------
|
||||
|
||||
- Preserve config canary string. ([7157816](https://github.com/ethers-io/ethers.js/commit/7157816fa53f660d750811b293e3b1d5a2f70bd4))
|
||||
- Updated docs. ([9e4c7e6](https://github.com/ethers-io/ethers.js/commit/9e4c7e609d9eeb5f2a11d6a90bfa9d32ee696431))
|
||||
- Updated docs. ([9e4c7e6](https://github.com/ethers-io/ethers.js/commit/9e4c7e609d9eeb5f2a11d6a90bfa9d32ee696431))
|
||||
|
12
package-lock.json
generated
12
package-lock.json
generated
@ -2897,9 +2897,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
|
||||
"integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
|
||||
"integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.5"
|
||||
@ -4016,9 +4016,9 @@
|
||||
}
|
||||
},
|
||||
"pacote": {
|
||||
"version": "11.2.3",
|
||||
"resolved": "https://registry.npmjs.org/pacote/-/pacote-11.2.3.tgz",
|
||||
"integrity": "sha512-Jphxyk1EjGyLzNwa+MkbcQUQeTIqlKcIoPq0t9ekR9ZxsTGjzhRjz/cOoL9PTVkqAW1FH7qBoVbYL4FqQGNNJg==",
|
||||
"version": "11.2.4",
|
||||
"resolved": "https://registry.npmjs.org/pacote/-/pacote-11.2.4.tgz",
|
||||
"integrity": "sha512-GfTeVQGJ6WyBQbQD4t3ocHbyOmTQLmWjkCKSZPmKiGFKYKNUaM5U2gbLzUW8WG1XmS9yQFnsTFA0k3o1+q4klQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@npmcli/git": "^2.0.1",
|
||||
|
33
packages/ethers/dist/ethers.esm.js
vendored
33
packages/ethers/dist/ethers.esm.js
vendored
@ -16842,6 +16842,12 @@ function ethDefaultProvider(network) {
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.PocketProvider) {
|
||||
try {
|
||||
providerList.push(new providers.PocketProvider(network));
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.CloudflareProvider) {
|
||||
try {
|
||||
providerList.push(new providers.CloudflareProvider(network));
|
||||
@ -17686,7 +17692,8 @@ class Formatter {
|
||||
from: Formatter.allowNull(this.address, null),
|
||||
contractAddress: Formatter.allowNull(address, null),
|
||||
transactionIndex: number,
|
||||
root: Formatter.allowNull(hash),
|
||||
// should be allowNull(hash), but broken-EIP-658 support is handled in receipt
|
||||
root: Formatter.allowNull(hex),
|
||||
gasUsed: bigNumber,
|
||||
logsBloom: Formatter.allowNull(data),
|
||||
blockHash: hash,
|
||||
@ -17934,7 +17941,29 @@ class Formatter {
|
||||
}
|
||||
receipt(value) {
|
||||
const result = Formatter.check(this.formats.receipt, value);
|
||||
if (value.status != null) {
|
||||
// RSK incorrectly implemented EIP-658, so we munge things a bit here for it
|
||||
if (result.root != null) {
|
||||
if (result.root.length <= 4) {
|
||||
// Could be 0x00, 0x0, 0x01 or 0x1
|
||||
const value = BigNumber.from(result.root).toNumber();
|
||||
if (value === 0 || value === 1) {
|
||||
// Make sure if both are specified, they match
|
||||
if (result.status != null && (result.status !== value)) {
|
||||
logger$s.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status });
|
||||
}
|
||||
result.status = value;
|
||||
delete result.root;
|
||||
}
|
||||
else {
|
||||
logger$s.throwArgumentError("invalid alt-root-status", "value.root", result.root);
|
||||
}
|
||||
}
|
||||
else if (result.root.length !== 66) {
|
||||
// Must be a valid bytes32
|
||||
logger$s.throwArgumentError("invalid root hash", "value.root", result.root);
|
||||
}
|
||||
}
|
||||
if (result.status != null) {
|
||||
result.byzantium = true;
|
||||
}
|
||||
return result;
|
||||
|
2
packages/ethers/dist/ethers.esm.js.map
vendored
2
packages/ethers/dist/ethers.esm.js.map
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/dist/ethers.esm.min.js
vendored
2
packages/ethers/dist/ethers.esm.min.js
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/dist/ethers.esm.min.js.map
vendored
2
packages/ethers/dist/ethers.esm.min.js.map
vendored
File diff suppressed because one or more lines are too long
33
packages/ethers/dist/ethers.umd.js
vendored
33
packages/ethers/dist/ethers.umd.js
vendored
@ -18770,6 +18770,12 @@
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.PocketProvider) {
|
||||
try {
|
||||
providerList.push(new providers.PocketProvider(network));
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.CloudflareProvider) {
|
||||
try {
|
||||
providerList.push(new providers.CloudflareProvider(network));
|
||||
@ -19773,7 +19779,8 @@
|
||||
from: Formatter.allowNull(this.address, null),
|
||||
contractAddress: Formatter.allowNull(address, null),
|
||||
transactionIndex: number,
|
||||
root: Formatter.allowNull(hash),
|
||||
// should be allowNull(hash), but broken-EIP-658 support is handled in receipt
|
||||
root: Formatter.allowNull(hex),
|
||||
gasUsed: bigNumber,
|
||||
logsBloom: Formatter.allowNull(data),
|
||||
blockHash: hash,
|
||||
@ -20021,7 +20028,29 @@
|
||||
};
|
||||
Formatter.prototype.receipt = function (value) {
|
||||
var result = Formatter.check(this.formats.receipt, value);
|
||||
if (value.status != null) {
|
||||
// RSK incorrectly implemented EIP-658, so we munge things a bit here for it
|
||||
if (result.root != null) {
|
||||
if (result.root.length <= 4) {
|
||||
// Could be 0x00, 0x0, 0x01 or 0x1
|
||||
var value_1 = lib$2.BigNumber.from(result.root).toNumber();
|
||||
if (value_1 === 0 || value_1 === 1) {
|
||||
// Make sure if both are specified, they match
|
||||
if (result.status != null && (result.status !== value_1)) {
|
||||
logger.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status });
|
||||
}
|
||||
result.status = value_1;
|
||||
delete result.root;
|
||||
}
|
||||
else {
|
||||
logger.throwArgumentError("invalid alt-root-status", "value.root", result.root);
|
||||
}
|
||||
}
|
||||
else if (result.root.length !== 66) {
|
||||
// Must be a valid bytes32
|
||||
logger.throwArgumentError("invalid root hash", "value.root", result.root);
|
||||
}
|
||||
}
|
||||
if (result.status != null) {
|
||||
result.byzantium = true;
|
||||
}
|
||||
return result;
|
||||
|
2
packages/ethers/dist/ethers.umd.js.map
vendored
2
packages/ethers/dist/ethers.umd.js.map
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/dist/ethers.umd.min.js
vendored
2
packages/ethers/dist/ethers.umd.min.js
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/dist/ethers.umd.min.js.map
vendored
2
packages/ethers/dist/ethers.umd.min.js.map
vendored
File diff suppressed because one or more lines are too long
@ -62,7 +62,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0xdfa0a2068aed8b5dc6210ffbaae8fde1760ff1b2533922ae9522a7baed3e1fdb",
|
||||
"tarballHash": "0x748356d89d024565baac6e8e91dbe39bc891908a80af06fc4fde2b1f8110dd8b",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.27"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AA+JF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"}
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AAqKF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"}
|
@ -30,6 +30,12 @@ function ethDefaultProvider(network) {
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.PocketProvider) {
|
||||
try {
|
||||
providerList.push(new providers.PocketProvider(network));
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.CloudflareProvider) {
|
||||
try {
|
||||
providerList.push(new providers.CloudflareProvider(network));
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AA+JF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"}
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AAqKF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"}
|
@ -31,6 +31,12 @@ function ethDefaultProvider(network) {
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.PocketProvider) {
|
||||
try {
|
||||
providerList.push(new providers.PocketProvider(network));
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.CloudflareProvider) {
|
||||
try {
|
||||
providerList.push(new providers.CloudflareProvider(network));
|
||||
|
File diff suppressed because one or more lines are too long
@ -35,7 +35,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0x1837b33b94cf419890ef8752188f5d06f1bdde916af7220a2378c4cf807448b3",
|
||||
"tarballHash": "0x9e8c21d31e55f98cf6e8d7854c69116efd4e47f6b551b67fb672e6b7d6568559",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.8"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../src.ts/formatter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,m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,OAAO,CAAC;CAClC;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,oBAAoB,CAEhF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAEvD;AAID,wBAAgB,mBAAmB,SAgBlC"}
|
@ -66,7 +66,8 @@ export class Formatter {
|
||||
from: Formatter.allowNull(this.address, null),
|
||||
contractAddress: Formatter.allowNull(address, null),
|
||||
transactionIndex: number,
|
||||
root: Formatter.allowNull(hash),
|
||||
// should be allowNull(hash), but broken-EIP-658 support is handled in receipt
|
||||
root: Formatter.allowNull(hex),
|
||||
gasUsed: bigNumber,
|
||||
logsBloom: Formatter.allowNull(data),
|
||||
blockHash: hash,
|
||||
@ -314,7 +315,29 @@ export class Formatter {
|
||||
}
|
||||
receipt(value) {
|
||||
const result = Formatter.check(this.formats.receipt, value);
|
||||
if (value.status != null) {
|
||||
// RSK incorrectly implemented EIP-658, so we munge things a bit here for it
|
||||
if (result.root != null) {
|
||||
if (result.root.length <= 4) {
|
||||
// Could be 0x00, 0x0, 0x01 or 0x1
|
||||
const value = BigNumber.from(result.root).toNumber();
|
||||
if (value === 0 || value === 1) {
|
||||
// Make sure if both are specified, they match
|
||||
if (result.status != null && (result.status !== value)) {
|
||||
logger.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status });
|
||||
}
|
||||
result.status = value;
|
||||
delete result.root;
|
||||
}
|
||||
else {
|
||||
logger.throwArgumentError("invalid alt-root-status", "value.root", result.root);
|
||||
}
|
||||
}
|
||||
else if (result.root.length !== 66) {
|
||||
// Must be a valid bytes32
|
||||
logger.throwArgumentError("invalid root hash", "value.root", result.root);
|
||||
}
|
||||
}
|
||||
if (result.status != null) {
|
||||
result.byzantium = true;
|
||||
}
|
||||
return result;
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../src.ts/formatter.ts"],"names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UAAU;CAajD;AAED,MAAM,WAAW,oBAAoB;IACjC,mBAAmB,IAAI,OAAO,CAAC;CAClC;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,oBAAoB,CAEhF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAEvD;AAID,wBAAgB,mBAAmB,SAgBlC"}
|
@ -69,7 +69,8 @@ var Formatter = /** @class */ (function () {
|
||||
from: Formatter.allowNull(this.address, null),
|
||||
contractAddress: Formatter.allowNull(address, null),
|
||||
transactionIndex: number,
|
||||
root: Formatter.allowNull(hash),
|
||||
// should be allowNull(hash), but broken-EIP-658 support is handled in receipt
|
||||
root: Formatter.allowNull(hex),
|
||||
gasUsed: bigNumber,
|
||||
logsBloom: Formatter.allowNull(data),
|
||||
blockHash: hash,
|
||||
@ -317,7 +318,29 @@ var Formatter = /** @class */ (function () {
|
||||
};
|
||||
Formatter.prototype.receipt = function (value) {
|
||||
var result = Formatter.check(this.formats.receipt, value);
|
||||
if (value.status != null) {
|
||||
// RSK incorrectly implemented EIP-658, so we munge things a bit here for it
|
||||
if (result.root != null) {
|
||||
if (result.root.length <= 4) {
|
||||
// Could be 0x00, 0x0, 0x01 or 0x1
|
||||
var value_1 = bignumber_1.BigNumber.from(result.root).toNumber();
|
||||
if (value_1 === 0 || value_1 === 1) {
|
||||
// Make sure if both are specified, they match
|
||||
if (result.status != null && (result.status !== value_1)) {
|
||||
logger.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status });
|
||||
}
|
||||
result.status = value_1;
|
||||
delete result.root;
|
||||
}
|
||||
else {
|
||||
logger.throwArgumentError("invalid alt-root-status", "value.root", result.root);
|
||||
}
|
||||
}
|
||||
else if (result.root.length !== 66) {
|
||||
// Must be a valid bytes32
|
||||
logger.throwArgumentError("invalid root hash", "value.root", result.root);
|
||||
}
|
||||
}
|
||||
if (result.status != null) {
|
||||
result.byzantium = true;
|
||||
}
|
||||
return result;
|
||||
|
File diff suppressed because one or more lines are too long
@ -66,7 +66,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0x1301979ebea30d93a9b5d809f2f08a6cb238d59123bfdbc975b9586e6108f9a8",
|
||||
"tarballHash": "0x56f20f500a0487a8b8d1f0886c9d1dcdf5d9f8308e5165cd2dcf33badec538f7",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.20"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user