Updated dist files.

This commit is contained in:
Richard Moore 2019-05-24 18:15:42 -04:00
parent eea53bb1be
commit 1f04812bf9
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295
28 changed files with 160 additions and 116 deletions

@ -1,7 +1,20 @@
Changelog Changelog
========= =========
This change log is managed by scripts/index.js but may This change log is managed by `scripts/cmd/update-versions` but may be manually updated.
be manually updated.
ethers/5.0.0-beta.136
---------------------
- Added queryFilter to Contracts. (#463; eea53bb1be29ad2bd1b229a13c85b12be264b019)
- Allow storage class in Human-Readable ABI. (#476; cf39adb09020ca0393e028b330bfd07fb4869236)
- Track per-provider JSON-RPC ID (#; 044554b58525d1677646a74119f86ea867a06d1e)
- Fixed typo in error message. (#470; 47d92aeff02cacfb26793850c7faef7cb21ce4cf)
ethers/v5.0.0-beta.135
----------------------
- Better error message for unconfigured ENS names. (#504; 3cbc4b462262ba61fa7d99a7a12e7bbf8049afb1)
- Fixed contract events. (#404; 8cdda37095df28f828ccd2ac5437ccb6541b16cc)
- Updated license for BaseX to include original authors; was only included in the source. (03c97259c46de10dbe6ce62921de2f32ffff0522)
Coming Soon...

@ -1 +1 @@
export declare const version = "5.0.0-beta.129"; export declare const version = "5.0.0-beta.130";

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

@ -25,6 +25,7 @@ var errors = __importStar(require("@ethersproject/errors"));
var properties_1 = require("@ethersproject/properties"); var properties_1 = require("@ethersproject/properties");
; ;
var _constructorGuard = {}; var _constructorGuard = {};
var storageClasses = { calldata: true, memory: true, storage: true };
// @TODO: Make sure that children of an indexed tuple are marked with a null indexed // @TODO: Make sure that children of an indexed tuple are marked with a null indexed
function parseParamType(param, allowIndexed) { function parseParamType(param, allowIndexed) {
var originalParam = param; var originalParam = param;
@ -55,11 +56,15 @@ function parseParamType(param, allowIndexed) {
break; break;
case ")": case ")":
delete node.state; delete node.state;
if (allowIndexed) {
if (node.name === "indexed") { if (node.name === "indexed") {
if (!allowIndexed) {
throwError(i);
}
node.indexed = true; node.indexed = true;
node.name = ""; node.name = "";
} }
if (storageClasses[node.name]) {
node.name = "";
} }
node.type = verifyType(node.type); node.type = verifyType(node.type);
var child = node; var child = node;
@ -74,11 +79,15 @@ function parseParamType(param, allowIndexed) {
break; break;
case ",": case ",":
delete node.state; delete node.state;
if (allowIndexed) {
if (node.name === "indexed") { if (node.name === "indexed") {
if (!allowIndexed) {
throwError(i);
}
node.indexed = true; node.indexed = true;
node.name = ""; node.name = "";
} }
if (storageClasses[node.name]) {
node.name = "";
} }
node.type = verifyType(node.type); node.type = verifyType(node.type);
var sibling = newNode(node.parent); var sibling = newNode(node.parent);
@ -101,14 +110,18 @@ function parseParamType(param, allowIndexed) {
// If reading name, the name is done // If reading name, the name is done
if (node.state.allowName) { if (node.state.allowName) {
if (node.name !== "") { if (node.name !== "") {
if (allowIndexed) {
if (node.name === "indexed") { if (node.name === "indexed") {
if (!allowIndexed) {
throwError(i);
}
if (node.indexed) { if (node.indexed) {
throwError(i); throwError(i);
} }
node.indexed = true; node.indexed = true;
node.name = ""; node.name = "";
} }
else if (storageClasses[node.name]) {
node.name = "";
} }
else { else {
node.state.allowName = false; node.state.allowName = false;
@ -156,14 +169,18 @@ function parseParamType(param, allowIndexed) {
throw new Error("unexpected eof"); throw new Error("unexpected eof");
} }
delete parent.state; delete parent.state;
if (allowIndexed) {
if (node.name === "indexed") { if (node.name === "indexed") {
if (!allowIndexed) {
throwError(originalParam.length - 7);
}
if (node.indexed) { if (node.indexed) {
throwError(originalParam.length - 7); throwError(originalParam.length - 7);
} }
node.indexed = true; node.indexed = true;
node.name = ""; node.name = "";
} }
else if (storageClasses[node.name]) {
node.name = "";
} }
parent.type = verifyType(parent.type); parent.type = verifyType(parent.type);
return parent; return parent;
@ -418,7 +435,7 @@ function parseModifiers(value, params) {
params.constant = false; params.constant = false;
params.payable = false; params.payable = false;
// @TODO: Should this be initialized to "nonpayable"? // @TODO: Should this be initialized to "nonpayable"?
params.stateMutability = null; params.stateMutability = "nonpayable";
value.split(" ").forEach(function (modifier) { value.split(" ").forEach(function (modifier) {
switch (modifier.trim()) { switch (modifier.trim()) {
case "constant": case "constant":

@ -1,6 +1,6 @@
{ {
"name": "@ethersproject/abi", "name": "@ethersproject/abi",
"version": "5.0.0-beta.129", "version": "5.0.0-beta.130",
"description": "Error utility functions for ethers.", "description": "Error utility functions for ethers.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -26,5 +26,5 @@
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"tarballHash": "0xc7c6d5bf9eed0903af63bd1d5dccdf747fbd3499ae37ba0b6b2fe10248cad497" "tarballHash": "0x665c2724ef71121cba087383d1a85a397895d4b3b30f6b73d0e0f2641229205c"
} }

@ -1 +1 @@
export const version = "5.0.0-beta.129"; export const version = "5.0.0-beta.130";

@ -1 +1 @@
export declare const version = "5.0.0-beta.128"; export declare const version = "5.0.0-beta.129";

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

@ -551,25 +551,22 @@ var Contract = /** @class */ (function () {
} }
}; };
Contract.prototype.queryFilter = function (event, fromBlockOrBlockhash, toBlock) { Contract.prototype.queryFilter = function (event, fromBlockOrBlockhash, toBlock) {
/* var _this = this;
let runningEvent = this._getRunningEvent(event); var runningEvent = this._getRunningEvent(event);
let filter = shallowCopy(runningEvent.filter); var filter = properties_1.shallowCopy(runningEvent.filter);
if (typeof (fromBlockOrBlockhash) === "string" && bytes_1.isHexString(fromBlockOrBlockhash, 32)) {
if (typeof(fromBlockOrBlockhash) === "string" && isHexString(fromBlockOrBlockhash, 32)) {
filter.blockhash = fromBlockOrBlockhash;
if (toBlock != null) { if (toBlock != null) {
errors.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock); errors.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock);
} }
} else { filter.blockhash = fromBlockOrBlockhash;
}
else {
filter.fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash : 0); filter.fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash : 0);
filter.toBlock = ((toBlock != null) ? toBlock : "latest"); filter.toBlock = ((toBlock != null) ? toBlock : "latest");
} }
return this.provider.getLogs(filter).then(function (logs) {
return this.provider.getLogs(filter).then((logs) => { return logs.map(function (log) { return _this._wrapEvent(runningEvent, log, null); });
return logs.map((log) => this._wrapEvent(eventFilter, log, null));
}); });
*/
return null;
}; };
Contract.prototype.on = function (event, listener) { Contract.prototype.on = function (event, listener) {
this._addEventListener(this._getRunningEvent(event), listener, false); this._addEventListener(this._getRunningEvent(event), listener, false);

@ -1,6 +1,6 @@
{ {
"name": "@ethersproject/contracts", "name": "@ethersproject/contracts",
"version": "5.0.0-beta.128", "version": "5.0.0-beta.129",
"description": "Error utility functions for ethers.", "description": "Error utility functions for ethers.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -27,5 +27,5 @@
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"tarballHash": "0x814c5c728e78e875d667f70c473476c505a585f6ea631f874dd1ea78d9fbc9c3" "tarballHash": "0xfaeb83e9f09a5df78ce1c180a51b9f1f68b1755aa5c6e69def4aae8dcc21cba7"
} }

@ -1 +1 @@
export const version = "5.0.0-beta.128"; export const version = "5.0.0-beta.129";

@ -1 +1 @@
export declare const version = "5.0.0-beta.135"; export declare const version = "5.0.0-beta.136";

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

@ -9665,6 +9665,7 @@ var errors = __importStar(require("@ethersproject/errors"));
var properties_1 = require("@ethersproject/properties"); var properties_1 = require("@ethersproject/properties");
; ;
var _constructorGuard = {}; var _constructorGuard = {};
var storageClasses = { calldata: true, memory: true, storage: true };
// @TODO: Make sure that children of an indexed tuple are marked with a null indexed // @TODO: Make sure that children of an indexed tuple are marked with a null indexed
function parseParamType(param, allowIndexed) { function parseParamType(param, allowIndexed) {
var originalParam = param; var originalParam = param;
@ -9695,11 +9696,15 @@ function parseParamType(param, allowIndexed) {
break; break;
case ")": case ")":
delete node.state; delete node.state;
if (allowIndexed) {
if (node.name === "indexed") { if (node.name === "indexed") {
if (!allowIndexed) {
throwError(i);
}
node.indexed = true; node.indexed = true;
node.name = ""; node.name = "";
} }
if (storageClasses[node.name]) {
node.name = "";
} }
node.type = verifyType(node.type); node.type = verifyType(node.type);
var child = node; var child = node;
@ -9714,11 +9719,15 @@ function parseParamType(param, allowIndexed) {
break; break;
case ",": case ",":
delete node.state; delete node.state;
if (allowIndexed) {
if (node.name === "indexed") { if (node.name === "indexed") {
if (!allowIndexed) {
throwError(i);
}
node.indexed = true; node.indexed = true;
node.name = ""; node.name = "";
} }
if (storageClasses[node.name]) {
node.name = "";
} }
node.type = verifyType(node.type); node.type = verifyType(node.type);
var sibling = newNode(node.parent); var sibling = newNode(node.parent);
@ -9741,14 +9750,18 @@ function parseParamType(param, allowIndexed) {
// If reading name, the name is done // If reading name, the name is done
if (node.state.allowName) { if (node.state.allowName) {
if (node.name !== "") { if (node.name !== "") {
if (allowIndexed) {
if (node.name === "indexed") { if (node.name === "indexed") {
if (!allowIndexed) {
throwError(i);
}
if (node.indexed) { if (node.indexed) {
throwError(i); throwError(i);
} }
node.indexed = true; node.indexed = true;
node.name = ""; node.name = "";
} }
else if (storageClasses[node.name]) {
node.name = "";
} }
else { else {
node.state.allowName = false; node.state.allowName = false;
@ -9796,14 +9809,18 @@ function parseParamType(param, allowIndexed) {
throw new Error("unexpected eof"); throw new Error("unexpected eof");
} }
delete parent.state; delete parent.state;
if (allowIndexed) {
if (node.name === "indexed") { if (node.name === "indexed") {
if (!allowIndexed) {
throwError(originalParam.length - 7);
}
if (node.indexed) { if (node.indexed) {
throwError(originalParam.length - 7); throwError(originalParam.length - 7);
} }
node.indexed = true; node.indexed = true;
node.name = ""; node.name = "";
} }
else if (storageClasses[node.name]) {
node.name = "";
} }
parent.type = verifyType(parent.type); parent.type = verifyType(parent.type);
return parent; return parent;
@ -10058,7 +10075,7 @@ function parseModifiers(value, params) {
params.constant = false; params.constant = false;
params.payable = false; params.payable = false;
// @TODO: Should this be initialized to "nonpayable"? // @TODO: Should this be initialized to "nonpayable"?
params.stateMutability = null; params.stateMutability = "nonpayable";
value.split(" ").forEach(function (modifier) { value.split(" ").forEach(function (modifier) {
switch (modifier.trim()) { switch (modifier.trim()) {
case "constant": case "constant":
@ -12834,25 +12851,22 @@ var Contract = /** @class */ (function () {
} }
}; };
Contract.prototype.queryFilter = function (event, fromBlockOrBlockhash, toBlock) { Contract.prototype.queryFilter = function (event, fromBlockOrBlockhash, toBlock) {
/* var _this = this;
let runningEvent = this._getRunningEvent(event); var runningEvent = this._getRunningEvent(event);
let filter = shallowCopy(runningEvent.filter); var filter = properties_1.shallowCopy(runningEvent.filter);
if (typeof (fromBlockOrBlockhash) === "string" && bytes_1.isHexString(fromBlockOrBlockhash, 32)) {
if (typeof(fromBlockOrBlockhash) === "string" && isHexString(fromBlockOrBlockhash, 32)) {
filter.blockhash = fromBlockOrBlockhash;
if (toBlock != null) { if (toBlock != null) {
errors.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock); errors.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock);
} }
} else { filter.blockhash = fromBlockOrBlockhash;
}
else {
filter.fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash : 0); filter.fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash : 0);
filter.toBlock = ((toBlock != null) ? toBlock : "latest"); filter.toBlock = ((toBlock != null) ? toBlock : "latest");
} }
return this.provider.getLogs(filter).then(function (logs) {
return this.provider.getLogs(filter).then((logs) => { return logs.map(function (log) { return _this._wrapEvent(runningEvent, log, null); });
return logs.map((log) => this._wrapEvent(eventFilter, log, null));
}); });
*/
return null;
}; };
Contract.prototype.on = function (event, listener) { Contract.prototype.on = function (event, listener) {
this._addEventListener(this._getRunningEvent(event), listener, false); this._addEventListener(this._getRunningEvent(event), listener, false);
@ -13314,7 +13328,7 @@ exports.info = info;
},{}],67:[function(require,module,exports){ },{}],67:[function(require,module,exports){
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "5.0.0-beta.135"; exports.version = "5.0.0-beta.136";
},{}],68:[function(require,module,exports){ },{}],68:[function(require,module,exports){
"use strict"; "use strict";
@ -17181,6 +17195,7 @@ var JsonRpcProvider = /** @class */ (function (_super) {
else { else {
_this.connection = url; _this.connection = url;
} }
_this._nextId = 42;
return _this; return _this;
} }
JsonRpcProvider.prototype.getSigner = function (addressOrIndex) { JsonRpcProvider.prototype.getSigner = function (addressOrIndex) {
@ -17200,7 +17215,7 @@ var JsonRpcProvider = /** @class */ (function (_super) {
var request = { var request = {
method: method, method: method,
params: params, params: params,
id: 42, id: (this._nextId++),
jsonrpc: "2.0" jsonrpc: "2.0"
}; };
return web_1.fetchJson(this.connection, JSON.stringify(request), getResult).then(function (result) { return web_1.fetchJson(this.connection, JSON.stringify(request), getResult).then(function (result) {
@ -18144,7 +18159,7 @@ function parseBytes32String(bytes) {
throw new Error("invalid bytes32 - not 32 bytes long"); throw new Error("invalid bytes32 - not 32 bytes long");
} }
if (data[31] !== 0) { if (data[31] !== 0) {
throw new Error("invalid bytes32 sdtring - no null terminator"); throw new Error("invalid bytes32 string - no null terminator");
} }
// Find the null termination // Find the null termination
var length = 31; var length = 31;

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
{ {
"name": "ethers", "name": "ethers",
"version": "5.0.0-beta.135", "version": "5.0.0-beta.136",
"description": "Error utility functions for ethers.", "description": "Error utility functions for ethers.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -56,5 +56,5 @@
"publishConfig": { "publishConfig": {
"tag": "next" "tag": "next"
}, },
"tarballHash": "0xe761bc304cd6844372ef616261dec57e587a312be9f9308b4aed706294840b2b" "tarballHash": "0x58597609dfbbc81ee782ee00a9a811ba6f89bc55a889033d8e8d7419ac8e9e09"
} }

@ -1 +1 @@
export const version = "5.0.0-beta.135"; export const version = "5.0.0-beta.136";

@ -1 +1 @@
export declare const version = "5.0.0-beta.130"; export declare const version = "5.0.0-beta.131";

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

@ -24,6 +24,7 @@ declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
export declare class JsonRpcProvider extends BaseProvider { export declare class JsonRpcProvider extends BaseProvider {
readonly connection: ConnectionInfo; readonly connection: ConnectionInfo;
_pendingFilter: Promise<number>; _pendingFilter: Promise<number>;
_nextId: number;
constructor(url?: ConnectionInfo | string, network?: Networkish); constructor(url?: ConnectionInfo | string, network?: Networkish);
getSigner(addressOrIndex?: string | number): JsonRpcSigner; getSigner(addressOrIndex?: string | number): JsonRpcSigner;
getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner; getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;

@ -263,6 +263,7 @@ var JsonRpcProvider = /** @class */ (function (_super) {
else { else {
_this.connection = url; _this.connection = url;
} }
_this._nextId = 42;
return _this; return _this;
} }
JsonRpcProvider.prototype.getSigner = function (addressOrIndex) { JsonRpcProvider.prototype.getSigner = function (addressOrIndex) {
@ -282,7 +283,7 @@ var JsonRpcProvider = /** @class */ (function (_super) {
var request = { var request = {
method: method, method: method,
params: params, params: params,
id: 42, id: (this._nextId++),
jsonrpc: "2.0" jsonrpc: "2.0"
}; };
return web_1.fetchJson(this.connection, JSON.stringify(request), getResult).then(function (result) { return web_1.fetchJson(this.connection, JSON.stringify(request), getResult).then(function (result) {

@ -1,6 +1,6 @@
{ {
"name": "@ethersproject/providers", "name": "@ethersproject/providers",
"version": "5.0.0-beta.130", "version": "5.0.0-beta.131",
"description": "Error utility functions for ethers.", "description": "Error utility functions for ethers.",
"main": "index.js", "main": "index.js",
"browser": { "browser": {
@ -39,5 +39,5 @@
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"tarballHash": "0x387a07d46e78db49a81027c6679e3472b3de0461731033c947431629d5226328" "tarballHash": "0x8e823bbbab86f42a2bd94936fafc2aeb493d8eee8fcde3cbbc20b9589cd6078d"
} }

@ -1 +1 @@
export const version = "5.0.0-beta.130"; export const version = "5.0.0-beta.131";

@ -1 +1 @@
export declare const version = "5.0.0-beta.124"; export declare const version = "5.0.0-beta.125";

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

@ -174,7 +174,7 @@ function parseBytes32String(bytes) {
throw new Error("invalid bytes32 - not 32 bytes long"); throw new Error("invalid bytes32 - not 32 bytes long");
} }
if (data[31] !== 0) { if (data[31] !== 0) {
throw new Error("invalid bytes32 sdtring - no null terminator"); throw new Error("invalid bytes32 string - no null terminator");
} }
// Find the null termination // Find the null termination
var length = 31; var length = 31;

@ -1,6 +1,6 @@
{ {
"name": "@ethersproject/strings", "name": "@ethersproject/strings",
"version": "5.0.0-beta.124", "version": "5.0.0-beta.125",
"description": "String utility functions.", "description": "String utility functions.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -22,5 +22,5 @@
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"tarballHash": "0x07db51c71e10e30a890a69b4a7e7da9a052e9d2f5d736c8325de0925519e34b6" "tarballHash": "0x9e647e336090067257da0bb65710eb42992ce8bd99fc0a8af4b29c360afdf73b"
} }

@ -1 +1 @@
export const version = "5.0.0-beta.124"; export const version = "5.0.0-beta.125";