Updated dist files.

This commit is contained in:
Richard Moore 2020-01-09 03:32:50 -05:00
parent c04f9a7fff
commit 074eb4ba69
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
33 changed files with 156 additions and 99 deletions

@ -3,6 +3,12 @@ Changelog
This change log is managed by `scripts/cmds/update-versions` but may be manually updated.
ethers/v5.0.0-beta.165 (2020-01-09 03:31)
-----------------------------------------
- Fixed require resolution for CLI scripts. ([c04f9a7](https://github.com/ethers-io/ethers.js/commit/c04f9a7fff727bb04a4aa3a0fa05fd5cd8e795a6))
- Added new URLs for default ETC (and ETC testnets) providers. ([#351](https://github.com/ethers-io/ethers.js/issues/351); [3c184ac](https://github.com/ethers-io/ethers.js/commit/3c184ace21aafbb27f4d44cce1bb738af899d59f))
ethers/v5.0.0-beta.164 (2020-01-07 19:57)
-----------------------------------------

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

@ -1 +1 @@
export const version = "cli/5.0.0-beta.147";
export const version = "cli/5.0.0-beta.148";

@ -10,6 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
import fs from "fs";
import _module from "module";
import { dirname, resolve } from "path";
import REPL from "repl";
import util from "util";
import vm from "vm";
@ -17,14 +19,20 @@ import { ethers } from "ethers";
import { CLI, dump, Plugin } from "../cli";
import { getPassword, getProgressBar } from "../prompt";
import { compile } from "../solc";
function setupContext(context, plugin) {
function setupContext(path, context, plugin) {
context.provider = plugin.provider;
context.accounts = plugin.accounts;
if (!context.__filename) {
context.__filename = path;
}
if (!context.__dirname) {
context.__dirname = dirname(path);
}
if (!context.console) {
context.console = console;
}
if (!context.require) {
context.require = require;
context.require = _module.createRequireFromPath(path);
}
if (!context.process) {
context.process = process;
@ -119,7 +127,7 @@ class SandboxPlugin extends Plugin {
prompt: (this.provider ? this.network.name : "no-network") + "> ",
writer: promiseWriter
});
setupContext(repl.context, this);
setupContext(resolve(process.cwd(), "./sandbox.js"), repl.context, this);
return new Promise((resolve) => {
repl.on("exit", function () {
console.log("");
@ -471,7 +479,7 @@ class EvalPlugin extends Plugin {
run() {
return __awaiter(this, void 0, void 0, function* () {
let contextObject = {};
setupContext(contextObject, this);
setupContext(resolve(process.cwd(), "./sandbox.js"), contextObject, this);
let context = vm.createContext(contextObject);
let script = new vm.Script(this.code, { filename: "-" });
let result = script.runInContext(context);
@ -505,7 +513,7 @@ class RunPlugin extends Plugin {
run() {
return __awaiter(this, void 0, void 0, function* () {
let contextObject = {};
setupContext(contextObject, this);
setupContext(resolve(this.filename), contextObject, this);
let context = vm.createContext(contextObject);
let script = new vm.Script(fs.readFileSync(this.filename).toString(), { filename: this.filename });
let result = script.runInContext(context);

@ -50,7 +50,7 @@ export declare abstract class Plugin {
constructor();
static getHelp(): Help;
static getOptionHelp(): Array<Help>;
prepareOptions(argParser: ArgParser): Promise<void>;
prepareOptions(argParser: ArgParser, verifyOnly?: boolean): Promise<void>;
prepareArgs(args: Array<string>): Promise<void>;
run(): Promise<void>;
getAddress(addressOrName: string, message?: string, allowZero?: boolean): Promise<string>;

@ -373,12 +373,12 @@ function loadAccount(arg, plugin, preventFile) {
return __awaiter(this, void 0, void 0, function* () {
// Secure entry; use prompt with mask
if (arg === "-") {
let content = yield getPassword("Private Key / Mnemonic:");
const content = yield getPassword("Private Key / Mnemonic:");
return loadAccount(content, plugin, true);
}
// Raw private key
if (ethers.utils.isHexString(arg, 32)) {
let signer = new ethers.Wallet(arg, plugin.provider);
const signer = new ethers.Wallet(arg, plugin.provider);
return Promise.resolve(new WrappedSigner(signer.getAddress(), () => Promise.resolve(signer), plugin));
}
// Mnemonic
@ -446,7 +446,7 @@ export class Plugin {
static getOptionHelp() {
return [];
}
prepareOptions(argParser) {
prepareOptions(argParser, verifyOnly) {
return __awaiter(this, void 0, void 0, function* () {
let runners = [];
this.wait = argParser.consumeFlag("wait");
@ -495,6 +495,10 @@ export class Plugin {
let account = accountOptions[i];
switch (account.name) {
case "account":
// Verifying does not need to ask for passwords, etc.
if (verifyOnly) {
break;
}
let wrappedSigner = yield loadAccount(account.value, this);
accounts.push(wrappedSigner);
break;
@ -529,21 +533,21 @@ export class Plugin {
ethers.utils.defineReadOnly(this, "accounts", Object.freeze(accounts));
/////////////////////
// Transaction Options
let gasPrice = argParser.consumeOption("gas-price");
const gasPrice = argParser.consumeOption("gas-price");
if (gasPrice) {
ethers.utils.defineReadOnly(this, "gasPrice", ethers.utils.parseUnits(gasPrice, "gwei"));
}
else {
ethers.utils.defineReadOnly(this, "gasPrice", null);
}
let gasLimit = argParser.consumeOption("gas-limit");
const gasLimit = argParser.consumeOption("gas-limit");
if (gasLimit) {
ethers.utils.defineReadOnly(this, "gasLimit", ethers.BigNumber.from(gasLimit));
}
else {
ethers.utils.defineReadOnly(this, "gasLimit", null);
}
let nonce = argParser.consumeOption("nonce");
const nonce = argParser.consumeOption("nonce");
if (nonce) {
this.nonce = ethers.BigNumber.from(nonce).toNumber();
}
@ -600,6 +604,9 @@ export class Plugin {
}
}
class CheckPlugin extends Plugin {
prepareOptions(argParser, verifyOnly) {
return super.prepareOptions(argParser, true);
}
}
export class CLI {
constructor(defaultCommand, options) {
@ -812,7 +819,7 @@ export class CLI {
if (argParser.consumeFlag("help")) {
return this.showUsage();
}
let debug = argParser.consumeFlag("debug");
const debug = argParser.consumeFlag("debug");
// Create Plug-in instance
let plugin = null;
if (this.standAlone) {

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

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

@ -54,6 +54,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
var fs_1 = __importDefault(require("fs"));
var module_1 = __importDefault(require("module"));
var path_1 = require("path");
var repl_1 = __importDefault(require("repl"));
var util_1 = __importDefault(require("util"));
var vm_1 = __importDefault(require("vm"));
@ -61,14 +63,20 @@ var ethers_1 = require("ethers");
var cli_1 = require("../cli");
var prompt_1 = require("../prompt");
var solc_1 = require("../solc");
function setupContext(context, plugin) {
function setupContext(path, context, plugin) {
context.provider = plugin.provider;
context.accounts = plugin.accounts;
if (!context.__filename) {
context.__filename = path;
}
if (!context.__dirname) {
context.__dirname = path_1.dirname(path);
}
if (!context.console) {
context.console = console;
}
if (!context.require) {
context.require = require;
context.require = module_1.default.createRequireFromPath(path);
}
if (!context.process) {
context.process = process;
@ -184,7 +192,7 @@ var SandboxPlugin = /** @class */ (function (_super) {
prompt: (this.provider ? this.network.name : "no-network") + "> ",
writer: promiseWriter
});
setupContext(repl.context, this);
setupContext(path_1.resolve(process.cwd(), "./sandbox.js"), repl.context, this);
return new Promise(function (resolve) {
repl.on("exit", function () {
console.log("");
@ -693,7 +701,7 @@ var EvalPlugin = /** @class */ (function (_super) {
switch (_a.label) {
case 0:
contextObject = {};
setupContext(contextObject, this);
setupContext(path_1.resolve(process.cwd(), "./sandbox.js"), contextObject, this);
context = vm_1.default.createContext(contextObject);
script = new vm_1.default.Script(this.code, { filename: "-" });
result = script.runInContext(context);
@ -746,7 +754,7 @@ var RunPlugin = /** @class */ (function (_super) {
switch (_a.label) {
case 0:
contextObject = {};
setupContext(contextObject, this);
setupContext(path_1.resolve(this.filename), contextObject, this);
context = vm_1.default.createContext(contextObject);
script = new vm_1.default.Script(fs_1.default.readFileSync(this.filename).toString(), { filename: this.filename });
result = script.runInContext(context);

@ -50,7 +50,7 @@ export declare abstract class Plugin {
constructor();
static getHelp(): Help;
static getOptionHelp(): Array<Help>;
prepareOptions(argParser: ArgParser): Promise<void>;
prepareOptions(argParser: ArgParser, verifyOnly?: boolean): Promise<void>;
prepareArgs(args: Array<string>): Promise<void>;
run(): Promise<void>;
getAddress(addressOrName: string, message?: string, allowZero?: boolean): Promise<string>;

@ -609,7 +609,7 @@ var Plugin = /** @class */ (function () {
Plugin.getOptionHelp = function () {
return [];
};
Plugin.prototype.prepareOptions = function (argParser) {
Plugin.prototype.prepareOptions = function (argParser, verifyOnly) {
return __awaiter(this, void 0, void 0, function () {
var runners, network, providers, rpc, accounts, accountOptions, _loop_1, this_1, i, gasPrice, gasLimit, nonce, error_3;
var _this = this;
@ -670,7 +670,12 @@ var Plugin = /** @class */ (function () {
case "account-void": return [3 /*break*/, 4];
}
return [3 /*break*/, 5];
case 1: return [4 /*yield*/, loadAccount(account.value, this_1)];
case 1:
// Verifying does not need to ask for passwords, etc.
if (verifyOnly) {
return [3 /*break*/, 5];
}
return [4 /*yield*/, loadAccount(account.value, this_1)];
case 2:
wrappedSigner = _b.sent();
accounts.push(wrappedSigner);
@ -807,6 +812,9 @@ var CheckPlugin = /** @class */ (function (_super) {
function CheckPlugin() {
return _super !== null && _super.apply(this, arguments) || this;
}
CheckPlugin.prototype.prepareOptions = function (argParser, verifyOnly) {
return _super.prototype.prepareOptions.call(this, argParser, true);
};
return CheckPlugin;
}(Plugin));
var CLI = /** @class */ (function () {

@ -37,7 +37,7 @@
"scripts": {
"test": "exit 1"
},
"tarballHash": "0xd589ee9af478394c353a3630154dd2d561c557ef2539adfd1abe0d0f3b63869a",
"tarballHash": "0x8c1c74059eaf59d10d94fcb2285fb2512a1fdf121ef5c3167e8afa16807bbbb3",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.147"
"version": "5.0.0-beta.148"
}

@ -1 +1 @@
export const version = "cli/5.0.0-beta.147";
export const version = "cli/5.0.0-beta.148";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -15070,7 +15070,7 @@ function verifyMessage(message, signature) {
return recoverAddress(hashMessage(message), signature);
}
const version$h = "networks/5.0.0-beta.133";
const version$h = "networks/5.0.0-beta.134";
"use strict";
const logger$k = new Logger(version$h);
@ -15092,13 +15092,6 @@ function ethDefaultProvider(network) {
}
catch (error) { }
}
/* NodeSmith is being discontinued on 2019-12-20
if (providers.NodesmithProvider) {
try {
providerList.push(new providers.NodesmithProvider(network, options.nodesmith));
} catch(error) { }
}
*/
if (providers.AlchemyProvider) {
try {
providerList.push(new providers.AlchemyProvider(network, options.alchemy));
@ -15147,6 +15140,11 @@ const ropsten = {
name: "ropsten",
_defaultProvider: ethDefaultProvider("ropsten")
};
const classicMordor = {
chainId: 63,
name: "classicMordor",
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/mordor", "classicMordor")
};
const networks = {
unspecified: {
chainId: 0,
@ -15177,16 +15175,23 @@ const networks = {
name: "goerli",
_defaultProvider: ethDefaultProvider("goerli")
},
// ETC (See: #351)
classic: {
chainId: 61,
name: "classic",
_defaultProvider: etcDefaultProvider("https://web3.gastracker.io", "classic")
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/etc", "classic")
},
classicTestnet: {
classicMorden: {
chainId: 62,
name: "classicTestnet",
_defaultProvider: etcDefaultProvider("https://web3.gastracker.io/morden", "classicTestnet")
}
name: "classicMorden",
},
classicMordor: classicMordor,
classicTestnet: classicMordor,
classicKotti: {
chainId: 6,
name: "classicKotti",
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/kotti", "classicKotti")
},
};
/**
* getNetwork
@ -18988,7 +18993,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
Indexed: Indexed
});
const version$l = "ethers/5.0.0-beta.164";
const version$l = "ethers/5.0.0-beta.165";
"use strict";
const errors = Logger.errors;

File diff suppressed because one or more lines are too long

@ -16426,7 +16426,7 @@
var _version$C = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "networks/5.0.0-beta.133";
exports.version = "networks/5.0.0-beta.134";
});
var _version$D = unwrapExports(_version$C);
@ -16456,13 +16456,6 @@
}
catch (error) { }
}
/* NodeSmith is being discontinued on 2019-12-20
if (providers.NodesmithProvider) {
try {
providerList.push(new providers.NodesmithProvider(network, options.nodesmith));
} catch(error) { }
}
*/
if (providers.AlchemyProvider) {
try {
providerList.push(new providers.AlchemyProvider(network, options.alchemy));
@ -16511,6 +16504,11 @@
name: "ropsten",
_defaultProvider: ethDefaultProvider("ropsten")
};
var classicMordor = {
chainId: 63,
name: "classicMordor",
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/mordor", "classicMordor")
};
var networks = {
unspecified: {
chainId: 0,
@ -16541,16 +16539,23 @@
name: "goerli",
_defaultProvider: ethDefaultProvider("goerli")
},
// ETC (See: #351)
classic: {
chainId: 61,
name: "classic",
_defaultProvider: etcDefaultProvider("https://web3.gastracker.io", "classic")
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/etc", "classic")
},
classicTestnet: {
classicMorden: {
chainId: 62,
name: "classicTestnet",
_defaultProvider: etcDefaultProvider("https://web3.gastracker.io/morden", "classicTestnet")
}
name: "classicMorden",
},
classicMordor: classicMordor,
classicTestnet: classicMordor,
classicKotti: {
chainId: 6,
name: "classicKotti",
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/kotti", "classicKotti")
},
};
/**
* getNetwork
@ -21431,7 +21436,7 @@
var _version$K = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "ethers/5.0.0-beta.164";
exports.version = "ethers/5.0.0-beta.165";
});
var _version$L = unwrapExports(_version$K);

File diff suppressed because one or more lines are too long

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

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

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

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

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

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

@ -1 +1 @@
export declare const version = "networks/5.0.0-beta.133";
export declare const version = "networks/5.0.0-beta.134";

@ -1 +1 @@
export const version = "networks/5.0.0-beta.133";
export const version = "networks/5.0.0-beta.134";

@ -20,13 +20,6 @@ function ethDefaultProvider(network) {
}
catch (error) { }
}
/* NodeSmith is being discontinued on 2019-12-20
if (providers.NodesmithProvider) {
try {
providerList.push(new providers.NodesmithProvider(network, options.nodesmith));
} catch(error) { }
}
*/
if (providers.AlchemyProvider) {
try {
providerList.push(new providers.AlchemyProvider(network, options.alchemy));
@ -75,6 +68,11 @@ const ropsten = {
name: "ropsten",
_defaultProvider: ethDefaultProvider("ropsten")
};
const classicMordor = {
chainId: 63,
name: "classicMordor",
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/mordor", "classicMordor")
};
const networks = {
unspecified: {
chainId: 0,
@ -105,16 +103,23 @@ const networks = {
name: "goerli",
_defaultProvider: ethDefaultProvider("goerli")
},
// ETC (See: #351)
classic: {
chainId: 61,
name: "classic",
_defaultProvider: etcDefaultProvider("https://web3.gastracker.io", "classic")
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/etc", "classic")
},
classicTestnet: {
classicMorden: {
chainId: 62,
name: "classicTestnet",
_defaultProvider: etcDefaultProvider("https://web3.gastracker.io/morden", "classicTestnet")
}
name: "classicMorden",
},
classicMordor: classicMordor,
classicTestnet: classicMordor,
classicKotti: {
chainId: 6,
name: "classicKotti",
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/kotti", "classicKotti")
},
};
/**
* getNetwork

@ -1 +1 @@
export declare const version = "networks/5.0.0-beta.133";
export declare const version = "networks/5.0.0-beta.134";

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

@ -21,13 +21,6 @@ function ethDefaultProvider(network) {
}
catch (error) { }
}
/* NodeSmith is being discontinued on 2019-12-20
if (providers.NodesmithProvider) {
try {
providerList.push(new providers.NodesmithProvider(network, options.nodesmith));
} catch(error) { }
}
*/
if (providers.AlchemyProvider) {
try {
providerList.push(new providers.AlchemyProvider(network, options.alchemy));
@ -76,6 +69,11 @@ var ropsten = {
name: "ropsten",
_defaultProvider: ethDefaultProvider("ropsten")
};
var classicMordor = {
chainId: 63,
name: "classicMordor",
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/mordor", "classicMordor")
};
var networks = {
unspecified: {
chainId: 0,
@ -106,16 +104,23 @@ var networks = {
name: "goerli",
_defaultProvider: ethDefaultProvider("goerli")
},
// ETC (See: #351)
classic: {
chainId: 61,
name: "classic",
_defaultProvider: etcDefaultProvider("https://web3.gastracker.io", "classic")
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/etc", "classic")
},
classicTestnet: {
classicMorden: {
chainId: 62,
name: "classicTestnet",
_defaultProvider: etcDefaultProvider("https://web3.gastracker.io/morden", "classicTestnet")
}
name: "classicMorden",
},
classicMordor: classicMordor,
classicTestnet: classicMordor,
classicKotti: {
chainId: 6,
name: "classicKotti",
_defaultProvider: etcDefaultProvider("https://www.ethercluster.com/kotti", "classicKotti")
},
};
/**
* getNetwork

@ -23,7 +23,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x85bce5a8bc76d1c487c6ffe937f83a4b237e2ca0bb0bf550813b2d6f3f67bbbd",
"tarballHash": "0x909090e2916921154ccd5fa346872e290e6af7af03e141127edac0a7bdcf0a18",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.133"
"version": "5.0.0-beta.134"
}

@ -1 +1 @@
export const version = "networks/5.0.0-beta.133";
export const version = "networks/5.0.0-beta.134";