forked from tornado-packages/ethers.js
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c27b45ac9 | ||
|
|
20f6e16394 | ||
|
|
2df9dd1120 | ||
|
|
74470defda | ||
|
|
8175c83026 | ||
|
|
e0ccafb140 | ||
|
|
20335e96c2 | ||
|
|
a56a0a3336 | ||
|
|
4ad47b1b43 | ||
|
|
0e6cc9a9a8 | ||
|
|
21c6c7ddb6 | ||
|
|
8efbfc6afa |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -3,6 +3,19 @@ Changelog
|
||||
|
||||
This change log is managed by `admin/cmds/update-versions` but may be manually updated.
|
||||
|
||||
ethers/v5.0.26 (2021-01-13 14:47)
|
||||
---------------------------------
|
||||
|
||||
- Fixed abundant UnhandledRejectErrors in provider polling. ([#1084](https://github.com/ethers-io/ethers.js/issues/1084), [#1208](https://github.com/ethers-io/ethers.js/issues/1208), [#1221](https://github.com/ethers-io/ethers.js/issues/1221), [#1235](https://github.com/ethers-io/ethers.js/issues/1235); [74470de](https://github.com/ethers-io/ethers.js/commit/74470defda5170338735bbbe676c207cdd5cc1cf), [20f6e16](https://github.com/ethers-io/ethers.js/commit/20f6e16394909a43498c1ac6c73152957bd121bd))
|
||||
- Fixed non-checksum address comparisons in abstract Signer. ([#1236](https://github.com/ethers-io/ethers.js/issues/1236); [8175c83](https://github.com/ethers-io/ethers.js/commit/8175c83026436b6335800780ca12b7257e1b490f))
|
||||
|
||||
ethers/v5.0.25 (2021-01-08 03:31)
|
||||
---------------------------------
|
||||
|
||||
- Safety check on digest length for signing. ([20335e9](https://github.com/ethers-io/ethers.js/commit/20335e96c2429e851081b72031ea3fd4cd677904))
|
||||
- Fixed listenerCount for contract when requesting for all events. ([#1205](https://github.com/ethers-io/ethers.js/issues/1205); [a56a0a3](https://github.com/ethers-io/ethers.js/commit/a56a0a33366ea9276fba5bc45f1e4678dd723fa6))
|
||||
- Lock package versions for the ESM builds. ([#1009](https://github.com/ethers-io/ethers.js/issues/1009); [0e6cc9a](https://github.com/ethers-io/ethers.js/commit/0e6cc9a9a8ebceae4529ccbb7c107618eb54490a))
|
||||
|
||||
ethers/v5.0.24 (2020-12-08 01:43)
|
||||
---------------------------------
|
||||
|
||||
|
||||
@@ -1,24 +1,49 @@
|
||||
_section: ContractFactory @<ContractFactory> @SRC<contracts:class.ContractFactory>
|
||||
|
||||
@TODO: Fill this in, including @SRC links
|
||||
To deploy a [[Contract]], additional information is needed
|
||||
that is not available on a Contract object itself.
|
||||
|
||||
Mainly, the bytecode (more specifically the initcode) of a contract is required.
|
||||
|
||||
The **Contract Factory** sends a special type of transaction, an initcode
|
||||
transaction (i.e. the ``to`` field is null, and the ``data`` field is the
|
||||
initcode) where the initcode will be evaluated and the result becomes the
|
||||
new code to be deployed as a new contract.
|
||||
|
||||
_subsection: Creating Instances @<ContractFactory--creating>
|
||||
|
||||
_property: new ethers.ContractFactory(interface, bytecode [ , signer ]) @SRC<contracts:constructor.ContractFactory>
|
||||
|
||||
Creates a new instance of a **ContractFactory** for the contract described
|
||||
by the //interface// and //bytecode// initcode.
|
||||
|
||||
_property: ContractFactory.fromSolidity(compilerOutput [ , signer ]) => [[ContractFactory]]
|
||||
|
||||
Consumes the output of the Solidity compiler, extracting the ABI
|
||||
and bytecode from it, allowing for the various formats the solc
|
||||
compiler has emitted over its life.
|
||||
|
||||
_property: contractFactory.connect(signer) => [[Contract]] @<ContractFactory-connect>
|
||||
|
||||
Returns a **new instance** of the ContractFactory with the same //interface//
|
||||
and //bytecode//, but with a different //signer//.
|
||||
|
||||
_subsection: Properties @<ContractFactory--properties>
|
||||
|
||||
_property: contractFactory.interface => [[Interface]]
|
||||
|
||||
The [[Contract]] interface.
|
||||
|
||||
_property: contractFactory.bytecode => string<[[DataHexString]]>
|
||||
|
||||
The bytecode (i.e. initcode) that this **ContractFactory** will
|
||||
use to deploy the Contract.
|
||||
|
||||
_property: contractFactory.signer => [[Signer]]
|
||||
|
||||
The [[Signer]] (if any) this ContractFactory will use to deploy instances
|
||||
of the Contract to the Blockchain.
|
||||
|
||||
|
||||
_subsection: Methods @<ContractFactory--methods>
|
||||
|
||||
@@ -29,36 +54,52 @@ same as using the [Contract constructor](Contract--creating) with
|
||||
//address// and this the //interface// and //signerOrProvider// passed
|
||||
in when creating the ContractFactory.
|
||||
|
||||
_property: contractFactory.getDeployTransaction(...args) => [[UnsignedTransaction]]
|
||||
_property: contractFactory.getDeployTransaction(...args [ , overrides ]) => [[UnsignedTransaction]]
|
||||
|
||||
Returns the unsigned transaction which would deploy this Contract with //args// passed
|
||||
to the Contract's constructor.
|
||||
|
||||
_property: contractFactory.deploy(...args) => Promise<[[Contract]]> @<ContractFactory-deploy>
|
||||
If the optional //overrides// is specified, they can be used to
|
||||
override the endowment ``value``, transaction ``nonce``, ``gasLimit`` or
|
||||
``gasPrice``.
|
||||
|
||||
_property: contractFactory.deploy(...args [ , overrides ]) => Promise<[[Contract]]> @<ContractFactory-deploy>
|
||||
|
||||
Uses the signer to deploy the Contract with //args// passed into the constructor and
|
||||
returns a Contract which is attached to the address where this contract **will** be
|
||||
returns a Contract which is attached to the address where this contract **will** be
|
||||
deployed once the transaction is mined.
|
||||
|
||||
The transaction can be found at ``contract.deployTransaction``, and no interactions
|
||||
should be made until the transaction is mined.
|
||||
|
||||
_code: Deploying a Contract
|
||||
If the optional //overrides// is specified, they can be used to
|
||||
override the endowment ``value``, transaction ``nonce``, ``gasLimit`` or
|
||||
``gasPrice``.
|
||||
|
||||
_code: Deploying a Contract @lang<javascript>
|
||||
|
||||
// <hide>
|
||||
const signer = ethers.LocalSigner();
|
||||
const signer = localSigner;
|
||||
const ContractFactory = ethers.ContractFactory;
|
||||
const bytecode = "608060405234801561001057600080fd5b5060405161012e38038061012e8339818101604052604081101561003357600080fd5b81019080805190602001909291908051906020019092919050505081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060008190555050506088806100a66000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80633fa4f24514602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000805490509056fea2646970667358221220926465385af0e8706644e1ff3db7161af699dc063beaadd55405f2ccd6478d7564736f6c63430007040033";
|
||||
// </hide>
|
||||
|
||||
|
||||
// If your contract constructor requires parameters, the ABI
|
||||
// must include the constructor
|
||||
const abi = [
|
||||
"constructor(address owner, uint256 initialValue)"
|
||||
"constructor(address owner, uint256 initialValue)",
|
||||
"function value() view returns (uint)"
|
||||
];
|
||||
|
||||
const factory = new ContractFactory(abi, bytecode, signer)
|
||||
// The factory we use for deploying contracts
|
||||
factory = new ContractFactory(abi, bytecode, signer)
|
||||
|
||||
const contract = await factory.deploy("ricmoo.eth", 42);
|
||||
// Deploy an instance of the contract
|
||||
contract = await factory.deploy("ricmoo.eth", 42);
|
||||
//<hide>
|
||||
//! async contract
|
||||
//</hide>
|
||||
|
||||
// The address is available immediately, but the contract
|
||||
// is NOT deployed yet
|
||||
@@ -69,7 +110,9 @@ contract.address
|
||||
contract.deployTransaction
|
||||
//!
|
||||
|
||||
// Wait until the transaction is mined
|
||||
// Wait until the transaction is mined (i.e. contract is deployed)
|
||||
// - returns the receipt
|
||||
// - throws on failure (the reciept is on the error)
|
||||
contract.deployTransaction.wait()
|
||||
//!
|
||||
|
||||
|
||||
@@ -129,6 +129,13 @@ function codeContextify(context) {
|
||||
context.Wallet = ethers.Wallet;
|
||||
context.provider = new ethers.providers.InfuraProvider("mainnet", "49a0efa3aaee4fd99797bfa94d8ce2f1");
|
||||
|
||||
// We use a local dev node for some signing examples, but want to
|
||||
// resolve ENS names against mainnet; super hacky but makes the
|
||||
// docs nicer
|
||||
context.localProvider = new ethers.providers.JsonRpcProvider();
|
||||
context.localSigner = context.localProvider.getSigner();
|
||||
context.localProvider.resolveName = context.provider.resolveName.bind(context.provider);
|
||||
|
||||
context.BigNumber.prototype[inspect.custom] = function(depth, options) {
|
||||
return `{ BigNumber: ${JSON.stringify(this.toString()) } }`;
|
||||
}
|
||||
|
||||
1
misc/admin/lib/cmds/lock-versions.d.ts
vendored
Normal file
1
misc/admin/lib/cmds/lock-versions.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
41
misc/admin/lib/cmds/lock-versions.js
Normal file
41
misc/admin/lib/cmds/lock-versions.js
Normal file
@@ -0,0 +1,41 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path_1 = require("../path");
|
||||
const local_1 = require("../local");
|
||||
const utils_1 = require("../utils");
|
||||
(function () {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const versions = path_1.dirnames.reduce((accum, dirname) => {
|
||||
const pkg = local_1.getPackage(dirname);
|
||||
accum[pkg.name] = pkg.version;
|
||||
return accum;
|
||||
}, ({}));
|
||||
console.log(versions);
|
||||
path_1.dirnames.forEach((dirname) => {
|
||||
// Skip ethers; it's versions are locked during update-versions
|
||||
if (dirname === "ethers") {
|
||||
return;
|
||||
}
|
||||
const path = path_1.resolve("packages", dirname, "package.json");
|
||||
const json = utils_1.loadJson(path);
|
||||
for (const name in (json.dependencies || {})) {
|
||||
const version = json.dependencies[name];
|
||||
const target = (versions[name] ? ("^" + versions[name]) : version);
|
||||
if (version !== target) {
|
||||
console.log(name, version, "=>", target);
|
||||
}
|
||||
json.dependencies[name] = target;
|
||||
}
|
||||
utils_1.saveJson(path, json, true);
|
||||
});
|
||||
});
|
||||
})();
|
||||
29
misc/admin/src.ts/cmds/lock-versions.ts
Normal file
29
misc/admin/src.ts/cmds/lock-versions.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { dirnames, resolve } from "../path";
|
||||
import { getPackage } from "../local";
|
||||
import { loadJson, saveJson } from "../utils";
|
||||
|
||||
(async function() {
|
||||
const versions = dirnames.reduce((accum, dirname) => {
|
||||
const pkg = getPackage(dirname);
|
||||
accum[pkg.name] = pkg.version;
|
||||
return accum;
|
||||
}, <Record<string, string>>({ }));
|
||||
dirnames.forEach((dirname) => {
|
||||
// Skip ethers; it's versions are locked during update-versions
|
||||
if (dirname === "ethers") { return; }
|
||||
|
||||
console.log(dirname);
|
||||
|
||||
const path = resolve("packages", dirname, "package.json");
|
||||
const json = loadJson(path);
|
||||
for (const name in (json.dependencies || {})) {
|
||||
const version = json.dependencies[name];
|
||||
const target = (versions[name] ? ("^" + versions[name]): version);
|
||||
if (version !== target) {
|
||||
console.log(" ", name, version, "=>", target);
|
||||
}
|
||||
json.dependencies[name] = target;
|
||||
}
|
||||
saveJson(path, json, true);
|
||||
});
|
||||
})();
|
||||
619
package-lock.json
generated
619
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@
|
||||
"test": "npm run build-all && npm run test-node",
|
||||
"build-docs": "flatworm docs.wrm docs",
|
||||
"serve-docs": "node ./misc/admin/lib/cmds/serve-docs.js",
|
||||
"upload-docs": " node ./admin/cmds/upload-docs.js",
|
||||
"upload-docs": " node ./misc/admin/lib/cmds/upload-docs.js",
|
||||
"spell-check": "node ./misc/admin/lib/cmds/spell-check.js",
|
||||
"_reset-build": "node ./misc/admin/lib/cmds/set-build-option cjs",
|
||||
"_esm-alias-nodesafe": "node ./misc/admin/lib/cmds/echo 'Bundling ESM elliptic (lib._esm/browser-elliptic.js)...' && rollup -c rollup-pre-alias.config.js && node misc/admin/lib/cmds/esm-alias",
|
||||
|
||||
2
packages/abi/lib.esm/_version.d.ts
vendored
2
packages/abi/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "abi/5.0.9";
|
||||
export declare const version = "abi/5.0.10";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "abi/5.0.9";
|
||||
export const version = "abi/5.0.10";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC"}
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC"}
|
||||
2
packages/abi/lib/_version.d.ts
vendored
2
packages/abi/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "abi/5.0.9";
|
||||
export declare const version = "abi/5.0.10";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "abi/5.0.9";
|
||||
exports.version = "abi/5.0.10";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;AAAa,QAAA,OAAO,GAAG,WAAW,CAAC"}
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;AAAa,QAAA,OAAO,GAAG,YAAY,CAAC"}
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/address": "^5.0.4",
|
||||
"@ethersproject/bignumber": "^5.0.7",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/constants": "^5.0.4",
|
||||
"@ethersproject/hash": "^5.0.4",
|
||||
"@ethersproject/keccak256": "^5.0.3",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/properties": "^5.0.3",
|
||||
"@ethersproject/strings": "^5.0.4"
|
||||
"@ethersproject/address": "^5.0.9",
|
||||
"@ethersproject/bignumber": "^5.0.13",
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/constants": "^5.0.8",
|
||||
"@ethersproject/hash": "^5.0.10",
|
||||
"@ethersproject/keccak256": "^5.0.7",
|
||||
"@ethersproject/logger": "^5.0.8",
|
||||
"@ethersproject/properties": "^5.0.7",
|
||||
"@ethersproject/strings": "^5.0.8"
|
||||
},
|
||||
"description": "Utilities and Classes for parsing, formatting and managing Ethereum ABIs.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -43,7 +43,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0xff31d43d9c97aa55fb2980106be2e4ffbe77ad4c6efcba95263c70f86239e8e0",
|
||||
"tarballHash": "0x07d39a52bc530f07ad10d65997318cd9c82d4da340b57d72f4479f7c906a11a8",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.9"
|
||||
"version": "5.0.10"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "abi/5.0.9";
|
||||
export const version = "abi/5.0.10";
|
||||
|
||||
@@ -1 +1 @@
|
||||
export declare const version = "abstract-provider/5.0.7";
|
||||
export declare const version = "abstract-provider/5.0.8";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "abstract-provider/5.0.7";
|
||||
export const version = "abstract-provider/5.0.8";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/abstract-provider/lib/_version.d.ts
vendored
2
packages/abstract-provider/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "abstract-provider/5.0.7";
|
||||
export declare const version = "abstract-provider/5.0.8";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "abstract-provider/5.0.7";
|
||||
exports.version = "abstract-provider/5.0.8";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bignumber": "^5.0.7",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/networks": "^5.0.3",
|
||||
"@ethersproject/properties": "^5.0.3",
|
||||
"@ethersproject/transactions": "^5.0.5",
|
||||
"@ethersproject/web": "^5.0.6"
|
||||
"@ethersproject/bignumber": "^5.0.13",
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/logger": "^5.0.8",
|
||||
"@ethersproject/networks": "^5.0.7",
|
||||
"@ethersproject/properties": "^5.0.7",
|
||||
"@ethersproject/transactions": "^5.0.9",
|
||||
"@ethersproject/web": "^5.0.12"
|
||||
},
|
||||
"description": "An Abstract Class for describing an Ethereum Provider for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -41,7 +41,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0x3b3b910e4ef4f0b9361ff266b98e1fa415387e1d349122d215ee5ffe8110e397",
|
||||
"tarballHash": "0xf572036220cdab424ea2dc7da918bd38455a4c3645dc3d85b4613113bffc60d3",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.7"
|
||||
"version": "5.0.8"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "abstract-provider/5.0.7";
|
||||
export const version = "abstract-provider/5.0.8";
|
||||
|
||||
@@ -1 +1 @@
|
||||
export declare const version = "abstract-signer/5.0.9";
|
||||
export declare const version = "abstract-signer/5.0.11";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "abstract-signer/5.0.9";
|
||||
export const version = "abstract-signer/5.0.11";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,uBAAuB,CAAC"}
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC"}
|
||||
@@ -112,7 +112,7 @@ export class Signer {
|
||||
Promise.resolve(tx.from),
|
||||
this.getAddress()
|
||||
]).then((result) => {
|
||||
if (result[0] !== result[1]) {
|
||||
if (result[0].toLowerCase() !== result[1].toLowerCase()) {
|
||||
logger.throwArgumentError("from address mismatch", "transaction", transaction);
|
||||
}
|
||||
return result[0];
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
packages/abstract-signer/lib/_version.d.ts
vendored
2
packages/abstract-signer/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "abstract-signer/5.0.9";
|
||||
export declare const version = "abstract-signer/5.0.11";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "abstract-signer/5.0.9";
|
||||
exports.version = "abstract-signer/5.0.11";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;AAAa,QAAA,OAAO,GAAG,uBAAuB,CAAC"}
|
||||
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src.ts/_version.ts"],"names":[],"mappings":";;AAAa,QAAA,OAAO,GAAG,wBAAwB,CAAC"}
|
||||
@@ -205,7 +205,7 @@ var Signer = /** @class */ (function () {
|
||||
Promise.resolve(tx.from),
|
||||
this.getAddress()
|
||||
]).then(function (result) {
|
||||
if (result[0] !== result[1]) {
|
||||
if (result[0].toLowerCase() !== result[1].toLowerCase()) {
|
||||
logger.throwArgumentError("from address mismatch", "transaction", transaction);
|
||||
}
|
||||
return result[0];
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/abstract-provider": "^5.0.4",
|
||||
"@ethersproject/bignumber": "^5.0.7",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/properties": "^5.0.3"
|
||||
"@ethersproject/abstract-provider": "^5.0.8",
|
||||
"@ethersproject/bignumber": "^5.0.13",
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/logger": "^5.0.8",
|
||||
"@ethersproject/properties": "^5.0.7"
|
||||
},
|
||||
"description": "An Abstract Class for desribing an Ethereum Signer for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -39,7 +39,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0xf30b173e3bee012c273e09ae94387f410714faa640b9dc27213a192db77a0303",
|
||||
"tarballHash": "0x4d8fa4bc0db1b1bb7fb8deebec9ee5342cb860723b3b4987cdd1a52ce122c4f6",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.9"
|
||||
"version": "5.0.11"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "abstract-signer/5.0.9";
|
||||
export const version = "abstract-signer/5.0.11";
|
||||
|
||||
@@ -173,7 +173,7 @@ export abstract class Signer {
|
||||
Promise.resolve(tx.from),
|
||||
this.getAddress()
|
||||
]).then((result) => {
|
||||
if (result[0] !== result[1]) {
|
||||
if (result[0].toLowerCase() !== result[1].toLowerCase()) {
|
||||
logger.throwArgumentError("from address mismatch", "transaction", transaction);
|
||||
}
|
||||
return result[0];
|
||||
|
||||
2
packages/address/lib.esm/_version.d.ts
vendored
2
packages/address/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "address/5.0.8";
|
||||
export declare const version = "address/5.0.9";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "address/5.0.8";
|
||||
export const version = "address/5.0.9";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/address/lib/_version.d.ts
vendored
2
packages/address/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "address/5.0.8";
|
||||
export declare const version = "address/5.0.9";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "address/5.0.8";
|
||||
exports.version = "address/5.0.9";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bignumber": "^5.0.10",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/keccak256": "^5.0.3",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/rlp": "^5.0.3"
|
||||
"@ethersproject/bignumber": "^5.0.13",
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/keccak256": "^5.0.7",
|
||||
"@ethersproject/logger": "^5.0.8",
|
||||
"@ethersproject/rlp": "^5.0.7"
|
||||
},
|
||||
"description": "Utilities for handling Ethereum Addresses for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -39,7 +39,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0xf6189bba1f1db944f730756c375fe0a198f97aa1a6993ed69b1069b68b3b127e",
|
||||
"tarballHash": "0xd2a696ead7db1ea68b4f3bb272eb3e500e13d81daea197187b6a24f31b1d0406",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.8"
|
||||
"version": "5.0.9"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "address/5.0.8";
|
||||
export const version = "address/5.0.9";
|
||||
|
||||
2
packages/asm/lib.esm/_version.d.ts
vendored
2
packages/asm/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "asm/5.0.8";
|
||||
export declare const version = "asm/5.0.9";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "asm/5.0.8";
|
||||
export const version = "asm/5.0.9";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/asm/lib/_version.d.ts
vendored
2
packages/asm/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "asm/5.0.8";
|
||||
export declare const version = "asm/5.0.9";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "asm/5.0.8";
|
||||
exports.version = "asm/5.0.9";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"ethers": "^5.0.13"
|
||||
"ethers": "^5.0.25"
|
||||
},
|
||||
"description": "ASM libraries and tools for the Ethereum EVM.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -36,7 +36,7 @@
|
||||
"generate": "node ./generate.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x83d6934a78956b083ea22841ce0c1595a344cd0d6ed8a0de8e702da9e826b757",
|
||||
"tarballHash": "0xc37069d3a50c61311a6d7404879e9c38b83fd9a04eb77f58a3527b0dd8ea7acb",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.8"
|
||||
"version": "5.0.9"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "asm/5.0.8";
|
||||
export const version = "asm/5.0.9";
|
||||
|
||||
2
packages/base64/lib.esm/_version.d.ts
vendored
2
packages/base64/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "base64/5.0.6";
|
||||
export declare const version = "base64/5.0.7";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "base64/5.0.6";
|
||||
export const version = "base64/5.0.7";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/base64/lib/_version.d.ts
vendored
2
packages/base64/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "base64/5.0.6";
|
||||
export declare const version = "base64/5.0.7";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "base64/5.0.6";
|
||||
exports.version = "base64/5.0.7";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -7,7 +7,7 @@
|
||||
"./lib/base64": "./lib/browser-base64.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ethersproject/bytes": "^5.0.4"
|
||||
"@ethersproject/bytes": "^5.0.9"
|
||||
},
|
||||
"description": "Base64 coder.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -41,7 +41,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0x0b21de3d1f836a61564b43b95d9272c0034c20b70eae82bbe99538676a1f9780",
|
||||
"tarballHash": "0x039db312367a40c2989d402945358f18670ee5e0f491a933a7db166e182c806d",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.6"
|
||||
"version": "5.0.7"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "base64/5.0.6";
|
||||
export const version = "base64/5.0.7";
|
||||
|
||||
2
packages/basex/lib.esm/_version.d.ts
vendored
2
packages/basex/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "basex/5.0.6";
|
||||
export declare const version = "basex/5.0.7";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "basex/5.0.6";
|
||||
export const version = "basex/5.0.7";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/basex/lib/_version.d.ts
vendored
2
packages/basex/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "basex/5.0.6";
|
||||
export declare const version = "basex/5.0.7";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "basex/5.0.6";
|
||||
exports.version = "basex/5.0.7";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/properties": "^5.0.3"
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/properties": "^5.0.7"
|
||||
},
|
||||
"description": "Base-X without Buffer.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -36,7 +36,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0x329cc06e27c00836bfbfbb871fe2f601e1532b2a85a3ef79aa48706338264b84",
|
||||
"tarballHash": "0x0d352b87fee683283f5af82a758a9617de456b7b7a1a5182eeafaab8032cc84c",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.6"
|
||||
"version": "5.0.7"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "basex/5.0.6";
|
||||
export const version = "basex/5.0.7";
|
||||
|
||||
2
packages/bignumber/lib.esm/_version.d.ts
vendored
2
packages/bignumber/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "bignumber/5.0.12";
|
||||
export declare const version = "bignumber/5.0.13";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "bignumber/5.0.12";
|
||||
export const version = "bignumber/5.0.13";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/bignumber/lib/_version.d.ts
vendored
2
packages/bignumber/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "bignumber/5.0.12";
|
||||
export declare const version = "bignumber/5.0.13";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "bignumber/5.0.12";
|
||||
exports.version = "bignumber/5.0.13";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bytes": "^5.0.8",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/logger": "^5.0.8",
|
||||
"bn.js": "^4.4.0"
|
||||
},
|
||||
"description": "BigNumber library used in ethers.js.",
|
||||
@@ -38,7 +38,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0x988db7b6fa319a70ba68f176e674bee80e0e7f85d82109153bb8f7cd8957f2e3",
|
||||
"tarballHash": "0xf7f0bf408b22fd4386b2b288bc7324f4d5353ee983a2e0287392175c74c40d57",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.12"
|
||||
"version": "5.0.13"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "bignumber/5.0.12";
|
||||
export const version = "bignumber/5.0.13";
|
||||
|
||||
2
packages/bytes/lib.esm/_version.d.ts
vendored
2
packages/bytes/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "bytes/5.0.8";
|
||||
export declare const version = "bytes/5.0.9";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "bytes/5.0.8";
|
||||
export const version = "bytes/5.0.9";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/bytes/lib/_version.d.ts
vendored
2
packages/bytes/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "bytes/5.0.8";
|
||||
export declare const version = "bytes/5.0.9";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "bytes/5.0.8";
|
||||
exports.version = "bytes/5.0.9";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/logger": "^5.0.5"
|
||||
"@ethersproject/logger": "^5.0.8"
|
||||
},
|
||||
"description": "Bytes utility functions for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -37,7 +37,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0xd9e749a0a18668dd6fd71da0f55afc0006d8b809d3c3f7b971ed9b76180e340c",
|
||||
"tarballHash": "0xd0c00af724095504a6bf6447421ef5adfb5b42c9ec013fac5b273b60c0e2f181",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.8"
|
||||
"version": "5.0.9"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "bytes/5.0.8";
|
||||
export const version = "bytes/5.0.9";
|
||||
|
||||
2
packages/cli/lib.esm/_version.d.ts
vendored
2
packages/cli/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "cli/5.0.7";
|
||||
export declare const version = "cli/5.0.8";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "cli/5.0.7";
|
||||
export const version = "cli/5.0.8";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/cli/lib/_version.d.ts
vendored
2
packages/cli/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "cli/5.0.7";
|
||||
export declare const version = "cli/5.0.8";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "cli/5.0.7";
|
||||
exports.version = "cli/5.0.8";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -9,9 +9,9 @@
|
||||
"dependencies": {
|
||||
"@babel/parser": "7.8.4",
|
||||
"@babel/types": "7.8.3",
|
||||
"@ethersproject/asm": "^5.0.5",
|
||||
"@ethersproject/basex": "^5.0.3",
|
||||
"ethers": "^5.0.13",
|
||||
"@ethersproject/asm": "^5.0.9",
|
||||
"@ethersproject/basex": "^5.0.7",
|
||||
"ethers": "^5.0.25",
|
||||
"scrypt-js": "3.0.1",
|
||||
"solc": "0.7.1"
|
||||
},
|
||||
@@ -48,7 +48,7 @@
|
||||
"test": "exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0x2e19e09a91c3169955c6dc7562d2f87d666f1abe9f79485a3a95f17b4f123a2a",
|
||||
"tarballHash": "0x0e9d71c6adeed7e3cfc05ce4ba3fc1ea83f335ebfeaa99091869ace8db701f62",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.7"
|
||||
"version": "5.0.8"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "cli/5.0.7";
|
||||
export const version = "cli/5.0.8";
|
||||
|
||||
2
packages/constants/lib.esm/_version.d.ts
vendored
2
packages/constants/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "constants/5.0.7";
|
||||
export declare const version = "constants/5.0.8";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "constants/5.0.7";
|
||||
export const version = "constants/5.0.8";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/constants/lib/_version.d.ts
vendored
2
packages/constants/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "constants/5.0.7";
|
||||
export declare const version = "constants/5.0.8";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "constants/5.0.7";
|
||||
exports.version = "constants/5.0.8";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bignumber": "^5.0.7"
|
||||
"@ethersproject/bignumber": "^5.0.13"
|
||||
},
|
||||
"description": "Common Ethereum constants used for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -35,7 +35,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0x7309c409ee97c2e040b89c8e1021d33f951eed5e9f25ddc58d134a5e6f735cea",
|
||||
"tarballHash": "0x0c80f644155d23e5fb7f5cd58855b4704af28decb32ff4689dda3d0c1e5d2f2d",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.7"
|
||||
"version": "5.0.8"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "constants/5.0.7";
|
||||
export const version = "constants/5.0.8";
|
||||
|
||||
2
packages/contracts/lib.esm/_version.d.ts
vendored
2
packages/contracts/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "contracts/5.0.8";
|
||||
export declare const version = "contracts/5.0.9";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "contracts/5.0.8";
|
||||
export const version = "contracts/5.0.9";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -796,6 +796,11 @@ export class Contract {
|
||||
if (!this.provider) {
|
||||
return 0;
|
||||
}
|
||||
if (eventName == null) {
|
||||
return Object.keys(this._runningEvents).reduce((accum, key) => {
|
||||
return accum + this._runningEvents[key].listenerCount();
|
||||
}, 0);
|
||||
}
|
||||
return this._getRunningEvent(eventName).listenerCount();
|
||||
}
|
||||
listeners(eventName) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
packages/contracts/lib/_version.d.ts
vendored
2
packages/contracts/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "contracts/5.0.8";
|
||||
export declare const version = "contracts/5.0.9";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "contracts/5.0.8";
|
||||
exports.version = "contracts/5.0.9";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -935,9 +935,15 @@ var Contract = /** @class */ (function () {
|
||||
return result;
|
||||
};
|
||||
Contract.prototype.listenerCount = function (eventName) {
|
||||
var _this = this;
|
||||
if (!this.provider) {
|
||||
return 0;
|
||||
}
|
||||
if (eventName == null) {
|
||||
return Object.keys(this._runningEvents).reduce(function (accum, key) {
|
||||
return accum + _this._runningEvents[key].listenerCount();
|
||||
}, 0);
|
||||
}
|
||||
return this._getRunningEvent(eventName).listenerCount();
|
||||
};
|
||||
Contract.prototype.listeners = function (eventName) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/abi": "^5.0.5",
|
||||
"@ethersproject/abstract-provider": "^5.0.4",
|
||||
"@ethersproject/abstract-signer": "^5.0.4",
|
||||
"@ethersproject/address": "^5.0.4",
|
||||
"@ethersproject/bignumber": "^5.0.7",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/constants": "^5.0.4",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/properties": "^5.0.3"
|
||||
"@ethersproject/abi": "^5.0.10",
|
||||
"@ethersproject/abstract-provider": "^5.0.8",
|
||||
"@ethersproject/abstract-signer": "^5.0.10",
|
||||
"@ethersproject/address": "^5.0.9",
|
||||
"@ethersproject/bignumber": "^5.0.13",
|
||||
"@ethersproject/bytes": "^5.0.9",
|
||||
"@ethersproject/constants": "^5.0.8",
|
||||
"@ethersproject/logger": "^5.0.8",
|
||||
"@ethersproject/properties": "^5.0.7"
|
||||
},
|
||||
"description": "Contract abstraction meta-class for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -43,7 +43,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0xce5f076317986cd03fab0e8ca2eaf969ec5c05f4d4b89d89e05542c24249caa3",
|
||||
"tarballHash": "0x8f47387e6dbe09671064c072ef17c897caa59dbafcd312291b7ea8a403cbce83",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.8"
|
||||
"version": "5.0.9"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "contracts/5.0.8";
|
||||
export const version = "contracts/5.0.9";
|
||||
|
||||
@@ -1016,6 +1016,11 @@ export class Contract {
|
||||
|
||||
listenerCount(eventName?: EventFilter | string): number {
|
||||
if (!this.provider) { return 0; }
|
||||
if (eventName == null) {
|
||||
return Object.keys(this._runningEvents).reduce((accum, key) => {
|
||||
return accum + this._runningEvents[key].listenerCount();
|
||||
}, 0);
|
||||
}
|
||||
return this._getRunningEvent(eventName).listenerCount();
|
||||
}
|
||||
|
||||
|
||||
114
packages/ethers/dist/ethers.esm.js
vendored
114
packages/ethers/dist/ethers.esm.js
vendored
@@ -3775,7 +3775,7 @@ class Logger {
|
||||
Logger.errors = ErrorCode;
|
||||
Logger.levels = LogLevel;
|
||||
|
||||
const version$1 = "bytes/5.0.8";
|
||||
const version$1 = "bytes/5.0.9";
|
||||
|
||||
"use strict";
|
||||
const logger = new Logger(version$1);
|
||||
@@ -4155,7 +4155,7 @@ function joinSignature(signature) {
|
||||
]));
|
||||
}
|
||||
|
||||
const version$2 = "bignumber/5.0.12";
|
||||
const version$2 = "bignumber/5.0.13";
|
||||
|
||||
"use strict";
|
||||
var BN = bn.BN;
|
||||
@@ -4778,7 +4778,7 @@ class FixedNumber {
|
||||
const ONE = FixedNumber.from(1);
|
||||
const BUMP = FixedNumber.from("0.5");
|
||||
|
||||
const version$3 = "properties/5.0.6";
|
||||
const version$3 = "properties/5.0.7";
|
||||
|
||||
"use strict";
|
||||
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
@@ -4895,7 +4895,7 @@ class Description {
|
||||
}
|
||||
}
|
||||
|
||||
const version$4 = "abi/5.0.9";
|
||||
const version$4 = "abi/5.0.10";
|
||||
|
||||
"use strict";
|
||||
const logger$4 = new Logger(version$4);
|
||||
@@ -6303,7 +6303,7 @@ function keccak256(data) {
|
||||
return '0x' + sha3.keccak_256(arrayify(data));
|
||||
}
|
||||
|
||||
const version$5 = "rlp/5.0.6";
|
||||
const version$5 = "rlp/5.0.7";
|
||||
|
||||
"use strict";
|
||||
const logger$6 = new Logger(version$5);
|
||||
@@ -6427,7 +6427,7 @@ var index = /*#__PURE__*/Object.freeze({
|
||||
decode: decode
|
||||
});
|
||||
|
||||
const version$6 = "address/5.0.8";
|
||||
const version$6 = "address/5.0.9";
|
||||
|
||||
"use strict";
|
||||
const logger$7 = new Logger(version$6);
|
||||
@@ -6943,7 +6943,7 @@ class NumberCoder extends Coder {
|
||||
}
|
||||
}
|
||||
|
||||
const version$7 = "strings/5.0.7";
|
||||
const version$7 = "strings/5.0.8";
|
||||
|
||||
"use strict";
|
||||
const logger$9 = new Logger(version$7);
|
||||
@@ -7564,7 +7564,7 @@ function id(text) {
|
||||
return keccak256(toUtf8Bytes(text));
|
||||
}
|
||||
|
||||
const version$8 = "hash/5.0.9";
|
||||
const version$8 = "hash/5.0.10";
|
||||
|
||||
const logger$b = new Logger(version$8);
|
||||
const Zeros = new Uint8Array(32);
|
||||
@@ -8536,7 +8536,7 @@ class Interface {
|
||||
|
||||
"use strict";
|
||||
|
||||
const version$9 = "abstract-provider/5.0.7";
|
||||
const version$9 = "abstract-provider/5.0.8";
|
||||
|
||||
"use strict";
|
||||
const logger$e = new Logger(version$9);
|
||||
@@ -8613,7 +8613,7 @@ class Provider {
|
||||
}
|
||||
}
|
||||
|
||||
const version$a = "abstract-signer/5.0.9";
|
||||
const version$a = "abstract-signer/5.0.11";
|
||||
|
||||
"use strict";
|
||||
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
@@ -8726,7 +8726,7 @@ class Signer {
|
||||
Promise.resolve(tx.from),
|
||||
this.getAddress()
|
||||
]).then((result) => {
|
||||
if (result[0] !== result[1]) {
|
||||
if (result[0].toLowerCase() !== result[1].toLowerCase()) {
|
||||
logger$f.throwArgumentError("from address mismatch", "transaction", transaction);
|
||||
}
|
||||
return result[0];
|
||||
@@ -8820,7 +8820,7 @@ class VoidSigner extends Signer {
|
||||
}
|
||||
}
|
||||
|
||||
const version$b = "contracts/5.0.8";
|
||||
const version$b = "contracts/5.0.9";
|
||||
|
||||
"use strict";
|
||||
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
@@ -9610,6 +9610,11 @@ class Contract {
|
||||
if (!this.provider) {
|
||||
return 0;
|
||||
}
|
||||
if (eventName == null) {
|
||||
return Object.keys(this._runningEvents).reduce((accum, key) => {
|
||||
return accum + this._runningEvents[key].listenerCount();
|
||||
}, 0);
|
||||
}
|
||||
return this._getRunningEvent(eventName).listenerCount();
|
||||
}
|
||||
listeners(eventName) {
|
||||
@@ -11204,7 +11209,7 @@ var SupportedAlgorithm;
|
||||
})(SupportedAlgorithm || (SupportedAlgorithm = {}));
|
||||
;
|
||||
|
||||
const version$c = "sha2/5.0.6";
|
||||
const version$c = "sha2/5.0.7";
|
||||
|
||||
"use strict";
|
||||
const logger$h = new Logger(version$c);
|
||||
@@ -13731,7 +13736,7 @@ elliptic.eddsa = /*RicMoo:ethers:require(./elliptic/eddsa)*/(null);
|
||||
|
||||
var EC$1 = elliptic_1.ec;
|
||||
|
||||
const version$d = "signing-key/5.0.7";
|
||||
const version$d = "signing-key/5.0.8";
|
||||
|
||||
"use strict";
|
||||
const logger$i = new Logger(version$d);
|
||||
@@ -13758,7 +13763,11 @@ class SigningKey {
|
||||
}
|
||||
signDigest(digest) {
|
||||
const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));
|
||||
const signature = keyPair.sign(arrayify(digest), { canonical: true });
|
||||
const digestBytes = arrayify(digest);
|
||||
if (digestBytes.length !== 32) {
|
||||
logger$i.throwArgumentError("bad digest length", "digest", digest);
|
||||
}
|
||||
const signature = keyPair.sign(digestBytes, { canonical: true });
|
||||
return splitSignature({
|
||||
recoveryParam: signature.recoveryParam,
|
||||
r: hexZeroPad("0x" + signature.r.toString(16), 32),
|
||||
@@ -13803,7 +13812,7 @@ function computePublicKey(key, compressed) {
|
||||
return logger$i.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
|
||||
}
|
||||
|
||||
const version$e = "transactions/5.0.8";
|
||||
const version$e = "transactions/5.0.9";
|
||||
|
||||
"use strict";
|
||||
const logger$j = new Logger(version$e);
|
||||
@@ -13964,7 +13973,7 @@ function parse(rawTransaction) {
|
||||
return tx;
|
||||
}
|
||||
|
||||
const version$f = "wordlists/5.0.7";
|
||||
const version$f = "wordlists/5.0.8";
|
||||
|
||||
"use strict";
|
||||
// This gets overridden by rollup
|
||||
@@ -14493,7 +14502,7 @@ const wordlists = {
|
||||
|
||||
"use strict";
|
||||
|
||||
const version$g = "hdnode/5.0.7";
|
||||
const version$g = "hdnode/5.0.8";
|
||||
|
||||
"use strict";
|
||||
const logger$l = new Logger(version$g);
|
||||
@@ -14808,7 +14817,7 @@ function isValidMnemonic(mnemonic, wordlist) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const version$h = "random/5.0.6";
|
||||
const version$h = "random/5.0.7";
|
||||
|
||||
"use strict";
|
||||
const logger$m = new Logger(version$h);
|
||||
@@ -15666,7 +15675,7 @@ var aesJs = createCommonjsModule(function (module, exports) {
|
||||
})(commonjsGlobal);
|
||||
});
|
||||
|
||||
const version$i = "json-wallets/5.0.9";
|
||||
const version$i = "json-wallets/5.0.10";
|
||||
|
||||
"use strict";
|
||||
function looseArrayify(hexString) {
|
||||
@@ -16636,7 +16645,7 @@ function decryptJsonWalletSync(json, password) {
|
||||
throw new Error("invalid JSON wallet");
|
||||
}
|
||||
|
||||
const version$j = "wallet/5.0.9";
|
||||
const version$j = "wallet/5.0.10";
|
||||
|
||||
"use strict";
|
||||
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
@@ -16801,7 +16810,7 @@ function verifyTypedData(domain, types, value, signature) {
|
||||
return recoverAddress(TypedDataEncoder.hash(domain, types, value), signature);
|
||||
}
|
||||
|
||||
const version$k = "networks/5.0.6";
|
||||
const version$k = "networks/5.0.7";
|
||||
|
||||
"use strict";
|
||||
const logger$q = new Logger(version$k);
|
||||
@@ -17034,7 +17043,7 @@ var index$2 = /*#__PURE__*/Object.freeze({
|
||||
encode: encode$1
|
||||
});
|
||||
|
||||
const version$l = "web/5.0.11";
|
||||
const version$l = "web/5.0.12";
|
||||
|
||||
"use strict";
|
||||
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
@@ -17615,7 +17624,7 @@ var bech32 = {
|
||||
fromWords: fromWords
|
||||
};
|
||||
|
||||
const version$m = "providers/5.0.17";
|
||||
const version$m = "providers/5.0.19";
|
||||
|
||||
"use strict";
|
||||
const logger$s = new Logger(version$m);
|
||||
@@ -18461,11 +18470,30 @@ class BaseProvider extends Provider {
|
||||
_getInternalBlockNumber(maxAge) {
|
||||
return __awaiter$8(this, void 0, void 0, function* () {
|
||||
yield this._ready();
|
||||
const internalBlockNumber = this._internalBlockNumber;
|
||||
if (maxAge > 0 && this._internalBlockNumber) {
|
||||
const result = yield internalBlockNumber;
|
||||
if ((getTime() - result.respTime) <= maxAge) {
|
||||
return result.blockNumber;
|
||||
// Allowing stale data up to maxAge old
|
||||
if (maxAge > 0) {
|
||||
// While there are pending internal block requests...
|
||||
while (this._internalBlockNumber) {
|
||||
// ..."remember" which fetch we started with
|
||||
const internalBlockNumber = this._internalBlockNumber;
|
||||
try {
|
||||
// Check the result is not too stale
|
||||
const result = yield internalBlockNumber;
|
||||
if ((getTime() - result.respTime) <= maxAge) {
|
||||
return result.blockNumber;
|
||||
}
|
||||
// Too old; fetch a new value
|
||||
break;
|
||||
}
|
||||
catch (error) {
|
||||
// The fetch rejected; if we are the first to get the
|
||||
// rejection, drop through so we replace it with a new
|
||||
// fetch; all others blocked will then get that fetch
|
||||
// which won't match the one they "remembered" and loop
|
||||
if (this._internalBlockNumber === internalBlockNumber) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const reqTime = getTime();
|
||||
@@ -18490,6 +18518,13 @@ class BaseProvider extends Provider {
|
||||
return { blockNumber, reqTime, respTime };
|
||||
});
|
||||
this._internalBlockNumber = checkInternalBlockNumber;
|
||||
// Swallow unhandled exceptions; if needed they are handled else where
|
||||
checkInternalBlockNumber.catch((error) => {
|
||||
// Don't null the dead (rejected) fetch, if it has already been updated
|
||||
if (this._internalBlockNumber === checkInternalBlockNumber) {
|
||||
this._internalBlockNumber = null;
|
||||
}
|
||||
});
|
||||
return (yield checkInternalBlockNumber).blockNumber;
|
||||
});
|
||||
}
|
||||
@@ -18498,7 +18533,14 @@ class BaseProvider extends Provider {
|
||||
const pollId = nextPollId++;
|
||||
// Track all running promises, so we can trigger a post-poll once they are complete
|
||||
const runners = [];
|
||||
const blockNumber = yield this._getInternalBlockNumber(100 + this.pollingInterval / 2);
|
||||
let blockNumber = null;
|
||||
try {
|
||||
blockNumber = yield this._getInternalBlockNumber(100 + this.pollingInterval / 2);
|
||||
}
|
||||
catch (error) {
|
||||
this.emit("error", error);
|
||||
return;
|
||||
}
|
||||
this._setFastBlockNumber(blockNumber);
|
||||
// Emit a poll event after we have the latest (fast) block number
|
||||
this.emit("poll", pollId, blockNumber);
|
||||
@@ -18592,8 +18634,8 @@ class BaseProvider extends Provider {
|
||||
// Once all events for this loop have been processed, emit "didPoll"
|
||||
Promise.all(runners).then(() => {
|
||||
this.emit("didPoll", pollId);
|
||||
});
|
||||
return null;
|
||||
}).catch((error) => { this.emit("error", error); });
|
||||
return;
|
||||
});
|
||||
}
|
||||
// Deprecated; do not use this
|
||||
@@ -18656,7 +18698,7 @@ class BaseProvider extends Provider {
|
||||
get blockNumber() {
|
||||
this._getInternalBlockNumber(100 + this.pollingInterval / 2).then((blockNumber) => {
|
||||
this._setFastBlockNumber(blockNumber);
|
||||
});
|
||||
}, (error) => { });
|
||||
return (this._fastBlockNumber != null) ? this._fastBlockNumber : -1;
|
||||
}
|
||||
get polling() {
|
||||
@@ -18664,7 +18706,7 @@ class BaseProvider extends Provider {
|
||||
}
|
||||
set polling(value) {
|
||||
if (value && !this._poller) {
|
||||
this._poller = setInterval(this.poll.bind(this), this.pollingInterval);
|
||||
this._poller = setInterval(() => { this.poll(); }, this.pollingInterval);
|
||||
if (!this._bootstrapPoll) {
|
||||
this._bootstrapPoll = setTimeout(() => {
|
||||
this.poll();
|
||||
@@ -21733,7 +21775,7 @@ function sha256$2(types, values) {
|
||||
return sha256$1(pack$1(types, values));
|
||||
}
|
||||
|
||||
const version$n = "units/5.0.8";
|
||||
const version$n = "units/5.0.9";
|
||||
|
||||
"use strict";
|
||||
const logger$G = new Logger(version$n);
|
||||
@@ -21915,7 +21957,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
|
||||
Indexed: Indexed
|
||||
});
|
||||
|
||||
const version$o = "ethers/5.0.24";
|
||||
const version$o = "ethers/5.0.26";
|
||||
|
||||
"use strict";
|
||||
const logger$H = new Logger(version$o);
|
||||
|
||||
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
137
packages/ethers/dist/ethers.umd.js
vendored
137
packages/ethers/dist/ethers.umd.js
vendored
@@ -3812,7 +3812,7 @@
|
||||
var _version$2 = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "bytes/5.0.8";
|
||||
exports.version = "bytes/5.0.9";
|
||||
|
||||
});
|
||||
|
||||
@@ -4223,7 +4223,7 @@
|
||||
var _version$4 = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "bignumber/5.0.12";
|
||||
exports.version = "bignumber/5.0.13";
|
||||
|
||||
});
|
||||
|
||||
@@ -4915,7 +4915,7 @@
|
||||
var _version$6 = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "properties/5.0.6";
|
||||
exports.version = "properties/5.0.7";
|
||||
|
||||
});
|
||||
|
||||
@@ -5090,7 +5090,7 @@
|
||||
var _version$8 = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "abi/5.0.9";
|
||||
exports.version = "abi/5.0.10";
|
||||
|
||||
});
|
||||
|
||||
@@ -6597,7 +6597,7 @@
|
||||
var _version$a = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "rlp/5.0.6";
|
||||
exports.version = "rlp/5.0.7";
|
||||
|
||||
});
|
||||
|
||||
@@ -6734,7 +6734,7 @@
|
||||
var _version$c = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "address/5.0.8";
|
||||
exports.version = "address/5.0.9";
|
||||
|
||||
});
|
||||
|
||||
@@ -7523,7 +7523,7 @@
|
||||
var _version$e = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "strings/5.0.7";
|
||||
exports.version = "strings/5.0.8";
|
||||
|
||||
});
|
||||
|
||||
@@ -8297,7 +8297,7 @@
|
||||
var _version$g = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "hash/5.0.9";
|
||||
exports.version = "hash/5.0.10";
|
||||
|
||||
});
|
||||
|
||||
@@ -9469,7 +9469,7 @@
|
||||
var _version$i = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "abstract-provider/5.0.7";
|
||||
exports.version = "abstract-provider/5.0.8";
|
||||
|
||||
});
|
||||
|
||||
@@ -9600,7 +9600,7 @@
|
||||
var _version$k = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "abstract-signer/5.0.9";
|
||||
exports.version = "abstract-signer/5.0.11";
|
||||
|
||||
});
|
||||
|
||||
@@ -9814,7 +9814,7 @@
|
||||
Promise.resolve(tx.from),
|
||||
this.getAddress()
|
||||
]).then(function (result) {
|
||||
if (result[0] !== result[1]) {
|
||||
if (result[0].toLowerCase() !== result[1].toLowerCase()) {
|
||||
logger.throwArgumentError("from address mismatch", "transaction", transaction);
|
||||
}
|
||||
return result[0];
|
||||
@@ -9932,7 +9932,7 @@
|
||||
var _version$m = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "contracts/5.0.8";
|
||||
exports.version = "contracts/5.0.9";
|
||||
|
||||
});
|
||||
|
||||
@@ -10876,9 +10876,15 @@
|
||||
return result;
|
||||
};
|
||||
Contract.prototype.listenerCount = function (eventName) {
|
||||
var _this = this;
|
||||
if (!this.provider) {
|
||||
return 0;
|
||||
}
|
||||
if (eventName == null) {
|
||||
return Object.keys(this._runningEvents).reduce(function (accum, key) {
|
||||
return accum + _this._runningEvents[key].listenerCount();
|
||||
}, 0);
|
||||
}
|
||||
return this._getRunningEvent(eventName).listenerCount();
|
||||
};
|
||||
Contract.prototype.listeners = function (eventName) {
|
||||
@@ -12508,7 +12514,7 @@
|
||||
var _version$o = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "sha2/5.0.6";
|
||||
exports.version = "sha2/5.0.7";
|
||||
|
||||
});
|
||||
|
||||
@@ -15022,7 +15028,7 @@
|
||||
var _version$q = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "signing-key/5.0.7";
|
||||
exports.version = "signing-key/5.0.8";
|
||||
|
||||
});
|
||||
|
||||
@@ -15060,7 +15066,11 @@
|
||||
};
|
||||
SigningKey.prototype.signDigest = function (digest) {
|
||||
var keyPair = getCurve().keyFromPrivate(lib$1.arrayify(this.privateKey));
|
||||
var signature = keyPair.sign(lib$1.arrayify(digest), { canonical: true });
|
||||
var digestBytes = lib$1.arrayify(digest);
|
||||
if (digestBytes.length !== 32) {
|
||||
logger.throwArgumentError("bad digest length", "digest", digest);
|
||||
}
|
||||
var signature = keyPair.sign(digestBytes, { canonical: true });
|
||||
return lib$1.splitSignature({
|
||||
recoveryParam: signature.recoveryParam,
|
||||
r: lib$1.hexZeroPad("0x" + signature.r.toString(16), 32),
|
||||
@@ -15116,7 +15126,7 @@
|
||||
var _version$s = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "transactions/5.0.8";
|
||||
exports.version = "transactions/5.0.9";
|
||||
|
||||
});
|
||||
|
||||
@@ -15311,7 +15321,7 @@
|
||||
var _version$u = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "wordlists/5.0.7";
|
||||
exports.version = "wordlists/5.0.8";
|
||||
|
||||
});
|
||||
|
||||
@@ -16079,7 +16089,7 @@
|
||||
var _version$w = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "hdnode/5.0.7";
|
||||
exports.version = "hdnode/5.0.8";
|
||||
|
||||
});
|
||||
|
||||
@@ -16430,7 +16440,7 @@
|
||||
var _version$y = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "random/5.0.6";
|
||||
exports.version = "random/5.0.7";
|
||||
|
||||
});
|
||||
|
||||
@@ -17322,7 +17332,7 @@
|
||||
var _version$A = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "json-wallets/5.0.9";
|
||||
exports.version = "json-wallets/5.0.10";
|
||||
|
||||
});
|
||||
|
||||
@@ -18458,7 +18468,7 @@
|
||||
var _version$C = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "wallet/5.0.9";
|
||||
exports.version = "wallet/5.0.10";
|
||||
|
||||
});
|
||||
|
||||
@@ -18720,7 +18730,7 @@
|
||||
var _version$E = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "networks/5.0.6";
|
||||
exports.version = "networks/5.0.7";
|
||||
|
||||
});
|
||||
|
||||
@@ -18981,7 +18991,7 @@
|
||||
var _version$G = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "web/5.0.11";
|
||||
exports.version = "web/5.0.12";
|
||||
|
||||
});
|
||||
|
||||
@@ -19685,7 +19695,7 @@
|
||||
var _version$I = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "providers/5.0.17";
|
||||
exports.version = "providers/5.0.19";
|
||||
|
||||
});
|
||||
|
||||
@@ -20682,23 +20692,41 @@
|
||||
// than maxAge old or has been requested since the last request
|
||||
BaseProvider.prototype._getInternalBlockNumber = function (maxAge) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var internalBlockNumber, result, reqTime, checkInternalBlockNumber;
|
||||
var internalBlockNumber, result, error_2, reqTime, checkInternalBlockNumber;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, this._ready()];
|
||||
case 1:
|
||||
_a.sent();
|
||||
internalBlockNumber = this._internalBlockNumber;
|
||||
if (!(maxAge > 0 && this._internalBlockNumber)) return [3 /*break*/, 3];
|
||||
return [4 /*yield*/, internalBlockNumber];
|
||||
if (!(maxAge > 0)) return [3 /*break*/, 7];
|
||||
_a.label = 2;
|
||||
case 2:
|
||||
if (!this._internalBlockNumber) return [3 /*break*/, 7];
|
||||
internalBlockNumber = this._internalBlockNumber;
|
||||
_a.label = 3;
|
||||
case 3:
|
||||
_a.trys.push([3, 5, , 6]);
|
||||
return [4 /*yield*/, internalBlockNumber];
|
||||
case 4:
|
||||
result = _a.sent();
|
||||
if ((getTime() - result.respTime) <= maxAge) {
|
||||
return [2 /*return*/, result.blockNumber];
|
||||
}
|
||||
_a.label = 3;
|
||||
case 3:
|
||||
// Too old; fetch a new value
|
||||
return [3 /*break*/, 7];
|
||||
case 5:
|
||||
error_2 = _a.sent();
|
||||
// The fetch rejected; if we are the first to get the
|
||||
// rejection, drop through so we replace it with a new
|
||||
// fetch; all others blocked will then get that fetch
|
||||
// which won't match the one they "remembered" and loop
|
||||
if (this._internalBlockNumber === internalBlockNumber) {
|
||||
return [3 /*break*/, 7];
|
||||
}
|
||||
return [3 /*break*/, 6];
|
||||
case 6: return [3 /*break*/, 2];
|
||||
case 7:
|
||||
reqTime = getTime();
|
||||
checkInternalBlockNumber = lib$3.resolveProperties({
|
||||
blockNumber: this.perform("getBlockNumber", {}),
|
||||
@@ -20722,24 +20750,41 @@
|
||||
return { blockNumber: blockNumber, reqTime: reqTime, respTime: respTime };
|
||||
});
|
||||
this._internalBlockNumber = checkInternalBlockNumber;
|
||||
// Swallow unhandled exceptions; if needed they are handled else where
|
||||
checkInternalBlockNumber.catch(function (error) {
|
||||
// Don't null the dead (rejected) fetch, if it has already been updated
|
||||
if (_this._internalBlockNumber === checkInternalBlockNumber) {
|
||||
_this._internalBlockNumber = null;
|
||||
}
|
||||
});
|
||||
return [4 /*yield*/, checkInternalBlockNumber];
|
||||
case 4: return [2 /*return*/, (_a.sent()).blockNumber];
|
||||
case 8: return [2 /*return*/, (_a.sent()).blockNumber];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
BaseProvider.prototype.poll = function () {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var pollId, runners, blockNumber, i;
|
||||
var pollId, runners, blockNumber, error_3, i;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
pollId = nextPollId++;
|
||||
runners = [];
|
||||
return [4 /*yield*/, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];
|
||||
blockNumber = null;
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
_a.trys.push([1, 3, , 4]);
|
||||
return [4 /*yield*/, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];
|
||||
case 2:
|
||||
blockNumber = _a.sent();
|
||||
return [3 /*break*/, 4];
|
||||
case 3:
|
||||
error_3 = _a.sent();
|
||||
this.emit("error", error_3);
|
||||
return [2 /*return*/];
|
||||
case 4:
|
||||
this._setFastBlockNumber(blockNumber);
|
||||
// Emit a poll event after we have the latest (fast) block number
|
||||
this.emit("poll", pollId, blockNumber);
|
||||
@@ -20833,8 +20878,8 @@
|
||||
// Once all events for this loop have been processed, emit "didPoll"
|
||||
Promise.all(runners).then(function () {
|
||||
_this.emit("didPoll", pollId);
|
||||
});
|
||||
return [2 /*return*/, null];
|
||||
}).catch(function (error) { _this.emit("error", error); });
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -20912,7 +20957,7 @@
|
||||
var _this = this;
|
||||
this._getInternalBlockNumber(100 + this.pollingInterval / 2).then(function (blockNumber) {
|
||||
_this._setFastBlockNumber(blockNumber);
|
||||
});
|
||||
}, function (error) { });
|
||||
return (this._fastBlockNumber != null) ? this._fastBlockNumber : -1;
|
||||
},
|
||||
enumerable: true,
|
||||
@@ -20925,7 +20970,7 @@
|
||||
set: function (value) {
|
||||
var _this = this;
|
||||
if (value && !this._poller) {
|
||||
this._poller = setInterval(this.poll.bind(this), this.pollingInterval);
|
||||
this._poller = setInterval(function () { _this.poll(); }, this.pollingInterval);
|
||||
if (!this._bootstrapPoll) {
|
||||
this._bootstrapPoll = setTimeout(function () {
|
||||
_this.poll();
|
||||
@@ -21205,7 +21250,7 @@
|
||||
};
|
||||
BaseProvider.prototype.sendTransaction = function (signedTransaction) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var hexTx, tx, hash, error_2;
|
||||
var hexTx, tx, hash, error_4;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, this.getNetwork()];
|
||||
@@ -21223,10 +21268,10 @@
|
||||
hash = _a.sent();
|
||||
return [2 /*return*/, this._wrapTransaction(tx, hash)];
|
||||
case 5:
|
||||
error_2 = _a.sent();
|
||||
error_2.transaction = tx;
|
||||
error_2.transactionHash = tx.hash;
|
||||
throw error_2;
|
||||
error_4 = _a.sent();
|
||||
error_4.transaction = tx;
|
||||
error_4.transactionHash = tx.hash;
|
||||
throw error_4;
|
||||
case 6: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
@@ -21360,7 +21405,7 @@
|
||||
};
|
||||
BaseProvider.prototype._getBlock = function (blockHashOrBlockTag, includeTransactions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var blockNumber, params, _a, _b, _c, error_3;
|
||||
var blockNumber, params, _a, _b, _c, error_5;
|
||||
var _this = this;
|
||||
return __generator(this, function (_d) {
|
||||
switch (_d.label) {
|
||||
@@ -21389,7 +21434,7 @@
|
||||
}
|
||||
return [3 /*break*/, 6];
|
||||
case 5:
|
||||
error_3 = _d.sent();
|
||||
error_5 = _d.sent();
|
||||
logger.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag);
|
||||
return [3 /*break*/, 6];
|
||||
case 6: return [2 /*return*/, lib$q.poll(function () { return __awaiter(_this, void 0, void 0, function () {
|
||||
@@ -25061,7 +25106,7 @@
|
||||
var _version$K = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "units/5.0.8";
|
||||
exports.version = "units/5.0.9";
|
||||
|
||||
});
|
||||
|
||||
@@ -25298,7 +25343,7 @@
|
||||
var _version$M = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "ethers/5.0.24";
|
||||
exports.version = "ethers/5.0.26";
|
||||
|
||||
});
|
||||
|
||||
|
||||
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
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user