Updated dist files.

This commit is contained in:
Richard Moore 2020-05-01 17:00:44 -04:00
parent 1e21eb034b
commit 0d71cfb92c
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
65 changed files with 944 additions and 296 deletions

@ -2,6 +2,17 @@ Changelog
========= =========
This change log is managed by `scripts/cmds/update-versions` but may be manually updated. This change log is managed by `scripts/cmds/update-versions` but may be manually updated.
During the v5-BETA, although attempts are made to minimize it, some of the APIs
may change. It is generally recommended that you remove your `node_modules/`,
`package-lock.json` (and similar files for yarn, etc.) and doing an `npm install`
after upgrading to a newer version of the v5-BETA.
ethers/v5.0.0-beta.185 (2020-05-01 16:45)
-----------------------------------------
- Allow modifiers on Human-Readable ABI for tuples and arrays. ([83fba3d](https://github.com/ethers-io/ethers.js/commit/83fba3de25b524cc48975b1952f4319d63874205))
- Added initial renew support to ENS CLI. ([54dfb75](https://github.com/ethers-io/ethers.js/commit/54dfb757c4c88e4bcada1890c4016fadfb25581a))
- Allow contract filters to include OR-ed values. ([#437](https://github.com/ethers-io/ethers.js/issues/437); [28800d7](https://github.com/ethers-io/ethers.js/commit/28800d7681f3bab08f6d30a22f0813e04feee18a))
ethers/v5.0.0-beta.184 (2020-04-28 04:58) ethers/v5.0.0-beta.184 (2020-04-28 04:58)
----------------------------------------- -----------------------------------------

@ -1 +1 @@
export declare const version = "abi/5.0.0-beta.152"; export declare const version = "abi/5.0.0-beta.153";

@ -1 +1 @@
export const version = "abi/5.0.0-beta.152"; export const version = "abi/5.0.0-beta.153";

@ -7,6 +7,7 @@ const logger = new Logger(version);
; ;
const _constructorGuard = {}; const _constructorGuard = {};
let ModifiersBytes = { calldata: true, memory: true, storage: true }; let ModifiersBytes = { calldata: true, memory: true, storage: true };
let ModifiersNest = { calldata: true, memory: true };
function checkModifier(type, name) { function checkModifier(type, name) {
if (type === "bytes" || type === "string") { if (type === "bytes" || type === "string") {
if (ModifiersBytes[name]) { if (ModifiersBytes[name]) {
@ -18,6 +19,11 @@ function checkModifier(type, name) {
return true; return true;
} }
} }
else if (type.indexOf("[") >= 0 || type === "tuple") {
if (ModifiersNest[name]) {
return true;
}
}
if (ModifiersBytes[name] || name === "payable") { if (ModifiersBytes[name] || name === "payable") {
logger.throwArgumentError("invalid modifier", "name", name); logger.throwArgumentError("invalid modifier", "name", name);
} }

@ -276,6 +276,19 @@ export class Interface {
if (!eventFragment.anonymous) { if (!eventFragment.anonymous) {
topics.push(this.getEventTopic(eventFragment)); topics.push(this.getEventTopic(eventFragment));
} }
const encodeTopic = (param, value) => {
if (param.type === "string") {
return id(value);
}
else if (param.type === "bytes") {
return keccak256(hexlify(value));
}
// Check addresses are valid
if (param.type === "address") {
this._abiCoder.encode(["address"], [value]);
}
return hexZeroPad(hexlify(value), 32);
};
values.forEach((value, index) => { values.forEach((value, index) => {
let param = eventFragment.inputs[index]; let param = eventFragment.inputs[index];
if (!param.indexed) { if (!param.indexed) {
@ -287,21 +300,14 @@ export class Interface {
if (value == null) { if (value == null) {
topics.push(null); topics.push(null);
} }
else if (param.type === "string") { else if (param.baseType === "array" || param.baseType === "tuple") {
topics.push(id(value));
}
else if (param.type === "bytes") {
topics.push(keccak256(hexlify(value)));
}
else if (param.type.indexOf("[") !== -1 || param.type.substring(0, 5) === "tuple") {
logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value);
} }
else if (Array.isArray(value)) {
topics.push(value.map((value) => encodeTopic(param, value)));
}
else { else {
// Check addresses are valid topics.push(encodeTopic(param, value));
if (param.type === "address") {
this._abiCoder.encode(["address"], [value]);
}
topics.push(hexZeroPad(hexlify(value), 32));
} }
}); });
// Trim off trailing nulls // Trim off trailing nulls

@ -1 +1 @@
export declare const version = "abi/5.0.0-beta.152"; export declare const version = "abi/5.0.0-beta.153";

@ -1,3 +1,3 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "abi/5.0.0-beta.152"; exports.version = "abi/5.0.0-beta.153";

@ -21,6 +21,7 @@ var logger = new logger_1.Logger(_version_1.version);
; ;
var _constructorGuard = {}; var _constructorGuard = {};
var ModifiersBytes = { calldata: true, memory: true, storage: true }; var ModifiersBytes = { calldata: true, memory: true, storage: true };
var ModifiersNest = { calldata: true, memory: true };
function checkModifier(type, name) { function checkModifier(type, name) {
if (type === "bytes" || type === "string") { if (type === "bytes" || type === "string") {
if (ModifiersBytes[name]) { if (ModifiersBytes[name]) {
@ -32,6 +33,11 @@ function checkModifier(type, name) {
return true; return true;
} }
} }
else if (type.indexOf("[") >= 0 || type === "tuple") {
if (ModifiersNest[name]) {
return true;
}
}
if (ModifiersBytes[name] || name === "payable") { if (ModifiersBytes[name] || name === "payable") {
logger.throwArgumentError("invalid modifier", "name", name); logger.throwArgumentError("invalid modifier", "name", name);
} }

@ -311,6 +311,19 @@ var Interface = /** @class */ (function () {
if (!eventFragment.anonymous) { if (!eventFragment.anonymous) {
topics.push(this.getEventTopic(eventFragment)); topics.push(this.getEventTopic(eventFragment));
} }
var encodeTopic = function (param, value) {
if (param.type === "string") {
return hash_1.id(value);
}
else if (param.type === "bytes") {
return keccak256_1.keccak256(bytes_1.hexlify(value));
}
// Check addresses are valid
if (param.type === "address") {
_this._abiCoder.encode(["address"], [value]);
}
return bytes_1.hexZeroPad(bytes_1.hexlify(value), 32);
};
values.forEach(function (value, index) { values.forEach(function (value, index) {
var param = eventFragment.inputs[index]; var param = eventFragment.inputs[index];
if (!param.indexed) { if (!param.indexed) {
@ -322,21 +335,14 @@ var Interface = /** @class */ (function () {
if (value == null) { if (value == null) {
topics.push(null); topics.push(null);
} }
else if (param.type === "string") { else if (param.baseType === "array" || param.baseType === "tuple") {
topics.push(hash_1.id(value));
}
else if (param.type === "bytes") {
topics.push(keccak256_1.keccak256(bytes_1.hexlify(value)));
}
else if (param.type.indexOf("[") !== -1 || param.type.substring(0, 5) === "tuple") {
logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value);
} }
else if (Array.isArray(value)) {
topics.push(value.map(function (value) { return encodeTopic(param, value); }));
}
else { else {
// Check addresses are valid topics.push(encodeTopic(param, value));
if (param.type === "address") {
_this._abiCoder.encode(["address"], [value]);
}
topics.push(bytes_1.hexZeroPad(bytes_1.hexlify(value), 32));
} }
}); });
// Trim off trailing nulls // Trim off trailing nulls

@ -31,7 +31,7 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"tarballHash": "0x109653533bca166a77b4d0b473f2113fb87d8a40f5559cb935697fa04a73afb1", "tarballHash": "0x7fd77ad0e6f0df98c7f7b5f91552b5c5ce359a2fbd05a9ab852bec00530a7712",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"version": "5.0.0-beta.152" "version": "5.0.0-beta.153"
} }

@ -1 +1 @@
export const version = "abi/5.0.0-beta.152"; export const version = "abi/5.0.0-beta.153";

@ -1 +1 @@
export declare const version = "abstract-signer/5.0.0-beta.141"; export declare const version = "abstract-signer/5.0.0-beta.142";

@ -1 +1 @@
export const version = "abstract-signer/5.0.0-beta.141"; export const version = "abstract-signer/5.0.0-beta.142";

@ -31,25 +31,31 @@ export class Signer {
/////////////////// ///////////////////
// Sub-classes MAY override these // Sub-classes MAY override these
getBalance(blockTag) { getBalance(blockTag) {
this._checkProvider("getBalance"); return __awaiter(this, void 0, void 0, function* () {
return this.provider.getBalance(this.getAddress(), blockTag); this._checkProvider("getBalance");
return yield this.provider.getBalance(this.getAddress(), blockTag);
});
} }
getTransactionCount(blockTag) { getTransactionCount(blockTag) {
this._checkProvider("getTransactionCount"); return __awaiter(this, void 0, void 0, function* () {
return this.provider.getTransactionCount(this.getAddress(), blockTag); this._checkProvider("getTransactionCount");
return yield this.provider.getTransactionCount(this.getAddress(), blockTag);
});
} }
// Populates "from" if unspecified, and estimates the gas for the transation // Populates "from" if unspecified, and estimates the gas for the transation
estimateGas(transaction) { estimateGas(transaction) {
this._checkProvider("estimateGas"); return __awaiter(this, void 0, void 0, function* () {
return resolveProperties(this.checkTransaction(transaction)).then((tx) => { this._checkProvider("estimateGas");
return this.provider.estimateGas(tx); const tx = yield resolveProperties(this.checkTransaction(transaction));
return yield this.provider.estimateGas(tx);
}); });
} }
// Populates "from" if unspecified, and calls with the transation // Populates "from" if unspecified, and calls with the transation
call(transaction, blockTag) { call(transaction, blockTag) {
this._checkProvider("call"); return __awaiter(this, void 0, void 0, function* () {
return resolveProperties(this.checkTransaction(transaction)).then((tx) => { this._checkProvider("call");
return this.provider.call(tx, blockTag); const tx = yield resolveProperties(this.checkTransaction(transaction));
return yield this.provider.call(tx, blockTag);
}); });
} }
// Populates all fields in a transaction, signs it and sends it to the network // Populates all fields in a transaction, signs it and sends it to the network
@ -62,16 +68,23 @@ export class Signer {
}); });
} }
getChainId() { getChainId() {
this._checkProvider("getChainId"); return __awaiter(this, void 0, void 0, function* () {
return this.provider.getNetwork().then((network) => network.chainId); this._checkProvider("getChainId");
const network = yield this.provider.getNetwork();
return network.chainId;
});
} }
getGasPrice() { getGasPrice() {
this._checkProvider("getGasPrice"); return __awaiter(this, void 0, void 0, function* () {
return this.provider.getGasPrice(); this._checkProvider("getGasPrice");
return yield this.provider.getGasPrice();
});
} }
resolveName(name) { resolveName(name) {
this._checkProvider("resolveName"); return __awaiter(this, void 0, void 0, function* () {
return this.provider.resolveName(name); this._checkProvider("resolveName");
return yield this.provider.resolveName(name);
});
} }
// Checks a transaction does not contain invalid keys and if // Checks a transaction does not contain invalid keys and if
// no "from" is provided, populates it. // no "from" is provided, populates it.

@ -1 +1 @@
export declare const version = "abstract-signer/5.0.0-beta.141"; export declare const version = "abstract-signer/5.0.0-beta.142";

@ -1,3 +1,3 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "abstract-signer/5.0.0-beta.141"; exports.version = "abstract-signer/5.0.0-beta.142";

@ -73,27 +73,61 @@ var Signer = /** @class */ (function () {
/////////////////// ///////////////////
// Sub-classes MAY override these // Sub-classes MAY override these
Signer.prototype.getBalance = function (blockTag) { Signer.prototype.getBalance = function (blockTag) {
this._checkProvider("getBalance"); return __awaiter(this, void 0, void 0, function () {
return this.provider.getBalance(this.getAddress(), blockTag); return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("getBalance");
return [4 /*yield*/, this.provider.getBalance(this.getAddress(), blockTag)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
}; };
Signer.prototype.getTransactionCount = function (blockTag) { Signer.prototype.getTransactionCount = function (blockTag) {
this._checkProvider("getTransactionCount"); return __awaiter(this, void 0, void 0, function () {
return this.provider.getTransactionCount(this.getAddress(), blockTag); return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("getTransactionCount");
return [4 /*yield*/, this.provider.getTransactionCount(this.getAddress(), blockTag)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
}; };
// Populates "from" if unspecified, and estimates the gas for the transation // Populates "from" if unspecified, and estimates the gas for the transation
Signer.prototype.estimateGas = function (transaction) { Signer.prototype.estimateGas = function (transaction) {
var _this = this; return __awaiter(this, void 0, void 0, function () {
this._checkProvider("estimateGas"); var tx;
return properties_1.resolveProperties(this.checkTransaction(transaction)).then(function (tx) { return __generator(this, function (_a) {
return _this.provider.estimateGas(tx); switch (_a.label) {
case 0:
this._checkProvider("estimateGas");
return [4 /*yield*/, properties_1.resolveProperties(this.checkTransaction(transaction))];
case 1:
tx = _a.sent();
return [4 /*yield*/, this.provider.estimateGas(tx)];
case 2: return [2 /*return*/, _a.sent()];
}
});
}); });
}; };
// Populates "from" if unspecified, and calls with the transation // Populates "from" if unspecified, and calls with the transation
Signer.prototype.call = function (transaction, blockTag) { Signer.prototype.call = function (transaction, blockTag) {
var _this = this; return __awaiter(this, void 0, void 0, function () {
this._checkProvider("call"); var tx;
return properties_1.resolveProperties(this.checkTransaction(transaction)).then(function (tx) { return __generator(this, function (_a) {
return _this.provider.call(tx, blockTag); switch (_a.label) {
case 0:
this._checkProvider("call");
return [4 /*yield*/, properties_1.resolveProperties(this.checkTransaction(transaction))];
case 1:
tx = _a.sent();
return [4 /*yield*/, this.provider.call(tx, blockTag)];
case 2: return [2 /*return*/, _a.sent()];
}
});
}); });
}; };
// Populates all fields in a transaction, signs it and sends it to the network // Populates all fields in a transaction, signs it and sends it to the network
@ -107,16 +141,43 @@ var Signer = /** @class */ (function () {
}); });
}; };
Signer.prototype.getChainId = function () { Signer.prototype.getChainId = function () {
this._checkProvider("getChainId"); return __awaiter(this, void 0, void 0, function () {
return this.provider.getNetwork().then(function (network) { return network.chainId; }); var network;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("getChainId");
return [4 /*yield*/, this.provider.getNetwork()];
case 1:
network = _a.sent();
return [2 /*return*/, network.chainId];
}
});
});
}; };
Signer.prototype.getGasPrice = function () { Signer.prototype.getGasPrice = function () {
this._checkProvider("getGasPrice"); return __awaiter(this, void 0, void 0, function () {
return this.provider.getGasPrice(); return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("getGasPrice");
return [4 /*yield*/, this.provider.getGasPrice()];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
}; };
Signer.prototype.resolveName = function (name) { Signer.prototype.resolveName = function (name) {
this._checkProvider("resolveName"); return __awaiter(this, void 0, void 0, function () {
return this.provider.resolveName(name); return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("resolveName");
return [4 /*yield*/, this.provider.resolveName(name)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
}; };
// Checks a transaction does not contain invalid keys and if // Checks a transaction does not contain invalid keys and if
// no "from" is provided, populates it. // no "from" is provided, populates it.

@ -27,7 +27,7 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"tarballHash": "0x81934b72f07020a63a2f9b53d0df6bb79e1d99ef4522750dbcea34ffecfe8f02", "tarballHash": "0xa925460f603ca591a3d22f158741982670c91e1473d22c80c949889911b48164",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"version": "5.0.0-beta.141" "version": "5.0.0-beta.142"
} }

@ -1 +1 @@
export const version = "abstract-signer/5.0.0-beta.141"; export const version = "abstract-signer/5.0.0-beta.142";

@ -1 +1 @@
export declare const version = "cli/5.0.0-beta.154"; export declare const version = "cli/5.0.0-beta.155";

@ -1 +1 @@
export const version = "cli/5.0.0-beta.154"; export const version = "cli/5.0.0-beta.155";

@ -40,7 +40,8 @@ const ethControllerAbi = [
const ethRegistrarAbi = [ const ethRegistrarAbi = [
"function ownerOf(uint256 tokenId) view returns (address)", "function ownerOf(uint256 tokenId) view returns (address)",
"function reclaim(uint256 id, address owner) @500000", "function reclaim(uint256 id, address owner) @500000",
"function safeTransferFrom(address from, address to, uint256 tokenId) @500000" "function safeTransferFrom(address from, address to, uint256 tokenId) @500000",
"function nameExpires(uint256 id) external view returns(uint)"
]; ];
const resolverAbi = [ const resolverAbi = [
"function interfaceImplementer(bytes32 nodehash, bytes4 interfaceId) view returns (address)", "function interfaceImplementer(bytes32 nodehash, bytes4 interfaceId) view returns (address)",
@ -836,6 +837,133 @@ class ReclaimPlugin extends AddressAccountPlugin {
} }
} }
cli.addPlugin("reclaim", ReclaimPlugin); cli.addPlugin("reclaim", ReclaimPlugin);
function zpad(value, length) {
let v = String(value);
while (v.length < length) {
v = "0" + v;
}
return v;
}
function formatDate(date) {
const count = Math.round((date.getTime() - (new Date()).getTime()) / (24 * 60 * 60 * 1000));
return [
date.getFullYear(),
zpad(date.getMonth() + 1, 2),
zpad(date.getDate(), 2)
].join("-") + ` (${count} days from now)`;
}
class RenewPlugin extends EnsPlugin {
static getHelp() {
return {
name: "renew NAME [ NAME ... ]",
help: "Reset the controller by the registrant"
};
}
static getOptionHelp() {
return [
{
name: "[ --duration DAYS ]",
help: "Register duration (default: 365 days)"
},
{
name: "[ --until YYYY-MM-DD ]",
help: "Register until date"
},
];
}
getDuration(startDate, until) {
const match = until.match(/^(\d\d\d\d)-(\d\d)-(\d\d)$/);
if (!match) {
this.throwError("invalid date format; use YYYY-MM-DD");
}
const year = parseInt(match[1]);
const month = parseInt(match[2]);
const day = parseInt(match[3]);
// Not perfect; allow February 30 or April 31 @TODO?
if (month < 1 || month > 12 || day < 1 || day > 31) {
this.throwError("date out of range");
}
const endDate = (new Date(year, month - 1, day)).getTime() / 1000;
return Math.ceil(endDate - startDate);
}
prepareOptions(argParser) {
const _super = Object.create(null, {
prepareOptions: { get: () => super.prepareOptions }
});
return __awaiter(this, void 0, void 0, function* () {
yield _super.prepareOptions.call(this, argParser);
if (this.accounts.length !== 1) {
this.throwError("new requires ONE account");
}
const timespans = argParser.consumeMultiOptions(["duration", "until"]);
if (timespans.length === 1) {
const timespan = timespans.pop();
if (timespan.name === "duration") {
this.duration = parseInt(timespan.value) * 60 * 60 * 24;
}
else if (timespan.name === "until") {
this.until = timespan.value;
}
}
else if (timespans.length > 1) {
this.throwError("renew requires at most ONE of --duration or --until");
}
else {
this.duration = 365 * 60 * 60 * 24;
}
});
}
prepareArgs(args) {
const _super = Object.create(null, {
prepareArgs: { get: () => super.prepareArgs }
});
return __awaiter(this, void 0, void 0, function* () {
yield _super.prepareArgs.call(this, args);
const labels = [];
args.forEach((arg) => {
const comps = arg.split(".");
if (comps.length !== 2 || comps[1] !== "eth") {
this.throwError(`name not supported ${JSON.stringify(arg)}`);
}
labels.push(comps[0]);
});
this.labels = Object.freeze(labels);
});
}
run() {
const _super = Object.create(null, {
run: { get: () => super.run }
});
return __awaiter(this, void 0, void 0, function* () {
yield _super.run.call(this);
const ethController = yield this.getEthController();
const ethRegistrar = yield this.getEthRegistrar();
for (let i = 0; i < this.labels.length; i++) {
const label = this.labels[i];
console.log(label);
const expiration = (yield ethRegistrar.nameExpires(ethers.utils.id(label))).toNumber();
if (expiration === 0) {
this.throwError(`not registered: ${label}`);
}
const duration = this.duration ? this.duration : this.getDuration(expiration, this.until);
if (duration < 0) {
this.throwError(`bad duration: ${duration}`);
}
const fee = (yield ethController.rentPrice(label, duration)).mul(11).div(10);
this.dump(`Renew: ${label}.eth`, {
"Current Expiry": formatDate(new Date(expiration * 1000)),
"Duration": `${(duration / (24 * 60 * 60))} days`,
"Until": formatDate(new Date((expiration + duration) * 1000)),
"Fee": `${ethers.utils.formatEther(fee)} (+10% buffer)`,
});
yield ethController.renew(label, duration, {
value: fee
});
}
});
}
}
cli.addPlugin("renew", RenewPlugin);
/** /**
* To Do: * To Do:
* register NAME --registrar * register NAME --registrar

@ -1 +1 @@
export declare const version = "cli/5.0.0-beta.154"; export declare const version = "cli/5.0.0-beta.155";

@ -1,3 +1,3 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "cli/5.0.0-beta.154"; exports.version = "cli/5.0.0-beta.155";

@ -81,7 +81,8 @@ var ethControllerAbi = [
var ethRegistrarAbi = [ var ethRegistrarAbi = [
"function ownerOf(uint256 tokenId) view returns (address)", "function ownerOf(uint256 tokenId) view returns (address)",
"function reclaim(uint256 id, address owner) @500000", "function reclaim(uint256 id, address owner) @500000",
"function safeTransferFrom(address from, address to, uint256 tokenId) @500000" "function safeTransferFrom(address from, address to, uint256 tokenId) @500000",
"function nameExpires(uint256 id) external view returns(uint)"
]; ];
var resolverAbi = [ var resolverAbi = [
"function interfaceImplementer(bytes32 nodehash, bytes4 interfaceId) view returns (address)", "function interfaceImplementer(bytes32 nodehash, bytes4 interfaceId) view returns (address)",
@ -1309,6 +1310,170 @@ var ReclaimPlugin = /** @class */ (function (_super) {
return ReclaimPlugin; return ReclaimPlugin;
}(AddressAccountPlugin)); }(AddressAccountPlugin));
cli.addPlugin("reclaim", ReclaimPlugin); cli.addPlugin("reclaim", ReclaimPlugin);
function zpad(value, length) {
var v = String(value);
while (v.length < length) {
v = "0" + v;
}
return v;
}
function formatDate(date) {
var count = Math.round((date.getTime() - (new Date()).getTime()) / (24 * 60 * 60 * 1000));
return [
date.getFullYear(),
zpad(date.getMonth() + 1, 2),
zpad(date.getDate(), 2)
].join("-") + (" (" + count + " days from now)");
}
var RenewPlugin = /** @class */ (function (_super) {
__extends(RenewPlugin, _super);
function RenewPlugin() {
return _super !== null && _super.apply(this, arguments) || this;
}
RenewPlugin.getHelp = function () {
return {
name: "renew NAME [ NAME ... ]",
help: "Reset the controller by the registrant"
};
};
RenewPlugin.getOptionHelp = function () {
return [
{
name: "[ --duration DAYS ]",
help: "Register duration (default: 365 days)"
},
{
name: "[ --until YYYY-MM-DD ]",
help: "Register until date"
},
];
};
RenewPlugin.prototype.getDuration = function (startDate, until) {
var match = until.match(/^(\d\d\d\d)-(\d\d)-(\d\d)$/);
if (!match) {
this.throwError("invalid date format; use YYYY-MM-DD");
}
var year = parseInt(match[1]);
var month = parseInt(match[2]);
var day = parseInt(match[3]);
// Not perfect; allow February 30 or April 31 @TODO?
if (month < 1 || month > 12 || day < 1 || day > 31) {
this.throwError("date out of range");
}
var endDate = (new Date(year, month - 1, day)).getTime() / 1000;
return Math.ceil(endDate - startDate);
};
RenewPlugin.prototype.prepareOptions = function (argParser) {
return __awaiter(this, void 0, void 0, function () {
var timespans, timespan;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, _super.prototype.prepareOptions.call(this, argParser)];
case 1:
_a.sent();
if (this.accounts.length !== 1) {
this.throwError("new requires ONE account");
}
timespans = argParser.consumeMultiOptions(["duration", "until"]);
if (timespans.length === 1) {
timespan = timespans.pop();
if (timespan.name === "duration") {
this.duration = parseInt(timespan.value) * 60 * 60 * 24;
}
else if (timespan.name === "until") {
this.until = timespan.value;
}
}
else if (timespans.length > 1) {
this.throwError("renew requires at most ONE of --duration or --until");
}
else {
this.duration = 365 * 60 * 60 * 24;
}
return [2 /*return*/];
}
});
});
};
RenewPlugin.prototype.prepareArgs = function (args) {
return __awaiter(this, void 0, void 0, function () {
var labels;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, _super.prototype.prepareArgs.call(this, args)];
case 1:
_a.sent();
labels = [];
args.forEach(function (arg) {
var comps = arg.split(".");
if (comps.length !== 2 || comps[1] !== "eth") {
_this.throwError("name not supported " + JSON.stringify(arg));
}
labels.push(comps[0]);
});
this.labels = Object.freeze(labels);
return [2 /*return*/];
}
});
});
};
RenewPlugin.prototype.run = function () {
return __awaiter(this, void 0, void 0, function () {
var ethController, ethRegistrar, i, label, expiration, duration, fee;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, _super.prototype.run.call(this)];
case 1:
_a.sent();
return [4 /*yield*/, this.getEthController()];
case 2:
ethController = _a.sent();
return [4 /*yield*/, this.getEthRegistrar()];
case 3:
ethRegistrar = _a.sent();
i = 0;
_a.label = 4;
case 4:
if (!(i < this.labels.length)) return [3 /*break*/, 9];
label = this.labels[i];
console.log(label);
return [4 /*yield*/, ethRegistrar.nameExpires(ethers_1.ethers.utils.id(label))];
case 5:
expiration = (_a.sent()).toNumber();
if (expiration === 0) {
this.throwError("not registered: " + label);
}
duration = this.duration ? this.duration : this.getDuration(expiration, this.until);
if (duration < 0) {
this.throwError("bad duration: " + duration);
}
return [4 /*yield*/, ethController.rentPrice(label, duration)];
case 6:
fee = (_a.sent()).mul(11).div(10);
this.dump("Renew: " + label + ".eth", {
"Current Expiry": formatDate(new Date(expiration * 1000)),
"Duration": (duration / (24 * 60 * 60)) + " days",
"Until": formatDate(new Date((expiration + duration) * 1000)),
"Fee": ethers_1.ethers.utils.formatEther(fee) + " (+10% buffer)",
});
return [4 /*yield*/, ethController.renew(label, duration, {
value: fee
})];
case 7:
_a.sent();
_a.label = 8;
case 8:
i++;
return [3 /*break*/, 4];
case 9: return [2 /*return*/];
}
});
});
};
return RenewPlugin;
}(EnsPlugin));
cli.addPlugin("renew", RenewPlugin);
/** /**
* To Do: * To Do:
* register NAME --registrar * register NAME --registrar

@ -41,7 +41,7 @@
"scripts": { "scripts": {
"test": "exit 1" "test": "exit 1"
}, },
"tarballHash": "0x2d6a8cc1828811b7930f6c664a444d0c1438783f2b94950398f228b998ad814d", "tarballHash": "0xad597cdc47ab672ab840dbb4d6a48e73dd31bd0490be2c98e11e6f7807ee0d9b",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"version": "5.0.0-beta.154" "version": "5.0.0-beta.155"
} }

@ -1 +1 @@
export const version = "cli/5.0.0-beta.154"; export const version = "cli/5.0.0-beta.155";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -4689,9 +4689,18 @@ class FixedNumber {
} }
} }
const version$3 = "properties/5.0.0-beta.139"; const version$3 = "properties/5.0.0-beta.140";
"use strict"; "use strict";
var __awaiter = (window && window.__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());
});
};
const logger$3 = new Logger(version$3); const logger$3 = new Logger(version$3);
function defineReadOnly(object, name, value) { function defineReadOnly(object, name, value) {
Object.defineProperty(object, name, { Object.defineProperty(object, name, {
@ -4714,21 +4723,16 @@ function getStatic(ctor, key) {
return null; return null;
} }
function resolveProperties(object) { function resolveProperties(object) {
const promises = Object.keys(object).map((key) => { return __awaiter(this, void 0, void 0, function* () {
const value = object[key]; const promises = Object.keys(object).map((key) => {
if (!(value instanceof Promise)) { const value = object[key];
return Promise.resolve({ key: key, value: value }); return Promise.resolve(value).then((v) => ({ key: key, value: v }));
}
return value.then((value) => {
return { key: key, value: value };
}); });
}); const results = yield Promise.all(promises);
return Promise.all(promises).then((results) => { return results.reduce((accum, result) => {
const result = {}; accum[(result.key)] = result.value;
return (results.reduce((accum, result) => {
accum[result.key] = result.value;
return accum; return accum;
}, result)); }, {});
}); });
} }
function checkProperties(object, properties) { function checkProperties(object, properties) {
@ -4802,13 +4806,14 @@ class Description {
} }
} }
const version$4 = "abi/5.0.0-beta.152"; const version$4 = "abi/5.0.0-beta.153";
"use strict"; "use strict";
const logger$4 = new Logger(version$4); const logger$4 = new Logger(version$4);
; ;
const _constructorGuard$2 = {}; const _constructorGuard$2 = {};
let ModifiersBytes = { calldata: true, memory: true, storage: true }; let ModifiersBytes = { calldata: true, memory: true, storage: true };
let ModifiersNest = { calldata: true, memory: true };
function checkModifier(type, name) { function checkModifier(type, name) {
if (type === "bytes" || type === "string") { if (type === "bytes" || type === "string") {
if (ModifiersBytes[name]) { if (ModifiersBytes[name]) {
@ -4820,6 +4825,11 @@ function checkModifier(type, name) {
return true; return true;
} }
} }
else if (type.indexOf("[") >= 0 || type === "tuple") {
if (ModifiersNest[name]) {
return true;
}
}
if (ModifiersBytes[name] || name === "payable") { if (ModifiersBytes[name] || name === "payable") {
logger$4.throwArgumentError("invalid modifier", "name", name); logger$4.throwArgumentError("invalid modifier", "name", name);
} }
@ -7659,6 +7669,19 @@ class Interface {
if (!eventFragment.anonymous) { if (!eventFragment.anonymous) {
topics.push(this.getEventTopic(eventFragment)); topics.push(this.getEventTopic(eventFragment));
} }
const encodeTopic = (param, value) => {
if (param.type === "string") {
return id(value);
}
else if (param.type === "bytes") {
return keccak256(hexlify(value));
}
// Check addresses are valid
if (param.type === "address") {
this._abiCoder.encode(["address"], [value]);
}
return hexZeroPad(hexlify(value), 32);
};
values.forEach((value, index) => { values.forEach((value, index) => {
let param = eventFragment.inputs[index]; let param = eventFragment.inputs[index];
if (!param.indexed) { if (!param.indexed) {
@ -7670,21 +7693,14 @@ class Interface {
if (value == null) { if (value == null) {
topics.push(null); topics.push(null);
} }
else if (param.type === "string") { else if (param.baseType === "array" || param.baseType === "tuple") {
topics.push(id(value));
}
else if (param.type === "bytes") {
topics.push(keccak256(hexlify(value)));
}
else if (param.type.indexOf("[") !== -1 || param.type.substring(0, 5) === "tuple") {
logger$c.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); logger$c.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value);
} }
else if (Array.isArray(value)) {
topics.push(value.map((value) => encodeTopic(param, value)));
}
else { else {
// Check addresses are valid topics.push(encodeTopic(param, value));
if (param.type === "address") {
this._abiCoder.encode(["address"], [value]);
}
topics.push(hexZeroPad(hexlify(value), 32));
} }
}); });
// Trim off trailing nulls // Trim off trailing nulls
@ -7947,10 +7963,10 @@ class Provider {
} }
} }
const version$a = "abstract-signer/5.0.0-beta.141"; const version$a = "abstract-signer/5.0.0-beta.142";
"use strict"; "use strict";
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -7979,25 +7995,31 @@ class Signer {
/////////////////// ///////////////////
// Sub-classes MAY override these // Sub-classes MAY override these
getBalance(blockTag) { getBalance(blockTag) {
this._checkProvider("getBalance"); return __awaiter$1(this, void 0, void 0, function* () {
return this.provider.getBalance(this.getAddress(), blockTag); this._checkProvider("getBalance");
return yield this.provider.getBalance(this.getAddress(), blockTag);
});
} }
getTransactionCount(blockTag) { getTransactionCount(blockTag) {
this._checkProvider("getTransactionCount"); return __awaiter$1(this, void 0, void 0, function* () {
return this.provider.getTransactionCount(this.getAddress(), blockTag); this._checkProvider("getTransactionCount");
return yield this.provider.getTransactionCount(this.getAddress(), blockTag);
});
} }
// Populates "from" if unspecified, and estimates the gas for the transation // Populates "from" if unspecified, and estimates the gas for the transation
estimateGas(transaction) { estimateGas(transaction) {
this._checkProvider("estimateGas"); return __awaiter$1(this, void 0, void 0, function* () {
return resolveProperties(this.checkTransaction(transaction)).then((tx) => { this._checkProvider("estimateGas");
return this.provider.estimateGas(tx); const tx = yield resolveProperties(this.checkTransaction(transaction));
return yield this.provider.estimateGas(tx);
}); });
} }
// Populates "from" if unspecified, and calls with the transation // Populates "from" if unspecified, and calls with the transation
call(transaction, blockTag) { call(transaction, blockTag) {
this._checkProvider("call"); return __awaiter$1(this, void 0, void 0, function* () {
return resolveProperties(this.checkTransaction(transaction)).then((tx) => { this._checkProvider("call");
return this.provider.call(tx, blockTag); const tx = yield resolveProperties(this.checkTransaction(transaction));
return yield this.provider.call(tx, blockTag);
}); });
} }
// Populates all fields in a transaction, signs it and sends it to the network // Populates all fields in a transaction, signs it and sends it to the network
@ -8010,16 +8032,23 @@ class Signer {
}); });
} }
getChainId() { getChainId() {
this._checkProvider("getChainId"); return __awaiter$1(this, void 0, void 0, function* () {
return this.provider.getNetwork().then((network) => network.chainId); this._checkProvider("getChainId");
const network = yield this.provider.getNetwork();
return network.chainId;
});
} }
getGasPrice() { getGasPrice() {
this._checkProvider("getGasPrice"); return __awaiter$1(this, void 0, void 0, function* () {
return this.provider.getGasPrice(); this._checkProvider("getGasPrice");
return yield this.provider.getGasPrice();
});
} }
resolveName(name) { resolveName(name) {
this._checkProvider("resolveName"); return __awaiter$1(this, void 0, void 0, function* () {
return this.provider.resolveName(name); this._checkProvider("resolveName");
return yield this.provider.resolveName(name);
});
} }
// Checks a transaction does not contain invalid keys and if // Checks a transaction does not contain invalid keys and if
// no "from" is provided, populates it. // no "from" is provided, populates it.
@ -8059,7 +8088,7 @@ class Signer {
// By default called from: (overriding these prevents it) // By default called from: (overriding these prevents it)
// - sendTransaction // - sendTransaction
populateTransaction(transaction) { populateTransaction(transaction) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter$1(this, void 0, void 0, function* () {
const tx = yield resolveProperties(this.checkTransaction(transaction)); const tx = yield resolveProperties(this.checkTransaction(transaction));
if (tx.to != null) { if (tx.to != null) {
tx.to = Promise.resolve(tx.to).then((to) => this.resolveName(to)); tx.to = Promise.resolve(tx.to).then((to) => this.resolveName(to));
@ -8136,7 +8165,7 @@ class VoidSigner extends Signer {
const version$b = "contracts/5.0.0-beta.150"; const version$b = "contracts/5.0.0-beta.150";
"use strict"; "use strict";
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -8889,7 +8918,7 @@ class ContractFactory {
return tx; return tx;
} }
deploy(...args) { deploy(...args) {
return __awaiter$1(this, void 0, void 0, function* () { return __awaiter$2(this, void 0, void 0, function* () {
let overrides = {}; let overrides = {};
// If 1 extra parameter was passed in, it contains overrides // If 1 extra parameter was passed in, it contains overrides
if (args.length === this.interface.deploy.inputs.length + 1) { if (args.length === this.interface.deploy.inputs.length + 1) {
@ -15013,7 +15042,7 @@ uuid.unparse = unparse;
var uuid_1 = uuid; var uuid_1 = uuid;
"use strict"; "use strict";
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -15159,7 +15188,7 @@ function decryptSync(json, password) {
return _getAccount(data, key); return _getAccount(data, key);
} }
function decrypt$1(json, password, progressCallback) { function decrypt$1(json, password, progressCallback) {
return __awaiter$2(this, void 0, void 0, function* () { return __awaiter$3(this, void 0, void 0, function* () {
const data = JSON.parse(json); const data = JSON.parse(json);
const key = yield _computeKdfKey(data, password, pbkdf2$1, scrypt_1, progressCallback); const key = yield _computeKdfKey(data, password, pbkdf2$1, scrypt_1, progressCallback);
return _getAccount(data, key); return _getAccount(data, key);
@ -15680,7 +15709,7 @@ var browser$2 = /*#__PURE__*/Object.freeze({
const version$l = "web/5.0.0-beta.137"; const version$l = "web/5.0.0-beta.137";
"use strict"; "use strict";
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -15690,7 +15719,7 @@ var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments,
}); });
}; };
function getUrl(href, options) { function getUrl(href, options) {
return __awaiter$3(this, void 0, void 0, function* () { return __awaiter$4(this, void 0, void 0, function* () {
if (options == null) { if (options == null) {
options = {}; options = {};
} }
@ -15727,7 +15756,7 @@ function getUrl(href, options) {
} }
"use strict"; "use strict";
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -15810,7 +15839,7 @@ function fetchJson(connection, json, processFunc) {
return { promise, cancel }; return { promise, cancel };
})(); })();
const runningFetch = (function () { const runningFetch = (function () {
return __awaiter$4(this, void 0, void 0, function* () { return __awaiter$5(this, void 0, void 0, function* () {
let response = null; let response = null;
try { try {
response = yield getUrl(url, options); response = yield getUrl(url, options);
@ -15939,7 +15968,7 @@ function poll(func, options) {
}); });
} }
const version$m = "providers/5.0.0-beta.164"; const version$m = "providers/5.0.0-beta.165";
"use strict"; "use strict";
const logger$q = new Logger(version$m); const logger$q = new Logger(version$m);
@ -16317,7 +16346,7 @@ class Formatter {
} }
"use strict"; "use strict";
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -16501,7 +16530,7 @@ class BaseProvider extends Provider {
return getNetwork((network == null) ? "homestead" : network); return getNetwork((network == null) ? "homestead" : network);
} }
_getInternalBlockNumber(maxAge) { _getInternalBlockNumber(maxAge) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
const internalBlockNumber = this._internalBlockNumber; const internalBlockNumber = this._internalBlockNumber;
if (maxAge > 0 && this._internalBlockNumber) { if (maxAge > 0 && this._internalBlockNumber) {
@ -16525,7 +16554,7 @@ class BaseProvider extends Provider {
}); });
} }
poll() { poll() {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
const pollId = nextPollId++; const pollId = nextPollId++;
this.emit("willPoll", pollId); this.emit("willPoll", pollId);
// Track all running promises, so we can trigger a post-poll once they are complete // Track all running promises, so we can trigger a post-poll once they are complete
@ -16686,7 +16715,7 @@ class BaseProvider extends Provider {
// @TODO: Add .poller which must be an event emitter with a 'start', 'stop' and 'block' event; // @TODO: Add .poller which must be an event emitter with a 'start', 'stop' and 'block' event;
// this will be used once we move to the WebSocket or other alternatives to polling // this will be used once we move to the WebSocket or other alternatives to polling
waitForTransaction(transactionHash, confirmations, timeout) { waitForTransaction(transactionHash, confirmations, timeout) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
if (confirmations == null) { if (confirmations == null) {
confirmations = 1; confirmations = 1;
} }
@ -16735,13 +16764,13 @@ class BaseProvider extends Provider {
return this._getInternalBlockNumber(0); return this._getInternalBlockNumber(0);
} }
getGasPrice() { getGasPrice() {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
return BigNumber.from(yield this.perform("getGasPrice", {})); return BigNumber.from(yield this.perform("getGasPrice", {}));
}); });
} }
getBalance(addressOrName, blockTag) { getBalance(addressOrName, blockTag) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
const params = yield resolveProperties({ const params = yield resolveProperties({
address: this._getAddress(addressOrName), address: this._getAddress(addressOrName),
@ -16751,7 +16780,7 @@ class BaseProvider extends Provider {
}); });
} }
getTransactionCount(addressOrName, blockTag) { getTransactionCount(addressOrName, blockTag) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
const params = yield resolveProperties({ const params = yield resolveProperties({
address: this._getAddress(addressOrName), address: this._getAddress(addressOrName),
@ -16761,7 +16790,7 @@ class BaseProvider extends Provider {
}); });
} }
getCode(addressOrName, blockTag) { getCode(addressOrName, blockTag) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
const params = yield resolveProperties({ const params = yield resolveProperties({
address: this._getAddress(addressOrName), address: this._getAddress(addressOrName),
@ -16771,7 +16800,7 @@ class BaseProvider extends Provider {
}); });
} }
getStorageAt(addressOrName, position, blockTag) { getStorageAt(addressOrName, position, blockTag) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
const params = yield resolveProperties({ const params = yield resolveProperties({
address: this._getAddress(addressOrName), address: this._getAddress(addressOrName),
@ -16792,7 +16821,7 @@ class BaseProvider extends Provider {
logger$r.throwError("Transaction hash mismatch from Provider.sendTransaction.", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash }); logger$r.throwError("Transaction hash mismatch from Provider.sendTransaction.", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash });
} }
// @TODO: (confirmations? number, timeout? number) // @TODO: (confirmations? number, timeout? number)
result.wait = (confirmations) => __awaiter$5(this, void 0, void 0, function* () { result.wait = (confirmations) => __awaiter$6(this, void 0, void 0, function* () {
// We know this transaction *must* exist (whether it gets mined is // We know this transaction *must* exist (whether it gets mined is
// another story), so setting an emitted value forces us to // another story), so setting an emitted value forces us to
// wait even if the node returns null for the receipt // wait even if the node returns null for the receipt
@ -16817,7 +16846,7 @@ class BaseProvider extends Provider {
return result; return result;
} }
sendTransaction(signedTransaction) { sendTransaction(signedTransaction) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
const hexTx = yield Promise.resolve(signedTransaction).then(t => hexlify(t)); const hexTx = yield Promise.resolve(signedTransaction).then(t => hexlify(t));
const tx = this.formatter.transaction(signedTransaction); const tx = this.formatter.transaction(signedTransaction);
@ -16833,7 +16862,7 @@ class BaseProvider extends Provider {
}); });
} }
_getTransactionRequest(transaction) { _getTransactionRequest(transaction) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
const values = yield transaction; const values = yield transaction;
const tx = {}; const tx = {};
["from", "to"].forEach((key) => { ["from", "to"].forEach((key) => {
@ -16858,7 +16887,7 @@ class BaseProvider extends Provider {
}); });
} }
_getFilter(filter) { _getFilter(filter) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
if (filter instanceof Promise) { if (filter instanceof Promise) {
filter = yield filter; filter = yield filter;
} }
@ -16882,7 +16911,7 @@ class BaseProvider extends Provider {
}); });
} }
call(transaction, blockTag) { call(transaction, blockTag) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
const params = yield resolveProperties({ const params = yield resolveProperties({
transaction: this._getTransactionRequest(transaction), transaction: this._getTransactionRequest(transaction),
@ -16892,7 +16921,7 @@ class BaseProvider extends Provider {
}); });
} }
estimateGas(transaction) { estimateGas(transaction) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
const params = yield resolveProperties({ const params = yield resolveProperties({
transaction: this._getTransactionRequest(transaction) transaction: this._getTransactionRequest(transaction)
@ -16901,7 +16930,7 @@ class BaseProvider extends Provider {
}); });
} }
_getAddress(addressOrName) { _getAddress(addressOrName) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
const address = yield this.resolveName(addressOrName); const address = yield this.resolveName(addressOrName);
if (address == null) { if (address == null) {
logger$r.throwError("ENS name not configured", Logger.errors.UNSUPPORTED_OPERATION, { logger$r.throwError("ENS name not configured", Logger.errors.UNSUPPORTED_OPERATION, {
@ -16912,7 +16941,7 @@ class BaseProvider extends Provider {
}); });
} }
_getBlock(blockHashOrBlockTag, includeTransactions) { _getBlock(blockHashOrBlockTag, includeTransactions) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
if (blockHashOrBlockTag instanceof Promise) { if (blockHashOrBlockTag instanceof Promise) {
blockHashOrBlockTag = yield blockHashOrBlockTag; blockHashOrBlockTag = yield blockHashOrBlockTag;
@ -16936,7 +16965,7 @@ class BaseProvider extends Provider {
logger$r.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag); logger$r.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag);
} }
} }
return poll(() => __awaiter$5(this, void 0, void 0, function* () { return poll(() => __awaiter$6(this, void 0, void 0, function* () {
const block = yield this.perform("getBlock", params); const block = yield this.perform("getBlock", params);
// Block was not found // Block was not found
if (block == null) { if (block == null) {
@ -16990,13 +17019,13 @@ class BaseProvider extends Provider {
return (this._getBlock(blockHashOrBlockTag, true)); return (this._getBlock(blockHashOrBlockTag, true));
} }
getTransaction(transactionHash) { getTransaction(transactionHash) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
if (transactionHash instanceof Promise) { if (transactionHash instanceof Promise) {
transactionHash = yield transactionHash; transactionHash = yield transactionHash;
} }
const params = { transactionHash: this.formatter.hash(transactionHash, true) }; const params = { transactionHash: this.formatter.hash(transactionHash, true) };
return poll(() => __awaiter$5(this, void 0, void 0, function* () { return poll(() => __awaiter$6(this, void 0, void 0, function* () {
const result = yield this.perform("getTransaction", params); const result = yield this.perform("getTransaction", params);
if (result == null) { if (result == null) {
if (this._emitted["t:" + transactionHash] == null) { if (this._emitted["t:" + transactionHash] == null) {
@ -17022,13 +17051,13 @@ class BaseProvider extends Provider {
}); });
} }
getTransactionReceipt(transactionHash) { getTransactionReceipt(transactionHash) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
if (transactionHash instanceof Promise) { if (transactionHash instanceof Promise) {
transactionHash = yield transactionHash; transactionHash = yield transactionHash;
} }
const params = { transactionHash: this.formatter.hash(transactionHash, true) }; const params = { transactionHash: this.formatter.hash(transactionHash, true) };
return poll(() => __awaiter$5(this, void 0, void 0, function* () { return poll(() => __awaiter$6(this, void 0, void 0, function* () {
const result = yield this.perform("getTransactionReceipt", params); const result = yield this.perform("getTransactionReceipt", params);
if (result == null) { if (result == null) {
if (this._emitted["t:" + transactionHash] == null) { if (this._emitted["t:" + transactionHash] == null) {
@ -17058,7 +17087,7 @@ class BaseProvider extends Provider {
}); });
} }
getLogs(filter) { getLogs(filter) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
const params = yield resolveProperties({ filter: this._getFilter(filter) }); const params = yield resolveProperties({ filter: this._getFilter(filter) });
const logs = yield this.perform("getLogs", params); const logs = yield this.perform("getLogs", params);
@ -17071,13 +17100,13 @@ class BaseProvider extends Provider {
}); });
} }
getEtherPrice() { getEtherPrice() {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
yield this.ready; yield this.ready;
return this.perform("getEtherPrice", {}); return this.perform("getEtherPrice", {});
}); });
} }
_getBlockTag(blockTag) { _getBlockTag(blockTag) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
if (blockTag instanceof Promise) { if (blockTag instanceof Promise) {
blockTag = yield blockTag; blockTag = yield blockTag;
} }
@ -17096,7 +17125,7 @@ class BaseProvider extends Provider {
}); });
} }
_getResolver(name) { _getResolver(name) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
// Get the resolver from the blockchain // Get the resolver from the blockchain
const network = yield this.getNetwork(); const network = yield this.getNetwork();
// No ENS... // No ENS...
@ -17112,7 +17141,7 @@ class BaseProvider extends Provider {
}); });
} }
resolveName(name) { resolveName(name) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
if (name instanceof Promise) { if (name instanceof Promise) {
name = yield name; name = yield name;
} }
@ -17143,7 +17172,7 @@ class BaseProvider extends Provider {
}); });
} }
lookupAddress(address) { lookupAddress(address) {
return __awaiter$5(this, void 0, void 0, function* () { return __awaiter$6(this, void 0, void 0, function* () {
if (address instanceof Promise) { if (address instanceof Promise) {
address = yield address; address = yield address;
} }
@ -17286,7 +17315,7 @@ class BaseProvider extends Provider {
} }
"use strict"; "use strict";
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -17486,7 +17515,7 @@ class JsonRpcProvider extends BaseProvider {
else { else {
// The network is unknown, query the JSON-RPC for it // The network is unknown, query the JSON-RPC for it
const ready = new Promise((resolve, reject) => { const ready = new Promise((resolve, reject) => {
setTimeout(() => __awaiter$6(this, void 0, void 0, function* () { setTimeout(() => __awaiter$7(this, void 0, void 0, function* () {
let chainId = null; let chainId = null;
try { try {
chainId = yield this.send("eth_chainId", []); chainId = yield this.send("eth_chainId", []);
@ -17815,7 +17844,7 @@ class AlchemyProvider extends UrlJsonRpcProvider {
} }
"use strict"; "use strict";
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -17847,7 +17876,7 @@ class CloudflareProvider extends UrlJsonRpcProvider {
const _super = Object.create(null, { const _super = Object.create(null, {
perform: { get: () => super.perform } perform: { get: () => super.perform }
}); });
return __awaiter$7(this, void 0, void 0, function* () { return __awaiter$8(this, void 0, void 0, function* () {
// The Cloudflare provider does not support eth_blockNumber, // The Cloudflare provider does not support eth_blockNumber,
// so we get the latest block and pull it from that // so we get the latest block and pull it from that
if (method === "getBlockNumber") { if (method === "getBlockNumber") {
@ -17860,7 +17889,7 @@ class CloudflareProvider extends UrlJsonRpcProvider {
} }
"use strict"; "use strict";
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -17964,13 +17993,13 @@ class EtherscanProvider extends BaseProvider {
const _super = Object.create(null, { const _super = Object.create(null, {
perform: { get: () => super.perform } perform: { get: () => super.perform }
}); });
return __awaiter$8(this, void 0, void 0, function* () { return __awaiter$9(this, void 0, void 0, function* () {
let url = this.baseUrl; let url = this.baseUrl;
let apiKey = ""; let apiKey = "";
if (this.apiKey) { if (this.apiKey) {
apiKey += "&apikey=" + this.apiKey; apiKey += "&apikey=" + this.apiKey;
} }
const get = (url, procFunc) => __awaiter$8(this, void 0, void 0, function* () { const get = (url, procFunc) => __awaiter$9(this, void 0, void 0, function* () {
this.emit("debug", { this.emit("debug", {
action: "request", action: "request",
request: url, request: url,
@ -18183,7 +18212,7 @@ class EtherscanProvider extends BaseProvider {
} }
"use strict"; "use strict";
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -18498,7 +18527,7 @@ class FallbackProvider extends BaseProvider {
this._highestBlockNumber = -1; this._highestBlockNumber = -1;
} }
perform(method, params) { perform(method, params) {
return __awaiter$9(this, void 0, void 0, function* () { return __awaiter$a(this, void 0, void 0, function* () {
// Sending transactions is special; always broadcast it to all backends // Sending transactions is special; always broadcast it to all backends
if (method === "sendTransaction") { if (method === "sendTransaction") {
return Promise.all(this.providerConfigs.map((c) => { return Promise.all(this.providerConfigs.map((c) => {
@ -18516,7 +18545,7 @@ class FallbackProvider extends BaseProvider {
} }
} }
// They were all an error; pick the first error // They were all an error; pick the first error
return Promise.reject(results[0].error); return Promise.reject(results[0]);
}); });
} }
const processFunc = getProcessFunc(this, method, params); const processFunc = getProcessFunc(this, method, params);
@ -18828,7 +18857,7 @@ class Web3Provider extends JsonRpcProvider {
var _version$2 = createCommonjsModule(function (module, exports) { var _version$2 = createCommonjsModule(function (module, exports) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "providers/5.0.0-beta.164"; exports.version = "providers/5.0.0-beta.165";
}); });
var _version$3 = unwrapExports(_version$2); var _version$3 = unwrapExports(_version$2);
@ -18860,7 +18889,7 @@ module.exports = WS;
var WebSocket$1 = unwrapExports(browserWs); var WebSocket$1 = unwrapExports(browserWs);
"use strict"; "use strict";
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@ -18952,7 +18981,7 @@ class WebSocketProvider extends JsonRpcProvider {
}); });
} }
poll() { poll() {
return __awaiter$a(this, void 0, void 0, function* () { return __awaiter$b(this, void 0, void 0, function* () {
return null; return null;
}); });
} }
@ -18989,7 +19018,7 @@ class WebSocketProvider extends JsonRpcProvider {
return "ws:/\/localhost:8546"; return "ws:/\/localhost:8546";
} }
_subscribe(tag, param, processFunc) { _subscribe(tag, param, processFunc) {
return __awaiter$a(this, void 0, void 0, function* () { return __awaiter$b(this, void 0, void 0, function* () {
let subIdPromise = this._subIds[tag]; let subIdPromise = this._subIds[tag];
if (subIdPromise == null) { if (subIdPromise == null) {
subIdPromise = Promise.all(param).then((param) => { subIdPromise = Promise.all(param).then((param) => {
@ -19377,7 +19406,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
Indexed: Indexed Indexed: Indexed
}); });
const version$o = "ethers/5.0.0-beta.184"; const version$o = "ethers/5.0.0-beta.185";
"use strict"; "use strict";
const logger$E = new Logger(version$o); const logger$E = new Logger(version$o);

File diff suppressed because one or more lines are too long

@ -4817,7 +4817,7 @@
var _version$6 = createCommonjsModule(function (module, exports) { var _version$6 = createCommonjsModule(function (module, exports) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "properties/5.0.0-beta.139"; exports.version = "properties/5.0.0-beta.140";
}); });
var _version$7 = unwrapExports(_version$6); var _version$7 = unwrapExports(_version$6);
@ -4825,6 +4825,42 @@
var lib$3 = createCommonjsModule(function (module, exports) { var lib$3 = createCommonjsModule(function (module, exports) {
"use strict"; "use strict";
var __awaiter = (commonjsGlobal && commonjsGlobal.__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());
});
};
var __generator = (commonjsGlobal && commonjsGlobal.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
@ -4852,22 +4888,25 @@
} }
exports.getStatic = getStatic; exports.getStatic = getStatic;
function resolveProperties(object) { function resolveProperties(object) {
var promises = Object.keys(object).map(function (key) { return __awaiter(this, void 0, void 0, function () {
var value = object[key]; var promises, results;
if (!(value instanceof Promise)) { return __generator(this, function (_a) {
return Promise.resolve({ key: key, value: value }); switch (_a.label) {
} case 0:
return value.then(function (value) { promises = Object.keys(object).map(function (key) {
return { key: key, value: value }; var value = object[key];
return Promise.resolve(value).then(function (v) { return ({ key: key, value: v }); });
});
return [4 /*yield*/, Promise.all(promises)];
case 1:
results = _a.sent();
return [2 /*return*/, results.reduce(function (accum, result) {
accum[(result.key)] = result.value;
return accum;
}, {})];
}
}); });
}); });
return Promise.all(promises).then(function (results) {
var result = {};
return (results.reduce(function (accum, result) {
accum[result.key] = result.value;
return accum;
}, result));
});
} }
exports.resolveProperties = resolveProperties; exports.resolveProperties = resolveProperties;
function checkProperties(object, properties) { function checkProperties(object, properties) {
@ -4959,7 +4998,7 @@
var _version$8 = createCommonjsModule(function (module, exports) { var _version$8 = createCommonjsModule(function (module, exports) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "abi/5.0.0-beta.152"; exports.version = "abi/5.0.0-beta.153";
}); });
var _version$9 = unwrapExports(_version$8); var _version$9 = unwrapExports(_version$8);
@ -4989,6 +5028,7 @@
; ;
var _constructorGuard = {}; var _constructorGuard = {};
var ModifiersBytes = { calldata: true, memory: true, storage: true }; var ModifiersBytes = { calldata: true, memory: true, storage: true };
var ModifiersNest = { calldata: true, memory: true };
function checkModifier(type, name) { function checkModifier(type, name) {
if (type === "bytes" || type === "string") { if (type === "bytes" || type === "string") {
if (ModifiersBytes[name]) { if (ModifiersBytes[name]) {
@ -5000,6 +5040,11 @@
return true; return true;
} }
} }
else if (type.indexOf("[") >= 0 || type === "tuple") {
if (ModifiersNest[name]) {
return true;
}
}
if (ModifiersBytes[name] || name === "payable") { if (ModifiersBytes[name] || name === "payable") {
logger.throwArgumentError("invalid modifier", "name", name); logger.throwArgumentError("invalid modifier", "name", name);
} }
@ -8425,6 +8470,19 @@
if (!eventFragment.anonymous) { if (!eventFragment.anonymous) {
topics.push(this.getEventTopic(eventFragment)); topics.push(this.getEventTopic(eventFragment));
} }
var encodeTopic = function (param, value) {
if (param.type === "string") {
return lib$9.id(value);
}
else if (param.type === "bytes") {
return lib$4.keccak256(lib$1.hexlify(value));
}
// Check addresses are valid
if (param.type === "address") {
_this._abiCoder.encode(["address"], [value]);
}
return lib$1.hexZeroPad(lib$1.hexlify(value), 32);
};
values.forEach(function (value, index) { values.forEach(function (value, index) {
var param = eventFragment.inputs[index]; var param = eventFragment.inputs[index];
if (!param.indexed) { if (!param.indexed) {
@ -8436,21 +8494,14 @@
if (value == null) { if (value == null) {
topics.push(null); topics.push(null);
} }
else if (param.type === "string") { else if (param.baseType === "array" || param.baseType === "tuple") {
topics.push(lib$9.id(value));
}
else if (param.type === "bytes") {
topics.push(lib$4.keccak256(lib$1.hexlify(value)));
}
else if (param.type.indexOf("[") !== -1 || param.type.substring(0, 5) === "tuple") {
logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value); logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value);
} }
else if (Array.isArray(value)) {
topics.push(value.map(function (value) { return encodeTopic(param, value); }));
}
else { else {
// Check addresses are valid topics.push(encodeTopic(param, value));
if (param.type === "address") {
_this._abiCoder.encode(["address"], [value]);
}
topics.push(lib$1.hexZeroPad(lib$1.hexlify(value), 32));
} }
}); });
// Trim off trailing nulls // Trim off trailing nulls
@ -8822,7 +8873,7 @@
var _version$k = createCommonjsModule(function (module, exports) { var _version$k = createCommonjsModule(function (module, exports) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "abstract-signer/5.0.0-beta.141"; exports.version = "abstract-signer/5.0.0-beta.142";
}); });
var _version$l = unwrapExports(_version$k); var _version$l = unwrapExports(_version$k);
@ -8904,27 +8955,61 @@
/////////////////// ///////////////////
// Sub-classes MAY override these // Sub-classes MAY override these
Signer.prototype.getBalance = function (blockTag) { Signer.prototype.getBalance = function (blockTag) {
this._checkProvider("getBalance"); return __awaiter(this, void 0, void 0, function () {
return this.provider.getBalance(this.getAddress(), blockTag); return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("getBalance");
return [4 /*yield*/, this.provider.getBalance(this.getAddress(), blockTag)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
}; };
Signer.prototype.getTransactionCount = function (blockTag) { Signer.prototype.getTransactionCount = function (blockTag) {
this._checkProvider("getTransactionCount"); return __awaiter(this, void 0, void 0, function () {
return this.provider.getTransactionCount(this.getAddress(), blockTag); return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("getTransactionCount");
return [4 /*yield*/, this.provider.getTransactionCount(this.getAddress(), blockTag)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
}; };
// Populates "from" if unspecified, and estimates the gas for the transation // Populates "from" if unspecified, and estimates the gas for the transation
Signer.prototype.estimateGas = function (transaction) { Signer.prototype.estimateGas = function (transaction) {
var _this = this; return __awaiter(this, void 0, void 0, function () {
this._checkProvider("estimateGas"); var tx;
return lib$3.resolveProperties(this.checkTransaction(transaction)).then(function (tx) { return __generator(this, function (_a) {
return _this.provider.estimateGas(tx); switch (_a.label) {
case 0:
this._checkProvider("estimateGas");
return [4 /*yield*/, lib$3.resolveProperties(this.checkTransaction(transaction))];
case 1:
tx = _a.sent();
return [4 /*yield*/, this.provider.estimateGas(tx)];
case 2: return [2 /*return*/, _a.sent()];
}
});
}); });
}; };
// Populates "from" if unspecified, and calls with the transation // Populates "from" if unspecified, and calls with the transation
Signer.prototype.call = function (transaction, blockTag) { Signer.prototype.call = function (transaction, blockTag) {
var _this = this; return __awaiter(this, void 0, void 0, function () {
this._checkProvider("call"); var tx;
return lib$3.resolveProperties(this.checkTransaction(transaction)).then(function (tx) { return __generator(this, function (_a) {
return _this.provider.call(tx, blockTag); switch (_a.label) {
case 0:
this._checkProvider("call");
return [4 /*yield*/, lib$3.resolveProperties(this.checkTransaction(transaction))];
case 1:
tx = _a.sent();
return [4 /*yield*/, this.provider.call(tx, blockTag)];
case 2: return [2 /*return*/, _a.sent()];
}
});
}); });
}; };
// Populates all fields in a transaction, signs it and sends it to the network // Populates all fields in a transaction, signs it and sends it to the network
@ -8938,16 +9023,43 @@
}); });
}; };
Signer.prototype.getChainId = function () { Signer.prototype.getChainId = function () {
this._checkProvider("getChainId"); return __awaiter(this, void 0, void 0, function () {
return this.provider.getNetwork().then(function (network) { return network.chainId; }); var network;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("getChainId");
return [4 /*yield*/, this.provider.getNetwork()];
case 1:
network = _a.sent();
return [2 /*return*/, network.chainId];
}
});
});
}; };
Signer.prototype.getGasPrice = function () { Signer.prototype.getGasPrice = function () {
this._checkProvider("getGasPrice"); return __awaiter(this, void 0, void 0, function () {
return this.provider.getGasPrice(); return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("getGasPrice");
return [4 /*yield*/, this.provider.getGasPrice()];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
}; };
Signer.prototype.resolveName = function (name) { Signer.prototype.resolveName = function (name) {
this._checkProvider("resolveName"); return __awaiter(this, void 0, void 0, function () {
return this.provider.resolveName(name); return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this._checkProvider("resolveName");
return [4 /*yield*/, this.provider.resolveName(name)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
}; };
// Checks a transaction does not contain invalid keys and if // Checks a transaction does not contain invalid keys and if
// no "from" is provided, populates it. // no "from" is provided, populates it.
@ -17607,7 +17719,7 @@
var _version$I = createCommonjsModule(function (module, exports) { var _version$I = createCommonjsModule(function (module, exports) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "providers/5.0.0-beta.164"; exports.version = "providers/5.0.0-beta.165";
}); });
var _version$J = unwrapExports(_version$I); var _version$J = unwrapExports(_version$I);
@ -20966,7 +21078,7 @@
} }
} }
// They were all an error; pick the first error // They were all an error; pick the first error
return Promise.reject(results[0].error); return Promise.reject(results[0]);
})]; })];
} }
processFunc = getProcessFunc(this, method, params); processFunc = getProcessFunc(this, method, params);
@ -22211,7 +22323,7 @@
var _version$M = createCommonjsModule(function (module, exports) { var _version$M = createCommonjsModule(function (module, exports) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "ethers/5.0.0-beta.184"; exports.version = "ethers/5.0.0-beta.185";
}); });
var _version$N = unwrapExports(_version$M); var _version$N = unwrapExports(_version$M);

File diff suppressed because one or more lines are too long

@ -1 +1 @@
export declare const version = "ethers/5.0.0-beta.184"; export declare const version = "ethers/5.0.0-beta.185";

@ -1 +1 @@
export const version = "ethers/5.0.0-beta.184"; export const version = "ethers/5.0.0-beta.185";

@ -1 +1 @@
export declare const version = "ethers/5.0.0-beta.184"; export declare const version = "ethers/5.0.0-beta.185";

@ -1,3 +1,3 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "ethers/5.0.0-beta.184"; exports.version = "ethers/5.0.0-beta.185";

@ -52,7 +52,7 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"tarballHash": "0xec76c84163413853fccd51f97b45a9db44799fddf3ff010421b5bd654933c0d8", "tarballHash": "0xe9daa152b8c9f669a2a20427db554a49d87d64060a3851a5ace3bdcab47e3173",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"version": "5.0.0-beta.184" "version": "5.0.0-beta.185"
} }

@ -1 +1 @@
export const version = "ethers/5.0.0-beta.184"; export const version = "ethers/5.0.0-beta.185";

@ -1 +1 @@
export declare const version = "properties/5.0.0-beta.139"; export declare const version = "properties/5.0.0-beta.140";

@ -1 +1 @@
export const version = "properties/5.0.0-beta.139"; export const version = "properties/5.0.0-beta.140";

@ -6,7 +6,7 @@ export declare type Similar<T> = {
export declare type Resolvable<T> = { export declare type Resolvable<T> = {
[P in keyof T]: T[P] | Promise<T[P]>; [P in keyof T]: T[P] | Promise<T[P]>;
}; };
export declare function resolveProperties<T>(object: Resolvable<T>): Promise<Similar<T>>; export declare function resolveProperties<T>(object: Readonly<Resolvable<T>>): Promise<Similar<T>>;
export declare function checkProperties(object: any, properties: { export declare function checkProperties(object: any, properties: {
[name: string]: boolean; [name: string]: boolean;
}): void; }): void;

@ -1,4 +1,13 @@
"use strict"; "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());
});
};
import { Logger } from "@ethersproject/logger"; import { Logger } from "@ethersproject/logger";
import { version } from "./_version"; import { version } from "./_version";
const logger = new Logger(version); const logger = new Logger(version);
@ -23,21 +32,16 @@ export function getStatic(ctor, key) {
return null; return null;
} }
export function resolveProperties(object) { export function resolveProperties(object) {
const promises = Object.keys(object).map((key) => { return __awaiter(this, void 0, void 0, function* () {
const value = object[key]; const promises = Object.keys(object).map((key) => {
if (!(value instanceof Promise)) { const value = object[key];
return Promise.resolve({ key: key, value: value }); return Promise.resolve(value).then((v) => ({ key: key, value: v }));
}
return value.then((value) => {
return { key: key, value: value };
}); });
}); const results = yield Promise.all(promises);
return Promise.all(promises).then((results) => { return results.reduce((accum, result) => {
const result = {}; accum[(result.key)] = result.value;
return (results.reduce((accum, result) => {
accum[result.key] = result.value;
return accum; return accum;
}, result)); }, {});
}); });
} }
export function checkProperties(object, properties) { export function checkProperties(object, properties) {

@ -1 +1 @@
export declare const version = "properties/5.0.0-beta.139"; export declare const version = "properties/5.0.0-beta.140";

@ -1,3 +1,3 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "properties/5.0.0-beta.139"; exports.version = "properties/5.0.0-beta.140";

@ -6,7 +6,7 @@ export declare type Similar<T> = {
export declare type Resolvable<T> = { export declare type Resolvable<T> = {
[P in keyof T]: T[P] | Promise<T[P]>; [P in keyof T]: T[P] | Promise<T[P]>;
}; };
export declare function resolveProperties<T>(object: Resolvable<T>): Promise<Similar<T>>; export declare function resolveProperties<T>(object: Readonly<Resolvable<T>>): Promise<Similar<T>>;
export declare function checkProperties(object: any, properties: { export declare function checkProperties(object: any, properties: {
[name: string]: boolean; [name: string]: boolean;
}): void; }): void;

@ -1,4 +1,40 @@
"use strict"; "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());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
var logger_1 = require("@ethersproject/logger"); var logger_1 = require("@ethersproject/logger");
var _version_1 = require("./_version"); var _version_1 = require("./_version");
@ -26,22 +62,25 @@ function getStatic(ctor, key) {
} }
exports.getStatic = getStatic; exports.getStatic = getStatic;
function resolveProperties(object) { function resolveProperties(object) {
var promises = Object.keys(object).map(function (key) { return __awaiter(this, void 0, void 0, function () {
var value = object[key]; var promises, results;
if (!(value instanceof Promise)) { return __generator(this, function (_a) {
return Promise.resolve({ key: key, value: value }); switch (_a.label) {
} case 0:
return value.then(function (value) { promises = Object.keys(object).map(function (key) {
return { key: key, value: value }; var value = object[key];
return Promise.resolve(value).then(function (v) { return ({ key: key, value: v }); });
});
return [4 /*yield*/, Promise.all(promises)];
case 1:
results = _a.sent();
return [2 /*return*/, results.reduce(function (accum, result) {
accum[(result.key)] = result.value;
return accum;
}, {})];
}
}); });
}); });
return Promise.all(promises).then(function (results) {
var result = {};
return (results.reduce(function (accum, result) {
accum[result.key] = result.value;
return accum;
}, result));
});
} }
exports.resolveProperties = resolveProperties; exports.resolveProperties = resolveProperties;
function checkProperties(object, properties) { function checkProperties(object, properties) {

@ -25,7 +25,7 @@
"build": "tsc -p ./tsconfig.json", "build": "tsc -p ./tsconfig.json",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"tarballHash": "0x932455e8db6cb491d012ad22776efd4ad25b1e688981cada4a39277aec2182ac", "tarballHash": "0x1d0567d737c2e8d23a1e3a8c168f27a202b33c5a619bfcee72411aeedaf66472",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"version": "5.0.0-beta.139" "version": "5.0.0-beta.140"
} }

@ -1 +1 @@
export const version = "properties/5.0.0-beta.139"; export const version = "properties/5.0.0-beta.140";

@ -1 +1 @@
export declare const version = "providers/5.0.0-beta.164"; export declare const version = "providers/5.0.0-beta.165";

@ -1 +1 @@
export const version = "providers/5.0.0-beta.164"; export const version = "providers/5.0.0-beta.165";

@ -339,7 +339,7 @@ export class FallbackProvider extends BaseProvider {
} }
} }
// They were all an error; pick the first error // They were all an error; pick the first error
return Promise.reject(results[0].error); return Promise.reject(results[0]);
}); });
} }
const processFunc = getProcessFunc(this, method, params); const processFunc = getProcessFunc(this, method, params);

@ -1 +1 @@
export declare const version = "providers/5.0.0-beta.164"; export declare const version = "providers/5.0.0-beta.165";

@ -1,3 +1,3 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "providers/5.0.0-beta.164"; exports.version = "providers/5.0.0-beta.165";

@ -389,7 +389,7 @@ var FallbackProvider = /** @class */ (function (_super) {
} }
} }
// They were all an error; pick the first error // They were all an error; pick the first error
return Promise.reject(results[0].error); return Promise.reject(results[0]);
})]; })];
} }
processFunc = getProcessFunc(this, method, params); processFunc = getProcessFunc(this, method, params);

@ -56,7 +56,7 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"tarballHash": "0xfb3823fd0c40bca106bc0e8e766e37cb766bebb4d0d4a71bea92a59d468c6efa", "tarballHash": "0x1f418141b6b57ca25d4399fdab8eb941be425422a1ee37cefc764652f64aeb11",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"version": "5.0.0-beta.164" "version": "5.0.0-beta.165"
} }

@ -1 +1 @@
export const version = "providers/5.0.0-beta.164"; export const version = "providers/5.0.0-beta.165";

@ -1 +1 @@
export declare const version = "tests/5.0.0-beta.157"; export declare const version = "tests/5.0.0-beta.158";

@ -1 +1 @@
export const version = "tests/5.0.0-beta.157"; export const version = "tests/5.0.0-beta.158";

@ -475,3 +475,34 @@ describe('Test Filters', function () {
doTest(test); doTest(test);
}); });
}); });
describe("Test ParamType Parser", function () {
const Tests = [
{ type: "address", format: "address" },
{ type: "address foo", format: "address foo" },
{ type: "address payable", format: "address" },
{ type: "address payable foo", format: "address foo" },
{ type: "uint", format: "uint256" },
{ type: "uint16", format: "uint16" },
{ type: "uint256", format: "uint256" },
{ type: "int", format: "int256" },
{ type: "int16", format: "int16" },
{ type: "int256", format: "int256" },
{ type: "string", format: "string" },
{ type: "string memory", format: "string" },
{ type: "string calldata", format: "string" },
{ type: "string storage", format: "string" },
{ type: "string memory foo", format: "string foo" },
{ type: "string foo", format: "string foo" },
{ type: "string[]", format: "string[]" },
{ type: "string[5]", format: "string[5]" },
{ type: "uint[] memory", format: "uint256[]" },
{ type: "tuple(address a, string[] b) memory foo", format: "tuple(address a, string[] b) foo" },
];
Tests.forEach((test) => {
it(`allows correct modifiers ${JSON.stringify(test.type)}`, function () {
const paramType = ethers.utils.ParamType.from(test.type);
//console.log(test, paramType.format("full"));
assert.equal(paramType.format("full"), test.format);
});
});
});

@ -1 +1 @@
export declare const version = "tests/5.0.0-beta.157"; export declare const version = "tests/5.0.0-beta.158";

@ -1,3 +1,3 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "tests/5.0.0-beta.157"; exports.version = "tests/5.0.0-beta.158";

@ -479,3 +479,34 @@ describe('Test Filters', function () {
doTest(test); doTest(test);
}); });
}); });
describe("Test ParamType Parser", function () {
var Tests = [
{ type: "address", format: "address" },
{ type: "address foo", format: "address foo" },
{ type: "address payable", format: "address" },
{ type: "address payable foo", format: "address foo" },
{ type: "uint", format: "uint256" },
{ type: "uint16", format: "uint16" },
{ type: "uint256", format: "uint256" },
{ type: "int", format: "int256" },
{ type: "int16", format: "int16" },
{ type: "int256", format: "int256" },
{ type: "string", format: "string" },
{ type: "string memory", format: "string" },
{ type: "string calldata", format: "string" },
{ type: "string storage", format: "string" },
{ type: "string memory foo", format: "string foo" },
{ type: "string foo", format: "string foo" },
{ type: "string[]", format: "string[]" },
{ type: "string[5]", format: "string[5]" },
{ type: "uint[] memory", format: "uint256[]" },
{ type: "tuple(address a, string[] b) memory foo", format: "tuple(address a, string[] b) foo" },
];
Tests.forEach(function (test) {
it("allows correct modifiers " + JSON.stringify(test.type), function () {
var paramType = ethers_1.ethers.utils.ParamType.from(test.type);
//console.log(test, paramType.format("full"));
assert_1.default.equal(paramType.format("full"), test.format);
});
});
});

@ -39,7 +39,7 @@
"scripts": { "scripts": {
"test": "exit 1" "test": "exit 1"
}, },
"tarballHash": "0xce6551574d7db92e9a59a54ccdfa185955433f5cda3602a89fa9499804335ca9", "tarballHash": "0x5dde69881b3dce2e3827d00926af541802a2b3995d55346fbeda99a4cb3b7dc0",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"version": "5.0.0-beta.157" "version": "5.0.0-beta.158"
} }

@ -1 +1 @@
export const version = "tests/5.0.0-beta.157"; export const version = "tests/5.0.0-beta.158";