Updated dist files.
This commit is contained in:
parent
7428776f75
commit
bee5944567
@ -3,11 +3,17 @@ Changelog
|
||||
|
||||
This change log is managed by `scripts/cmds/update-versions` but may be manually updated.
|
||||
|
||||
ethers/v5.0.0-beta.171 (2020-01-29 21:41)
|
||||
-----------------------------------------
|
||||
|
||||
- Better solc support in CLI; it will search the local pacakge for an existing solc version. ([7428776](https://github.com/ethers-io/ethers.js/commit/7428776f75222d5c07282bc29c3dd8ed99f5d2cc))
|
||||
- Update ENS registry address and lower default quorum for testnets. ([edb49da](https://github.com/ethers-io/ethers.js/commit/edb49da15518f25b3d60813ebb84f54171e308f3))
|
||||
- Exposed isBytes and isBytesLike in ethers.utils. ([99329b0](https://github.com/ethers-io/ethers.js/commit/99329b013ce7f3af301d40c41f7eb35bff288910))
|
||||
|
||||
ethers/v5.0.0-beta.170 (2020-01-21 20:37)
|
||||
-----------------------------------------
|
||||
|
||||
- Better, easier and more provider testing. ([e0d1d38](https://github.com/ethers-io/ethers.js/commit/e0d1d3866d2559f39627254873a0a1d4c0fcaf3d))
|
||||
- Updated dist files. ([f92d156](https://github.com/ethers-io/ethers.js/commit/f92d156f1784bbb299d99fe6a0ddb53c0e2d0d09))
|
||||
- Fixed out-of-bounds difficulty in getBlock, which can affect PoA networks. ([#711](https://github.com/ethers-io/ethers.js/issues/711); [251882c](https://github.com/ethers-io/ethers.js/commit/251882ced4379931ec82ba28a4db10bc7dbf3580))
|
||||
|
||||
ethers/v5.0.0-beta.169 (2020-01-20 19:42)
|
||||
|
2
packages/cli/lib.esm/_version.d.ts
vendored
2
packages/cli/lib.esm/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "cli/5.0.0-beta.148";
|
||||
export declare const version = "cli/5.0.0-beta.149";
|
||||
|
@ -1 +1 @@
|
||||
export const version = "cli/5.0.0-beta.148";
|
||||
export const version = "cli/5.0.0-beta.149";
|
||||
|
@ -10,7 +10,6 @@ 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";
|
||||
@ -18,7 +17,7 @@ import vm from "vm";
|
||||
import { ethers } from "ethers";
|
||||
import { CLI, dump, Plugin } from "../cli";
|
||||
import { getPassword, getProgressBar } from "../prompt";
|
||||
import { compile } from "../solc";
|
||||
import { compile, customRequire } from "../solc";
|
||||
function setupContext(path, context, plugin) {
|
||||
context.provider = plugin.provider;
|
||||
context.accounts = plugin.accounts;
|
||||
@ -32,7 +31,8 @@ function setupContext(path, context, plugin) {
|
||||
context.console = console;
|
||||
}
|
||||
if (!context.require) {
|
||||
context.require = _module.createRequireFromPath(path);
|
||||
//context.require = _module.createRequireFromPath(path);
|
||||
context.require = customRequire(path);
|
||||
}
|
||||
if (!context.process) {
|
||||
context.process = process;
|
||||
@ -225,10 +225,15 @@ class FundPlugin extends Plugin {
|
||||
if (this.network.name !== "ropsten") {
|
||||
this.throwError("Funding requires --network ropsten");
|
||||
}
|
||||
if (args.length !== 1) {
|
||||
if (args.length === 1) {
|
||||
this.toAddress = yield this.getAddress(args[0], "Cannot fund ZERO address", false);
|
||||
}
|
||||
else if (args.length === 0 && this.accounts.length === 1) {
|
||||
this.toAddress = yield this.accounts[0].getAddress();
|
||||
}
|
||||
else {
|
||||
this.throwUsageError("fund requires ADDRESS");
|
||||
}
|
||||
this.toAddress = yield this.getAddress(args[0], "Cannot fund ZERO address", false);
|
||||
});
|
||||
}
|
||||
run() {
|
||||
@ -757,22 +762,37 @@ class CompilePlugin extends Plugin {
|
||||
if (args.length !== 1) {
|
||||
this.throwError("compile requires exactly FILENAME");
|
||||
}
|
||||
this.filename = args[0];
|
||||
this.filename = resolve(args[0]);
|
||||
});
|
||||
}
|
||||
run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let source = fs.readFileSync(this.filename).toString();
|
||||
let result = compile(source, {
|
||||
filename: this.filename,
|
||||
optimize: (!this.noOptimize)
|
||||
});
|
||||
const source = fs.readFileSync(this.filename).toString();
|
||||
let result = null;
|
||||
try {
|
||||
result = compile(source, {
|
||||
filename: this.filename,
|
||||
optimize: (!this.noOptimize)
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
if (error.errors) {
|
||||
error.errors.forEach((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
else {
|
||||
throw error;
|
||||
}
|
||||
throw new Error("Failed to compile contract.");
|
||||
}
|
||||
let output = {};
|
||||
result.forEach((contract, index) => {
|
||||
output[contract.name] = {
|
||||
bytecode: contract.bytecode,
|
||||
runtime: contract.runtime,
|
||||
interface: contract.interface.fragments.map((f) => f.format(ethers.utils.FormatTypes.full))
|
||||
interface: contract.interface.fragments.map((f) => f.format(ethers.utils.FormatTypes.full)),
|
||||
compiler: contract.compiler
|
||||
};
|
||||
});
|
||||
console.log(JSON.stringify(output, null, 4));
|
||||
@ -821,30 +841,49 @@ class DeployPlugin extends Plugin {
|
||||
if (args.length !== 1) {
|
||||
this.throwError("deploy requires exactly FILENAME");
|
||||
}
|
||||
this.filename = args[0];
|
||||
this.filename = resolve(args[0]);
|
||||
});
|
||||
}
|
||||
run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let source = fs.readFileSync(this.filename).toString();
|
||||
let result = compile(source, {
|
||||
filename: this.filename,
|
||||
optimize: (!this.noOptimize)
|
||||
});
|
||||
let codes = result.filter((c) => (c.bytecode !== "0x" && (this.contractName == null || this.contractName == c.name)));
|
||||
let result = null;
|
||||
try {
|
||||
result = compile(source, {
|
||||
filename: this.filename,
|
||||
optimize: (!this.noOptimize)
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
if (error.errors) {
|
||||
error.errors.forEach((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
else {
|
||||
throw error;
|
||||
}
|
||||
throw new Error("Failed to compile contract.");
|
||||
}
|
||||
const codes = result.filter((c) => (this.contractName == null || this.contractName == c.name));
|
||||
if (codes.length > 1) {
|
||||
this.throwError("Please specify a contract with --contract NAME");
|
||||
this.throwError("Multiple contracts found; please specify a contract with --contract NAME");
|
||||
}
|
||||
if (codes.length === 0) {
|
||||
this.throwError("No contract found");
|
||||
}
|
||||
let factory = new ethers.ContractFactory(codes[0].interface, codes[0].bytecode, this.accounts[0]);
|
||||
let contract = yield factory.deploy();
|
||||
const factory = new ethers.ContractFactory(codes[0].interface, codes[0].bytecode, this.accounts[0]);
|
||||
dump("Deploying:", {
|
||||
Contract: codes[0].name,
|
||||
Bytecode: codes[0].bytecode,
|
||||
Interface: codes[0].interface.fragments.map((f) => f.format(ethers.utils.FormatTypes.full)),
|
||||
Compiler: codes[0].compiler,
|
||||
Optimizer: (this.noOptimize ? "No" : "Yes")
|
||||
});
|
||||
const contract = yield factory.deploy();
|
||||
dump("Deployed:", {
|
||||
Contract: codes[0].name,
|
||||
Address: contract.address,
|
||||
Bytecode: codes[0].bytecode,
|
||||
Interface: codes[0].interface.fragments.map((f) => f.format(ethers.utils.FormatTypes.full))
|
||||
});
|
||||
});
|
||||
}
|
||||
|
9
packages/cli/lib.esm/solc.d.ts
vendored
9
packages/cli/lib.esm/solc.d.ts
vendored
@ -2,8 +2,9 @@ import { ethers } from "ethers";
|
||||
export interface ContractCode {
|
||||
interface: ethers.utils.Interface;
|
||||
name: string;
|
||||
bytecode?: string;
|
||||
runtime?: string;
|
||||
compiler: string;
|
||||
bytecode: string;
|
||||
runtime: string;
|
||||
}
|
||||
export declare type CompilerOptions = {
|
||||
filename?: string;
|
||||
@ -11,4 +12,6 @@ export declare type CompilerOptions = {
|
||||
optimize?: boolean;
|
||||
throwWarnings?: boolean;
|
||||
};
|
||||
export declare function compile(source: string, options?: CompilerOptions): Array<ContractCode>;
|
||||
export declare function customRequire(path: string): (name: string) => any;
|
||||
export declare function wrapSolc(_solc: any): (source: string, options?: CompilerOptions) => Array<ContractCode>;
|
||||
export declare const compile: (source: string, options?: CompilerOptions) => ContractCode[];
|
||||
|
@ -1,16 +1,10 @@
|
||||
'use strict';
|
||||
import fs from "fs";
|
||||
import _module from "module";
|
||||
import { dirname, resolve } from "path";
|
||||
import { ethers } from "ethers";
|
||||
let _solc = null;
|
||||
function getSolc() {
|
||||
if (!_solc) {
|
||||
_solc = require("solc");
|
||||
}
|
||||
return _solc;
|
||||
}
|
||||
;
|
||||
export function compile(source, options) {
|
||||
function populateOptions(options) {
|
||||
options = ethers.utils.shallowCopy(options || {});
|
||||
if (options.filename && !options.basedir) {
|
||||
options.basedir = dirname(options.filename);
|
||||
@ -21,9 +15,12 @@ export function compile(source, options) {
|
||||
if (!options.basedir) {
|
||||
options.basedir = ".";
|
||||
}
|
||||
let sources = {};
|
||||
return options;
|
||||
}
|
||||
function getInput(source, options) {
|
||||
const sources = {};
|
||||
sources[options.filename] = { content: source };
|
||||
let input = {
|
||||
const input = {
|
||||
language: "Solidity",
|
||||
sources: sources,
|
||||
settings: {
|
||||
@ -40,6 +37,21 @@ export function compile(source, options) {
|
||||
runs: 200
|
||||
};
|
||||
}
|
||||
return input;
|
||||
}
|
||||
function _compile(_solc, source, options) {
|
||||
const compilerVersion = _solc.version();
|
||||
const ver = compilerVersion.match(/(\d+)\.(\d+)\.(\d+)/);
|
||||
if (!ver || ver[1] !== "0") {
|
||||
throw new Error("unknown version");
|
||||
}
|
||||
const version = parseFloat(ver[2] + "." + ver[3]);
|
||||
//if (version < 4.11 || version >= 7) {
|
||||
if (version < 5.0 || version >= 7.0) {
|
||||
throw new Error(`unsupported version: ${ver[1]}.${ver[2]}.${ver[3]}`);
|
||||
}
|
||||
options = populateOptions(options);
|
||||
const input = getInput(source, options);
|
||||
let findImport = (filename) => {
|
||||
try {
|
||||
return {
|
||||
@ -50,24 +62,59 @@ export function compile(source, options) {
|
||||
return { error: error.message };
|
||||
}
|
||||
};
|
||||
let output = JSON.parse(getSolc().compile(JSON.stringify(input), findImport));
|
||||
let errors = (output.errors || []).filter((x) => (x.severity === "error" || options.throwWarnings)).map((x) => x.formattedMessage);
|
||||
if (version >= 6) {
|
||||
findImport = { import: findImport };
|
||||
}
|
||||
const outputJson = _solc.compile(JSON.stringify(input), findImport);
|
||||
const output = JSON.parse(outputJson);
|
||||
const errors = (output.errors || []).filter((x) => (x.severity === "error" || options.throwWarnings)).map((x) => x.formattedMessage);
|
||||
if (errors.length) {
|
||||
let error = new Error("compilation error");
|
||||
const error = new Error("compilation error");
|
||||
error.errors = errors;
|
||||
throw error;
|
||||
}
|
||||
let result = [];
|
||||
const result = [];
|
||||
for (let filename in output.contracts) {
|
||||
for (let name in output.contracts[filename]) {
|
||||
let contract = output.contracts[filename][name];
|
||||
// Skip empty contracts
|
||||
if (!contract.evm.bytecode.object) {
|
||||
continue;
|
||||
}
|
||||
result.push({
|
||||
name: name,
|
||||
interface: new ethers.utils.Interface(contract.abi),
|
||||
bytecode: "0x" + contract.evm.bytecode.object,
|
||||
runtime: "0x" + contract.evm.deployedBytecode.object
|
||||
runtime: "0x" + contract.evm.deployedBytecode.object,
|
||||
compiler: compilerVersion
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// Creates a require which will first search from the current location,
|
||||
// and for solc will fallback onto the version included in @ethersproject/cli
|
||||
export function customRequire(path) {
|
||||
const pathRequire = _module.createRequireFromPath(resolve(path, "./sandbox.js"));
|
||||
const libRequire = _module.createRequireFromPath(resolve(__filename));
|
||||
return function (name) {
|
||||
try {
|
||||
return pathRequire(name);
|
||||
}
|
||||
catch (error) {
|
||||
if (name === "solc") {
|
||||
try {
|
||||
return libRequire(name);
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
}
|
||||
export function wrapSolc(_solc) {
|
||||
return function (source, options) {
|
||||
return _compile(_solc, source, options || {});
|
||||
};
|
||||
}
|
||||
export const compile = wrapSolc(customRequire(".")("solc"));
|
||||
|
2
packages/cli/lib/_version.d.ts
vendored
2
packages/cli/lib/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "cli/5.0.0-beta.148";
|
||||
export declare const version = "cli/5.0.0-beta.149";
|
||||
|
@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "cli/5.0.0-beta.148";
|
||||
exports.version = "cli/5.0.0-beta.149";
|
||||
|
@ -54,7 +54,6 @@ 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"));
|
||||
@ -76,7 +75,8 @@ function setupContext(path, context, plugin) {
|
||||
context.console = console;
|
||||
}
|
||||
if (!context.require) {
|
||||
context.require = module_1.default.createRequireFromPath(path);
|
||||
//context.require = _module.createRequireFromPath(path);
|
||||
context.require = solc_1.customRequire(path);
|
||||
}
|
||||
if (!context.process) {
|
||||
context.process = process;
|
||||
@ -316,23 +316,32 @@ var FundPlugin = /** @class */ (function (_super) {
|
||||
};
|
||||
FundPlugin.prototype.prepareArgs = function (args) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _a;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
var _a, _b;
|
||||
return __generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0: return [4 /*yield*/, _super.prototype.prepareArgs.call(this, args)];
|
||||
case 1:
|
||||
_b.sent();
|
||||
_c.sent();
|
||||
if (this.network.name !== "ropsten") {
|
||||
this.throwError("Funding requires --network ropsten");
|
||||
}
|
||||
if (args.length !== 1) {
|
||||
this.throwUsageError("fund requires ADDRESS");
|
||||
}
|
||||
if (!(args.length === 1)) return [3 /*break*/, 3];
|
||||
_a = this;
|
||||
return [4 /*yield*/, this.getAddress(args[0], "Cannot fund ZERO address", false)];
|
||||
case 2:
|
||||
_a.toAddress = _b.sent();
|
||||
return [2 /*return*/];
|
||||
_a.toAddress = _c.sent();
|
||||
return [3 /*break*/, 6];
|
||||
case 3:
|
||||
if (!(args.length === 0 && this.accounts.length === 1)) return [3 /*break*/, 5];
|
||||
_b = this;
|
||||
return [4 /*yield*/, this.accounts[0].getAddress()];
|
||||
case 4:
|
||||
_b.toAddress = _c.sent();
|
||||
return [3 /*break*/, 6];
|
||||
case 5:
|
||||
this.throwUsageError("fund requires ADDRESS");
|
||||
_c.label = 6;
|
||||
case 6: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -1106,7 +1115,7 @@ var CompilePlugin = /** @class */ (function (_super) {
|
||||
if (args.length !== 1) {
|
||||
this.throwError("compile requires exactly FILENAME");
|
||||
}
|
||||
this.filename = args[0];
|
||||
this.filename = path_1.resolve(args[0]);
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
@ -1117,16 +1126,31 @@ var CompilePlugin = /** @class */ (function (_super) {
|
||||
var source, result, output;
|
||||
return __generator(this, function (_a) {
|
||||
source = fs_1.default.readFileSync(this.filename).toString();
|
||||
result = solc_1.compile(source, {
|
||||
filename: this.filename,
|
||||
optimize: (!this.noOptimize)
|
||||
});
|
||||
result = null;
|
||||
try {
|
||||
result = solc_1.compile(source, {
|
||||
filename: this.filename,
|
||||
optimize: (!this.noOptimize)
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
if (error.errors) {
|
||||
error.errors.forEach(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
else {
|
||||
throw error;
|
||||
}
|
||||
throw new Error("Failed to compile contract.");
|
||||
}
|
||||
output = {};
|
||||
result.forEach(function (contract, index) {
|
||||
output[contract.name] = {
|
||||
bytecode: contract.bytecode,
|
||||
runtime: contract.runtime,
|
||||
interface: contract.interface.fragments.map(function (f) { return f.format(ethers_1.ethers.utils.FormatTypes.full); })
|
||||
interface: contract.interface.fragments.map(function (f) { return f.format(ethers_1.ethers.utils.FormatTypes.full); }),
|
||||
compiler: contract.compiler
|
||||
};
|
||||
});
|
||||
console.log(JSON.stringify(output, null, 4));
|
||||
@ -1187,7 +1211,7 @@ var DeployPlugin = /** @class */ (function (_super) {
|
||||
if (args.length !== 1) {
|
||||
this.throwError("deploy requires exactly FILENAME");
|
||||
}
|
||||
this.filename = args[0];
|
||||
this.filename = path_1.resolve(args[0]);
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
@ -1201,26 +1225,45 @@ var DeployPlugin = /** @class */ (function (_super) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
source = fs_1.default.readFileSync(this.filename).toString();
|
||||
result = solc_1.compile(source, {
|
||||
filename: this.filename,
|
||||
optimize: (!this.noOptimize)
|
||||
});
|
||||
codes = result.filter(function (c) { return (c.bytecode !== "0x" && (_this.contractName == null || _this.contractName == c.name)); });
|
||||
result = null;
|
||||
try {
|
||||
result = solc_1.compile(source, {
|
||||
filename: this.filename,
|
||||
optimize: (!this.noOptimize)
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
if (error.errors) {
|
||||
error.errors.forEach(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
else {
|
||||
throw error;
|
||||
}
|
||||
throw new Error("Failed to compile contract.");
|
||||
}
|
||||
codes = result.filter(function (c) { return (_this.contractName == null || _this.contractName == c.name); });
|
||||
if (codes.length > 1) {
|
||||
this.throwError("Please specify a contract with --contract NAME");
|
||||
this.throwError("Multiple contracts found; please specify a contract with --contract NAME");
|
||||
}
|
||||
if (codes.length === 0) {
|
||||
this.throwError("No contract found");
|
||||
}
|
||||
factory = new ethers_1.ethers.ContractFactory(codes[0].interface, codes[0].bytecode, this.accounts[0]);
|
||||
cli_1.dump("Deploying:", {
|
||||
Contract: codes[0].name,
|
||||
Bytecode: codes[0].bytecode,
|
||||
Interface: codes[0].interface.fragments.map(function (f) { return f.format(ethers_1.ethers.utils.FormatTypes.full); }),
|
||||
Compiler: codes[0].compiler,
|
||||
Optimizer: (this.noOptimize ? "No" : "Yes")
|
||||
});
|
||||
return [4 /*yield*/, factory.deploy()];
|
||||
case 1:
|
||||
contract = _a.sent();
|
||||
cli_1.dump("Deployed:", {
|
||||
Contract: codes[0].name,
|
||||
Address: contract.address,
|
||||
Bytecode: codes[0].bytecode,
|
||||
Interface: codes[0].interface.fragments.map(function (f) { return f.format(ethers_1.ethers.utils.FormatTypes.full); })
|
||||
});
|
||||
return [2 /*return*/];
|
||||
}
|
||||
|
9
packages/cli/lib/solc.d.ts
vendored
9
packages/cli/lib/solc.d.ts
vendored
@ -2,8 +2,9 @@ import { ethers } from "ethers";
|
||||
export interface ContractCode {
|
||||
interface: ethers.utils.Interface;
|
||||
name: string;
|
||||
bytecode?: string;
|
||||
runtime?: string;
|
||||
compiler: string;
|
||||
bytecode: string;
|
||||
runtime: string;
|
||||
}
|
||||
export declare type CompilerOptions = {
|
||||
filename?: string;
|
||||
@ -11,4 +12,6 @@ export declare type CompilerOptions = {
|
||||
optimize?: boolean;
|
||||
throwWarnings?: boolean;
|
||||
};
|
||||
export declare function compile(source: string, options?: CompilerOptions): Array<ContractCode>;
|
||||
export declare function customRequire(path: string): (name: string) => any;
|
||||
export declare function wrapSolc(_solc: any): (source: string, options?: CompilerOptions) => Array<ContractCode>;
|
||||
export declare const compile: (source: string, options?: CompilerOptions) => ContractCode[];
|
||||
|
@ -4,17 +4,11 @@ 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 ethers_1 = require("ethers");
|
||||
var _solc = null;
|
||||
function getSolc() {
|
||||
if (!_solc) {
|
||||
_solc = require("solc");
|
||||
}
|
||||
return _solc;
|
||||
}
|
||||
;
|
||||
function compile(source, options) {
|
||||
function populateOptions(options) {
|
||||
options = ethers_1.ethers.utils.shallowCopy(options || {});
|
||||
if (options.filename && !options.basedir) {
|
||||
options.basedir = path_1.dirname(options.filename);
|
||||
@ -25,6 +19,9 @@ function compile(source, options) {
|
||||
if (!options.basedir) {
|
||||
options.basedir = ".";
|
||||
}
|
||||
return options;
|
||||
}
|
||||
function getInput(source, options) {
|
||||
var sources = {};
|
||||
sources[options.filename] = { content: source };
|
||||
var input = {
|
||||
@ -44,6 +41,21 @@ function compile(source, options) {
|
||||
runs: 200
|
||||
};
|
||||
}
|
||||
return input;
|
||||
}
|
||||
function _compile(_solc, source, options) {
|
||||
var compilerVersion = _solc.version();
|
||||
var ver = compilerVersion.match(/(\d+)\.(\d+)\.(\d+)/);
|
||||
if (!ver || ver[1] !== "0") {
|
||||
throw new Error("unknown version");
|
||||
}
|
||||
var version = parseFloat(ver[2] + "." + ver[3]);
|
||||
//if (version < 4.11 || version >= 7) {
|
||||
if (version < 5.0 || version >= 7.0) {
|
||||
throw new Error("unsupported version: " + ver[1] + "." + ver[2] + "." + ver[3]);
|
||||
}
|
||||
options = populateOptions(options);
|
||||
var input = getInput(source, options);
|
||||
var findImport = function (filename) {
|
||||
try {
|
||||
return {
|
||||
@ -54,7 +66,11 @@ function compile(source, options) {
|
||||
return { error: error.message };
|
||||
}
|
||||
};
|
||||
var output = JSON.parse(getSolc().compile(JSON.stringify(input), findImport));
|
||||
if (version >= 6) {
|
||||
findImport = { import: findImport };
|
||||
}
|
||||
var outputJson = _solc.compile(JSON.stringify(input), findImport);
|
||||
var output = JSON.parse(outputJson);
|
||||
var errors = (output.errors || []).filter(function (x) { return (x.severity === "error" || options.throwWarnings); }).map(function (x) { return x.formattedMessage; });
|
||||
if (errors.length) {
|
||||
var error = new Error("compilation error");
|
||||
@ -65,14 +81,46 @@ function compile(source, options) {
|
||||
for (var filename in output.contracts) {
|
||||
for (var name_1 in output.contracts[filename]) {
|
||||
var contract = output.contracts[filename][name_1];
|
||||
// Skip empty contracts
|
||||
if (!contract.evm.bytecode.object) {
|
||||
continue;
|
||||
}
|
||||
result.push({
|
||||
name: name_1,
|
||||
interface: new ethers_1.ethers.utils.Interface(contract.abi),
|
||||
bytecode: "0x" + contract.evm.bytecode.object,
|
||||
runtime: "0x" + contract.evm.deployedBytecode.object
|
||||
runtime: "0x" + contract.evm.deployedBytecode.object,
|
||||
compiler: compilerVersion
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.compile = compile;
|
||||
// Creates a require which will first search from the current location,
|
||||
// and for solc will fallback onto the version included in @ethersproject/cli
|
||||
function customRequire(path) {
|
||||
var pathRequire = module_1.default.createRequireFromPath(path_1.resolve(path, "./sandbox.js"));
|
||||
var libRequire = module_1.default.createRequireFromPath(path_1.resolve(__filename));
|
||||
return function (name) {
|
||||
try {
|
||||
return pathRequire(name);
|
||||
}
|
||||
catch (error) {
|
||||
if (name === "solc") {
|
||||
try {
|
||||
return libRequire(name);
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
}
|
||||
exports.customRequire = customRequire;
|
||||
function wrapSolc(_solc) {
|
||||
return function (source, options) {
|
||||
return _compile(_solc, source, options || {});
|
||||
};
|
||||
}
|
||||
exports.wrapSolc = wrapSolc;
|
||||
exports.compile = wrapSolc(customRequire(".")("solc"));
|
||||
|
@ -37,7 +37,7 @@
|
||||
"scripts": {
|
||||
"test": "exit 1"
|
||||
},
|
||||
"tarballHash": "0x8c1c74059eaf59d10d94fcb2285fb2512a1fdf121ef5c3167e8afa16807bbbb3",
|
||||
"tarballHash": "0xebbe9e618094f2c7d91e811cbccffa95f315c6e83f730ddff4741ca31fa1a92e",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.0-beta.148"
|
||||
"version": "5.0.0-beta.149"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "cli/5.0.0-beta.148";
|
||||
export const version = "cli/5.0.0-beta.149";
|
||||
|
4
packages/ethers/dist/ethers-all.esm.min.js
vendored
4
packages/ethers/dist/ethers-all.esm.min.js
vendored
File diff suppressed because one or more lines are too long
4
packages/ethers/dist/ethers-all.umd.min.js
vendored
4
packages/ethers/dist/ethers-all.umd.min.js
vendored
File diff suppressed because one or more lines are too long
21
packages/ethers/dist/ethers.esm.js
vendored
21
packages/ethers/dist/ethers.esm.js
vendored
@ -15194,7 +15194,7 @@ function verifyMessage(message, signature) {
|
||||
return recoverAddress(hashMessage(message), signature);
|
||||
}
|
||||
|
||||
const version$h = "networks/5.0.0-beta.134";
|
||||
const version$h = "networks/5.0.0-beta.135";
|
||||
|
||||
"use strict";
|
||||
const logger$l = new Logger(version$h);
|
||||
@ -15237,7 +15237,12 @@ function ethDefaultProvider(network) {
|
||||
quorum = options.quorum;
|
||||
}
|
||||
else if (quorum > 2) {
|
||||
quorum = 2;
|
||||
if (network === "homestead") {
|
||||
quorum = 2;
|
||||
}
|
||||
else {
|
||||
quorum = 1;
|
||||
}
|
||||
}
|
||||
return new providers.FallbackProvider(providerList, quorum);
|
||||
}
|
||||
@ -15254,13 +15259,13 @@ function etcDefaultProvider(url, network) {
|
||||
}
|
||||
const homestead = {
|
||||
chainId: 1,
|
||||
ensAddress: "0x314159265dd8dbb310642f98f50c066173c1259b",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "homestead",
|
||||
_defaultProvider: ethDefaultProvider("homestead")
|
||||
};
|
||||
const ropsten = {
|
||||
chainId: 3,
|
||||
ensAddress: "0x112234455c3a32fd11230c42e7bccd4a84e02010",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "ropsten",
|
||||
_defaultProvider: ethDefaultProvider("ropsten")
|
||||
};
|
||||
@ -15284,7 +15289,7 @@ const networks = {
|
||||
testnet: ropsten,
|
||||
rinkeby: {
|
||||
chainId: 4,
|
||||
ensAddress: "0xe7410170f87102DF0055eB195163A03B7F2Bff4A",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "rinkeby",
|
||||
_defaultProvider: ethDefaultProvider("rinkeby")
|
||||
},
|
||||
@ -15295,7 +15300,7 @@ const networks = {
|
||||
},
|
||||
goerli: {
|
||||
chainId: 5,
|
||||
ensAddress: "0x112234455c3a32fd11230c42e7bccd4a84e02010",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "goerli",
|
||||
_defaultProvider: ethDefaultProvider("goerli")
|
||||
},
|
||||
@ -19213,6 +19218,8 @@ var utils$1 = /*#__PURE__*/Object.freeze({
|
||||
concat: concat,
|
||||
stripZeros: stripZeros,
|
||||
zeroPad: zeroPad,
|
||||
isBytes: isBytes,
|
||||
isBytesLike: isBytesLike,
|
||||
defaultPath: defaultPath,
|
||||
HDNode: HDNode,
|
||||
SigningKey: SigningKey,
|
||||
@ -19273,7 +19280,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
|
||||
Indexed: Indexed
|
||||
});
|
||||
|
||||
const version$l = "ethers/5.0.0-beta.170";
|
||||
const version$l = "ethers/5.0.0-beta.171";
|
||||
|
||||
"use strict";
|
||||
const errors = Logger.errors;
|
||||
|
2
packages/ethers/dist/ethers.esm.min.js
vendored
2
packages/ethers/dist/ethers.esm.min.js
vendored
File diff suppressed because one or more lines are too long
135
packages/ethers/dist/ethers.umd.js
vendored
135
packages/ethers/dist/ethers.umd.js
vendored
@ -16558,7 +16558,7 @@
|
||||
var _version$C = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "networks/5.0.0-beta.134";
|
||||
exports.version = "networks/5.0.0-beta.135";
|
||||
});
|
||||
|
||||
var _version$D = unwrapExports(_version$C);
|
||||
@ -16609,7 +16609,12 @@
|
||||
quorum = options.quorum;
|
||||
}
|
||||
else if (quorum > 2) {
|
||||
quorum = 2;
|
||||
if (network === "homestead") {
|
||||
quorum = 2;
|
||||
}
|
||||
else {
|
||||
quorum = 1;
|
||||
}
|
||||
}
|
||||
return new providers.FallbackProvider(providerList, quorum);
|
||||
}
|
||||
@ -16626,13 +16631,13 @@
|
||||
}
|
||||
var homestead = {
|
||||
chainId: 1,
|
||||
ensAddress: "0x314159265dd8dbb310642f98f50c066173c1259b",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "homestead",
|
||||
_defaultProvider: ethDefaultProvider("homestead")
|
||||
};
|
||||
var ropsten = {
|
||||
chainId: 3,
|
||||
ensAddress: "0x112234455c3a32fd11230c42e7bccd4a84e02010",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "ropsten",
|
||||
_defaultProvider: ethDefaultProvider("ropsten")
|
||||
};
|
||||
@ -16656,7 +16661,7 @@
|
||||
testnet: ropsten,
|
||||
rinkeby: {
|
||||
chainId: 4,
|
||||
ensAddress: "0xe7410170f87102DF0055eB195163A03B7F2Bff4A",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "rinkeby",
|
||||
_defaultProvider: ethDefaultProvider("rinkeby")
|
||||
},
|
||||
@ -16667,7 +16672,7 @@
|
||||
},
|
||||
goerli: {
|
||||
chainId: 5,
|
||||
ensAddress: "0x112234455c3a32fd11230c42e7bccd4a84e02010",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "goerli",
|
||||
_defaultProvider: ethDefaultProvider("goerli")
|
||||
},
|
||||
@ -21622,6 +21627,8 @@
|
||||
exports.hexStripZeros = lib$1.hexStripZeros;
|
||||
exports.hexValue = lib$1.hexValue;
|
||||
exports.hexZeroPad = lib$1.hexZeroPad;
|
||||
exports.isBytes = lib$1.isBytes;
|
||||
exports.isBytesLike = lib$1.isBytesLike;
|
||||
exports.isHexString = lib$1.isHexString;
|
||||
exports.joinSignature = lib$1.joinSignature;
|
||||
exports.zeroPad = lib$1.zeroPad;
|
||||
@ -21724,67 +21731,69 @@
|
||||
var utils_21 = utils$3.hexStripZeros;
|
||||
var utils_22 = utils$3.hexValue;
|
||||
var utils_23 = utils$3.hexZeroPad;
|
||||
var utils_24 = utils$3.isHexString;
|
||||
var utils_25 = utils$3.joinSignature;
|
||||
var utils_26 = utils$3.zeroPad;
|
||||
var utils_27 = utils$3.splitSignature;
|
||||
var utils_28 = utils$3.stripZeros;
|
||||
var utils_29 = utils$3.hashMessage;
|
||||
var utils_30 = utils$3.id;
|
||||
var utils_31 = utils$3.isValidName;
|
||||
var utils_32 = utils$3.namehash;
|
||||
var utils_33 = utils$3.defaultPath;
|
||||
var utils_34 = utils$3.entropyToMnemonic;
|
||||
var utils_35 = utils$3.HDNode;
|
||||
var utils_36 = utils$3.isValidMnemonic;
|
||||
var utils_37 = utils$3.mnemonicToEntropy;
|
||||
var utils_38 = utils$3.mnemonicToSeed;
|
||||
var utils_39 = utils$3.getJsonWalletAddress;
|
||||
var utils_40 = utils$3.keccak256;
|
||||
var utils_41 = utils$3.Logger;
|
||||
var utils_42 = utils$3.sha256;
|
||||
var utils_43 = utils$3.solidityKeccak256;
|
||||
var utils_44 = utils$3.solidityPack;
|
||||
var utils_45 = utils$3.soliditySha256;
|
||||
var utils_46 = utils$3.randomBytes;
|
||||
var utils_47 = utils$3.checkProperties;
|
||||
var utils_48 = utils$3.deepCopy;
|
||||
var utils_49 = utils$3.defineReadOnly;
|
||||
var utils_50 = utils$3.getStatic;
|
||||
var utils_51 = utils$3.resolveProperties;
|
||||
var utils_52 = utils$3.shallowCopy;
|
||||
var utils_53 = utils$3.RLP;
|
||||
var utils_54 = utils$3.computePublicKey;
|
||||
var utils_55 = utils$3.recoverPublicKey;
|
||||
var utils_56 = utils$3.SigningKey;
|
||||
var utils_57 = utils$3.formatBytes32String;
|
||||
var utils_58 = utils$3.nameprep;
|
||||
var utils_59 = utils$3.parseBytes32String;
|
||||
var utils_60 = utils$3._toEscapedUtf8String;
|
||||
var utils_61 = utils$3.toUtf8Bytes;
|
||||
var utils_62 = utils$3.toUtf8CodePoints;
|
||||
var utils_63 = utils$3.toUtf8String;
|
||||
var utils_64 = utils$3.Utf8ErrorFuncs;
|
||||
var utils_65 = utils$3.computeAddress;
|
||||
var utils_66 = utils$3.parseTransaction;
|
||||
var utils_67 = utils$3.recoverAddress;
|
||||
var utils_68 = utils$3.serializeTransaction;
|
||||
var utils_69 = utils$3.commify;
|
||||
var utils_70 = utils$3.formatEther;
|
||||
var utils_71 = utils$3.parseEther;
|
||||
var utils_72 = utils$3.formatUnits;
|
||||
var utils_73 = utils$3.parseUnits;
|
||||
var utils_74 = utils$3.verifyMessage;
|
||||
var utils_75 = utils$3.fetchJson;
|
||||
var utils_76 = utils$3.poll;
|
||||
var utils_77 = utils$3.SupportedAlgorithm;
|
||||
var utils_78 = utils$3.UnicodeNormalizationForm;
|
||||
var utils_79 = utils$3.Utf8ErrorReason;
|
||||
var utils_24 = utils$3.isBytes;
|
||||
var utils_25 = utils$3.isBytesLike;
|
||||
var utils_26 = utils$3.isHexString;
|
||||
var utils_27 = utils$3.joinSignature;
|
||||
var utils_28 = utils$3.zeroPad;
|
||||
var utils_29 = utils$3.splitSignature;
|
||||
var utils_30 = utils$3.stripZeros;
|
||||
var utils_31 = utils$3.hashMessage;
|
||||
var utils_32 = utils$3.id;
|
||||
var utils_33 = utils$3.isValidName;
|
||||
var utils_34 = utils$3.namehash;
|
||||
var utils_35 = utils$3.defaultPath;
|
||||
var utils_36 = utils$3.entropyToMnemonic;
|
||||
var utils_37 = utils$3.HDNode;
|
||||
var utils_38 = utils$3.isValidMnemonic;
|
||||
var utils_39 = utils$3.mnemonicToEntropy;
|
||||
var utils_40 = utils$3.mnemonicToSeed;
|
||||
var utils_41 = utils$3.getJsonWalletAddress;
|
||||
var utils_42 = utils$3.keccak256;
|
||||
var utils_43 = utils$3.Logger;
|
||||
var utils_44 = utils$3.sha256;
|
||||
var utils_45 = utils$3.solidityKeccak256;
|
||||
var utils_46 = utils$3.solidityPack;
|
||||
var utils_47 = utils$3.soliditySha256;
|
||||
var utils_48 = utils$3.randomBytes;
|
||||
var utils_49 = utils$3.checkProperties;
|
||||
var utils_50 = utils$3.deepCopy;
|
||||
var utils_51 = utils$3.defineReadOnly;
|
||||
var utils_52 = utils$3.getStatic;
|
||||
var utils_53 = utils$3.resolveProperties;
|
||||
var utils_54 = utils$3.shallowCopy;
|
||||
var utils_55 = utils$3.RLP;
|
||||
var utils_56 = utils$3.computePublicKey;
|
||||
var utils_57 = utils$3.recoverPublicKey;
|
||||
var utils_58 = utils$3.SigningKey;
|
||||
var utils_59 = utils$3.formatBytes32String;
|
||||
var utils_60 = utils$3.nameprep;
|
||||
var utils_61 = utils$3.parseBytes32String;
|
||||
var utils_62 = utils$3._toEscapedUtf8String;
|
||||
var utils_63 = utils$3.toUtf8Bytes;
|
||||
var utils_64 = utils$3.toUtf8CodePoints;
|
||||
var utils_65 = utils$3.toUtf8String;
|
||||
var utils_66 = utils$3.Utf8ErrorFuncs;
|
||||
var utils_67 = utils$3.computeAddress;
|
||||
var utils_68 = utils$3.parseTransaction;
|
||||
var utils_69 = utils$3.recoverAddress;
|
||||
var utils_70 = utils$3.serializeTransaction;
|
||||
var utils_71 = utils$3.commify;
|
||||
var utils_72 = utils$3.formatEther;
|
||||
var utils_73 = utils$3.parseEther;
|
||||
var utils_74 = utils$3.formatUnits;
|
||||
var utils_75 = utils$3.parseUnits;
|
||||
var utils_76 = utils$3.verifyMessage;
|
||||
var utils_77 = utils$3.fetchJson;
|
||||
var utils_78 = utils$3.poll;
|
||||
var utils_79 = utils$3.SupportedAlgorithm;
|
||||
var utils_80 = utils$3.UnicodeNormalizationForm;
|
||||
var utils_81 = utils$3.Utf8ErrorReason;
|
||||
|
||||
var _version$K = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "ethers/5.0.0-beta.170";
|
||||
exports.version = "ethers/5.0.0-beta.171";
|
||||
});
|
||||
|
||||
var _version$L = unwrapExports(_version$K);
|
||||
|
4
packages/ethers/dist/ethers.umd.min.js
vendored
4
packages/ethers/dist/ethers.umd.min.js
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/lib.esm/_version.d.ts
vendored
2
packages/ethers/lib.esm/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "ethers/5.0.0-beta.170";
|
||||
export declare const version = "ethers/5.0.0-beta.171";
|
||||
|
@ -1 +1 @@
|
||||
export const version = "ethers/5.0.0-beta.170";
|
||||
export const version = "ethers/5.0.0-beta.171";
|
||||
|
4
packages/ethers/lib.esm/utils.d.ts
vendored
4
packages/ethers/lib.esm/utils.d.ts
vendored
@ -1,7 +1,7 @@
|
||||
import { AbiCoder, defaultAbiCoder, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, ParamType } from "@ethersproject/abi";
|
||||
import { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from "@ethersproject/address";
|
||||
import * as base64 from "@ethersproject/base64";
|
||||
import { arrayify, concat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes";
|
||||
import { arrayify, concat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes";
|
||||
import { hashMessage, id, isValidName, namehash } from "@ethersproject/hash";
|
||||
import { defaultPath, entropyToMnemonic, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@ethersproject/hdnode";
|
||||
import { getJsonWalletAddress } from "@ethersproject/json-wallets";
|
||||
@ -26,4 +26,4 @@ import { Mnemonic } from "@ethersproject/hdnode";
|
||||
import { EncryptOptions, ProgressCallback } from "@ethersproject/json-wallets";
|
||||
import { Utf8ErrorFunc } from "@ethersproject/strings";
|
||||
import { ConnectionInfo, FetchJsonResponse, OnceBlockable, PollOptions } from "@ethersproject/web";
|
||||
export { AbiCoder, defaultAbiCoder, Fragment, EventFragment, FunctionFragment, ParamType, FormatTypes, Logger, RLP, fetchJson, poll, checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy, arrayify, concat, stripZeros, zeroPad, defaultPath, HDNode, SigningKey, Interface, base64, hexlify, isHexString, hexStripZeros, hexValue, hexZeroPad, hexDataLength, hexDataSlice, nameprep, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, formatBytes32String, parseBytes32String, hashMessage, namehash, isValidName, id, getAddress, getIcapAddress, getContractAddress, getCreate2Address, isAddress, formatEther, parseEther, formatUnits, parseUnits, commify, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computeAddress, recoverAddress, computePublicKey, recoverPublicKey, verifyMessage, mnemonicToEntropy, entropyToMnemonic, isValidMnemonic, mnemonicToSeed, SupportedAlgorithm, UnicodeNormalizationForm, Utf8ErrorReason, Bytes, BytesLike, Hexable, CoerceFunc, Indexed, Mnemonic, Utf8ErrorFunc, ConnectionInfo, OnceBlockable, PollOptions, FetchJsonResponse, EncryptOptions, ProgressCallback };
|
||||
export { AbiCoder, defaultAbiCoder, Fragment, EventFragment, FunctionFragment, ParamType, FormatTypes, Logger, RLP, fetchJson, poll, checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy, arrayify, concat, stripZeros, zeroPad, isBytes, isBytesLike, defaultPath, HDNode, SigningKey, Interface, base64, hexlify, isHexString, hexStripZeros, hexValue, hexZeroPad, hexDataLength, hexDataSlice, nameprep, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, formatBytes32String, parseBytes32String, hashMessage, namehash, isValidName, id, getAddress, getIcapAddress, getContractAddress, getCreate2Address, isAddress, formatEther, parseEther, formatUnits, parseUnits, commify, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computeAddress, recoverAddress, computePublicKey, recoverPublicKey, verifyMessage, mnemonicToEntropy, entropyToMnemonic, isValidMnemonic, mnemonicToSeed, SupportedAlgorithm, UnicodeNormalizationForm, Utf8ErrorReason, Bytes, BytesLike, Hexable, CoerceFunc, Indexed, Mnemonic, Utf8ErrorFunc, ConnectionInfo, OnceBlockable, PollOptions, FetchJsonResponse, EncryptOptions, ProgressCallback };
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { AbiCoder, defaultAbiCoder, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, ParamType } from "@ethersproject/abi";
|
||||
import { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from "@ethersproject/address";
|
||||
import * as base64 from "@ethersproject/base64";
|
||||
import { arrayify, concat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes";
|
||||
import { arrayify, concat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes";
|
||||
import { hashMessage, id, isValidName, namehash } from "@ethersproject/hash";
|
||||
import { defaultPath, entropyToMnemonic, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@ethersproject/hdnode";
|
||||
import { getJsonWalletAddress } from "@ethersproject/json-wallets";
|
||||
@ -25,7 +25,7 @@ import { SupportedAlgorithm } from "@ethersproject/sha2";
|
||||
import { UnicodeNormalizationForm, Utf8ErrorReason } from "@ethersproject/strings";
|
||||
////////////////////////
|
||||
// Exports
|
||||
export { AbiCoder, defaultAbiCoder, Fragment, EventFragment, FunctionFragment, ParamType, FormatTypes, Logger, RLP, fetchJson, poll, checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy, arrayify, concat, stripZeros, zeroPad, defaultPath, HDNode, SigningKey, Interface, base64, hexlify, isHexString, hexStripZeros, hexValue, hexZeroPad, hexDataLength, hexDataSlice, nameprep, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, formatBytes32String, parseBytes32String, hashMessage, namehash, isValidName, id, getAddress, getIcapAddress, getContractAddress, getCreate2Address, isAddress, formatEther, parseEther, formatUnits, parseUnits, commify, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computeAddress, recoverAddress, computePublicKey, recoverPublicKey, verifyMessage, mnemonicToEntropy, entropyToMnemonic, isValidMnemonic, mnemonicToSeed,
|
||||
export { AbiCoder, defaultAbiCoder, Fragment, EventFragment, FunctionFragment, ParamType, FormatTypes, Logger, RLP, fetchJson, poll, checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy, arrayify, concat, stripZeros, zeroPad, isBytes, isBytesLike, defaultPath, HDNode, SigningKey, Interface, base64, hexlify, isHexString, hexStripZeros, hexValue, hexZeroPad, hexDataLength, hexDataSlice, nameprep, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, formatBytes32String, parseBytes32String, hashMessage, namehash, isValidName, id, getAddress, getIcapAddress, getContractAddress, getCreate2Address, isAddress, formatEther, parseEther, formatUnits, parseUnits, commify, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computeAddress, recoverAddress, computePublicKey, recoverPublicKey, verifyMessage, mnemonicToEntropy, entropyToMnemonic, isValidMnemonic, mnemonicToSeed,
|
||||
////////////////////////
|
||||
// Enums
|
||||
SupportedAlgorithm, UnicodeNormalizationForm, Utf8ErrorReason, Indexed };
|
||||
|
2
packages/ethers/lib/_version.d.ts
vendored
2
packages/ethers/lib/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "ethers/5.0.0-beta.170";
|
||||
export declare const version = "ethers/5.0.0-beta.171";
|
||||
|
@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "ethers/5.0.0-beta.170";
|
||||
exports.version = "ethers/5.0.0-beta.171";
|
||||
|
4
packages/ethers/lib/utils.d.ts
vendored
4
packages/ethers/lib/utils.d.ts
vendored
@ -1,7 +1,7 @@
|
||||
import { AbiCoder, defaultAbiCoder, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, ParamType } from "@ethersproject/abi";
|
||||
import { getAddress, getCreate2Address, getContractAddress, getIcapAddress, isAddress } from "@ethersproject/address";
|
||||
import * as base64 from "@ethersproject/base64";
|
||||
import { arrayify, concat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes";
|
||||
import { arrayify, concat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from "@ethersproject/bytes";
|
||||
import { hashMessage, id, isValidName, namehash } from "@ethersproject/hash";
|
||||
import { defaultPath, entropyToMnemonic, HDNode, isValidMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@ethersproject/hdnode";
|
||||
import { getJsonWalletAddress } from "@ethersproject/json-wallets";
|
||||
@ -26,4 +26,4 @@ import { Mnemonic } from "@ethersproject/hdnode";
|
||||
import { EncryptOptions, ProgressCallback } from "@ethersproject/json-wallets";
|
||||
import { Utf8ErrorFunc } from "@ethersproject/strings";
|
||||
import { ConnectionInfo, FetchJsonResponse, OnceBlockable, PollOptions } from "@ethersproject/web";
|
||||
export { AbiCoder, defaultAbiCoder, Fragment, EventFragment, FunctionFragment, ParamType, FormatTypes, Logger, RLP, fetchJson, poll, checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy, arrayify, concat, stripZeros, zeroPad, defaultPath, HDNode, SigningKey, Interface, base64, hexlify, isHexString, hexStripZeros, hexValue, hexZeroPad, hexDataLength, hexDataSlice, nameprep, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, formatBytes32String, parseBytes32String, hashMessage, namehash, isValidName, id, getAddress, getIcapAddress, getContractAddress, getCreate2Address, isAddress, formatEther, parseEther, formatUnits, parseUnits, commify, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computeAddress, recoverAddress, computePublicKey, recoverPublicKey, verifyMessage, mnemonicToEntropy, entropyToMnemonic, isValidMnemonic, mnemonicToSeed, SupportedAlgorithm, UnicodeNormalizationForm, Utf8ErrorReason, Bytes, BytesLike, Hexable, CoerceFunc, Indexed, Mnemonic, Utf8ErrorFunc, ConnectionInfo, OnceBlockable, PollOptions, FetchJsonResponse, EncryptOptions, ProgressCallback };
|
||||
export { AbiCoder, defaultAbiCoder, Fragment, EventFragment, FunctionFragment, ParamType, FormatTypes, Logger, RLP, fetchJson, poll, checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy, arrayify, concat, stripZeros, zeroPad, isBytes, isBytesLike, defaultPath, HDNode, SigningKey, Interface, base64, hexlify, isHexString, hexStripZeros, hexValue, hexZeroPad, hexDataLength, hexDataSlice, nameprep, _toEscapedUtf8String, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, formatBytes32String, parseBytes32String, hashMessage, namehash, isValidName, id, getAddress, getIcapAddress, getContractAddress, getCreate2Address, isAddress, formatEther, parseEther, formatUnits, parseUnits, commify, keccak256, sha256, randomBytes, solidityPack, solidityKeccak256, soliditySha256, splitSignature, joinSignature, parseTransaction, serializeTransaction, getJsonWalletAddress, computeAddress, recoverAddress, computePublicKey, recoverPublicKey, verifyMessage, mnemonicToEntropy, entropyToMnemonic, isValidMnemonic, mnemonicToSeed, SupportedAlgorithm, UnicodeNormalizationForm, Utf8ErrorReason, Bytes, BytesLike, Hexable, CoerceFunc, Indexed, Mnemonic, Utf8ErrorFunc, ConnectionInfo, OnceBlockable, PollOptions, FetchJsonResponse, EncryptOptions, ProgressCallback };
|
||||
|
@ -34,6 +34,8 @@ exports.hexlify = bytes_1.hexlify;
|
||||
exports.hexStripZeros = bytes_1.hexStripZeros;
|
||||
exports.hexValue = bytes_1.hexValue;
|
||||
exports.hexZeroPad = bytes_1.hexZeroPad;
|
||||
exports.isBytes = bytes_1.isBytes;
|
||||
exports.isBytesLike = bytes_1.isBytesLike;
|
||||
exports.isHexString = bytes_1.isHexString;
|
||||
exports.joinSignature = bytes_1.joinSignature;
|
||||
exports.zeroPad = bytes_1.zeroPad;
|
||||
|
@ -52,7 +52,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0xda5868f4939f7d6b03cd8f0fc273209321e1e0885054a9c3b1eba25fe1757e85",
|
||||
"tarballHash": "0xc0383754c70bbdd3130d16e98a5a4b49a50a3d3194c36f65cd7e88dfd51365c3",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.0-beta.170"
|
||||
"version": "5.0.0-beta.171"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "ethers/5.0.0-beta.170";
|
||||
export const version = "ethers/5.0.0-beta.171";
|
||||
|
2
packages/networks/lib.esm/_version.d.ts
vendored
2
packages/networks/lib.esm/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "networks/5.0.0-beta.134";
|
||||
export declare const version = "networks/5.0.0-beta.135";
|
||||
|
@ -1 +1 @@
|
||||
export const version = "networks/5.0.0-beta.134";
|
||||
export const version = "networks/5.0.0-beta.135";
|
||||
|
@ -41,7 +41,12 @@ function ethDefaultProvider(network) {
|
||||
quorum = options.quorum;
|
||||
}
|
||||
else if (quorum > 2) {
|
||||
quorum = 2;
|
||||
if (network === "homestead") {
|
||||
quorum = 2;
|
||||
}
|
||||
else {
|
||||
quorum = 1;
|
||||
}
|
||||
}
|
||||
return new providers.FallbackProvider(providerList, quorum);
|
||||
}
|
||||
@ -58,13 +63,13 @@ function etcDefaultProvider(url, network) {
|
||||
}
|
||||
const homestead = {
|
||||
chainId: 1,
|
||||
ensAddress: "0x314159265dd8dbb310642f98f50c066173c1259b",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "homestead",
|
||||
_defaultProvider: ethDefaultProvider("homestead")
|
||||
};
|
||||
const ropsten = {
|
||||
chainId: 3,
|
||||
ensAddress: "0x112234455c3a32fd11230c42e7bccd4a84e02010",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "ropsten",
|
||||
_defaultProvider: ethDefaultProvider("ropsten")
|
||||
};
|
||||
@ -88,7 +93,7 @@ const networks = {
|
||||
testnet: ropsten,
|
||||
rinkeby: {
|
||||
chainId: 4,
|
||||
ensAddress: "0xe7410170f87102DF0055eB195163A03B7F2Bff4A",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "rinkeby",
|
||||
_defaultProvider: ethDefaultProvider("rinkeby")
|
||||
},
|
||||
@ -99,7 +104,7 @@ const networks = {
|
||||
},
|
||||
goerli: {
|
||||
chainId: 5,
|
||||
ensAddress: "0x112234455c3a32fd11230c42e7bccd4a84e02010",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "goerli",
|
||||
_defaultProvider: ethDefaultProvider("goerli")
|
||||
},
|
||||
|
2
packages/networks/lib/_version.d.ts
vendored
2
packages/networks/lib/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "networks/5.0.0-beta.134";
|
||||
export declare const version = "networks/5.0.0-beta.135";
|
||||
|
@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "networks/5.0.0-beta.134";
|
||||
exports.version = "networks/5.0.0-beta.135";
|
||||
|
@ -42,7 +42,12 @@ function ethDefaultProvider(network) {
|
||||
quorum = options.quorum;
|
||||
}
|
||||
else if (quorum > 2) {
|
||||
quorum = 2;
|
||||
if (network === "homestead") {
|
||||
quorum = 2;
|
||||
}
|
||||
else {
|
||||
quorum = 1;
|
||||
}
|
||||
}
|
||||
return new providers.FallbackProvider(providerList, quorum);
|
||||
}
|
||||
@ -59,13 +64,13 @@ function etcDefaultProvider(url, network) {
|
||||
}
|
||||
var homestead = {
|
||||
chainId: 1,
|
||||
ensAddress: "0x314159265dd8dbb310642f98f50c066173c1259b",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "homestead",
|
||||
_defaultProvider: ethDefaultProvider("homestead")
|
||||
};
|
||||
var ropsten = {
|
||||
chainId: 3,
|
||||
ensAddress: "0x112234455c3a32fd11230c42e7bccd4a84e02010",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "ropsten",
|
||||
_defaultProvider: ethDefaultProvider("ropsten")
|
||||
};
|
||||
@ -89,7 +94,7 @@ var networks = {
|
||||
testnet: ropsten,
|
||||
rinkeby: {
|
||||
chainId: 4,
|
||||
ensAddress: "0xe7410170f87102DF0055eB195163A03B7F2Bff4A",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "rinkeby",
|
||||
_defaultProvider: ethDefaultProvider("rinkeby")
|
||||
},
|
||||
@ -100,7 +105,7 @@ var networks = {
|
||||
},
|
||||
goerli: {
|
||||
chainId: 5,
|
||||
ensAddress: "0x112234455c3a32fd11230c42e7bccd4a84e02010",
|
||||
ensAddress: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
|
||||
name: "goerli",
|
||||
_defaultProvider: ethDefaultProvider("goerli")
|
||||
},
|
||||
|
@ -23,7 +23,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x909090e2916921154ccd5fa346872e290e6af7af03e141127edac0a7bdcf0a18",
|
||||
"tarballHash": "0xa9e016289333d17590090a4da1468c8d91d94b6b0f8c6cb6060c02ef2ca90712",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.0-beta.134"
|
||||
"version": "5.0.0-beta.135"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "networks/5.0.0-beta.134";
|
||||
export const version = "networks/5.0.0-beta.135";
|
||||
|
2
packages/tests/lib.esm/_version.d.ts
vendored
2
packages/tests/lib.esm/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "tests/5.0.0-beta.149";
|
||||
export declare const version = "tests/5.0.0-beta.150";
|
||||
|
@ -1 +1 @@
|
||||
export const version = "tests/5.0.0-beta.149";
|
||||
export const version = "tests/5.0.0-beta.150";
|
||||
|
@ -18,7 +18,11 @@ const blockchainData = {
|
||||
storage: {
|
||||
"0": "0x0000000000000000000000b2682160c482eb985ec9f3e364eec0a904c44c2300"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
address: "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
|
||||
name: "ricmoo.firefly.eth"
|
||||
},
|
||||
],
|
||||
blocks: [
|
||||
{
|
||||
@ -449,6 +453,14 @@ function testProvider(providerName, networkName) {
|
||||
});
|
||||
});
|
||||
}
|
||||
if (test.name) {
|
||||
it(`fetches the ENS name: ${test.name}`, function () {
|
||||
this.timeout(20000);
|
||||
return provider.resolveName(test.name).then((address) => {
|
||||
equals("ENS Name", test.address, address);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
tests.blocks.forEach((test) => {
|
||||
function checkBlock(promise) {
|
||||
|
2
packages/tests/lib/_version.d.ts
vendored
2
packages/tests/lib/_version.d.ts
vendored
@ -1 +1 @@
|
||||
export declare const version = "tests/5.0.0-beta.149";
|
||||
export declare const version = "tests/5.0.0-beta.150";
|
||||
|
@ -1,3 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "tests/5.0.0-beta.149";
|
||||
exports.version = "tests/5.0.0-beta.150";
|
||||
|
@ -22,7 +22,11 @@ var blockchainData = {
|
||||
storage: {
|
||||
"0": "0x0000000000000000000000b2682160c482eb985ec9f3e364eec0a904c44c2300"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
address: "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
|
||||
name: "ricmoo.firefly.eth"
|
||||
},
|
||||
],
|
||||
blocks: [
|
||||
{
|
||||
@ -453,6 +457,14 @@ function testProvider(providerName, networkName) {
|
||||
});
|
||||
});
|
||||
}
|
||||
if (test.name) {
|
||||
it("fetches the ENS name: " + test.name, function () {
|
||||
this.timeout(20000);
|
||||
return provider.resolveName(test.name).then(function (address) {
|
||||
equals("ENS Name", test.address, address);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
tests.blocks.forEach(function (test) {
|
||||
function checkBlock(promise) {
|
||||
|
@ -33,7 +33,7 @@
|
||||
"scripts": {
|
||||
"test": "exit 1"
|
||||
},
|
||||
"tarballHash": "0xecdd7eb420e52aa96c3cb6ab178604594112f3506952a6a5d2a848542753eb3b",
|
||||
"tarballHash": "0x6934f6ce2dcc6360227954303709404ba6d758881c139eeac5cad3b33efc1b36",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.0-beta.149"
|
||||
"version": "5.0.0-beta.150"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "tests/5.0.0-beta.149";
|
||||
export const version = "tests/5.0.0-beta.150";
|
||||
|
Loading…
Reference in New Issue
Block a user