Skip to content

Commit

Permalink
Updated dist files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jun 11, 2019
1 parent deb2281 commit 6c19025
Show file tree
Hide file tree
Showing 72 changed files with 386 additions and 508 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
Changelog
=========

This change log is managed by `scripts/cmd/update-versions` but may be manually updated.
This change log is managed by `scripts/cmds/update-versions` but may be manually updated.

ethers/v5.0.0-beta.139 (2019-06-11 17:55)
-----------------------------------------

- Removed freeze option from deepCopy; all properties are read-only and only objects may have new properties added. ([1bc792d](https://github.com/ethers-io/ethers.js/commit/1bc792d9dcc6a06a1be4fc5e5b9a538a3f6b7ada))
- Moved away from isNamedInstance which breaks after Browserify name mangling. ([257d67c](https://github.com/ethers-io/ethers.js/commit/257d67c9625fa237bcfb3d651c49aa3b79175cae))
- Expose poll function in utils. ([#512](https://github.com/ethers-io/ethers.js/issues/512); [e6f6383](https://github.com/ethers-io/ethers.js/commit/e6f6383346818fa67423f1f20450e011242eb554))
- Make TransactionResponse hash required. ([#537](https://github.com/ethers-io/ethers.js/issues/537); [095c1fe](https://github.com/ethers-io/ethers.js/commit/095c1fe579068a3204ea0d1bc1893f293f61e719))

ethers/v5.0.0-beta.138 (2019-06-04 16:05)
-----------------------------------------
Expand All @@ -17,7 +25,7 @@ ethers/v5.0.0-beta.137 (2019-06-01 14:06)
- Added changelog management to update-versions. ([4a3f719](https://github.com/ethers-io/ethers.js/commit/4a3f7190dc04275030d313289e1ba6a2b31407ec))

ethers/v5.0.0-beta.136
---------------------
----------------------

- Added queryFilter to Contracts. ([#463](https://github.com/ethers-io/ethers.js/issues/463); [eea53bb](https://github.com/ethers-io/ethers.js/commit/eea53bb1be29ad2bd1b229a13c85b12be264b019))
- Allow storage class in Human-Readable ABI. ([#476](https://github.com/ethers-io/ethers.js/issues/476); [cf39adb](https://github.com/ethers-io/ethers.js/commit/cf39adb09020ca0393e028b330bfd07fb4869236))
Expand Down
2 changes: 1 addition & 1 deletion packages/abi/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "5.0.0-beta.131";
export declare const version = "5.0.0-beta.132";
2 changes: 1 addition & 1 deletion packages/abi/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "5.0.0-beta.131";
exports.version = "5.0.0-beta.132";
7 changes: 7 additions & 0 deletions packages/abi/fragments.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,32 @@ export declare class ParamType {
readonly components: Array<ParamType>;
readonly arrayLength: number;
readonly arrayChildren: ParamType;
readonly _isParamType: boolean;
constructor(constructorGuard: any, params: any);
format(expanded?: boolean): string;
static from(value: string | JsonFragmentType | ParamType, allowIndexed?: boolean): ParamType;
static fromObject(value: JsonFragmentType | ParamType): ParamType;
static fromString(value: string, allowIndexed?: boolean): ParamType;
static isParamType(value: any): value is ParamType;
}
export declare abstract class Fragment {
readonly type: string;
readonly name: string;
readonly inputs: Array<ParamType>;
readonly _isFragment: boolean;
constructor(constructorGuard: any, params: any);
format(expanded?: boolean): string;
static from(value: Fragment | JsonFragment | string): Fragment;
static fromObject(value: Fragment | JsonFragment): Fragment;
static fromString(value: string): Fragment;
static isFragment(value: any): value is Fragment;
}
export declare class EventFragment extends Fragment {
readonly anonymous: boolean;
static from(value: EventFragment | JsonFragment | string): EventFragment;
static fromObject(value: JsonFragment | EventFragment): EventFragment;
static fromString(value: string): EventFragment;
static isEventFragment(value: any): value is EventFragment;
}
export declare class ConstructorFragment extends Fragment {
stateMutability: string;
Expand All @@ -53,11 +58,13 @@ export declare class ConstructorFragment extends Fragment {
static from(value: ConstructorFragment | JsonFragment | string): ConstructorFragment;
static fromObject(value: ConstructorFragment | JsonFragment): ConstructorFragment;
static fromString(value: string): ConstructorFragment;
static isConstructorFragment(value: any): value is ConstructorFragment;
}
export declare class FunctionFragment extends ConstructorFragment {
constant: boolean;
outputs?: Array<ParamType>;
static from(value: FunctionFragment | JsonFragment | string): FunctionFragment;
static fromObject(value: FunctionFragment | JsonFragment): FunctionFragment;
static fromString(value: string): FunctionFragment;
static isFunctionFragment(value: any): value is FunctionFragment;
}
32 changes: 27 additions & 5 deletions packages/abi/fragments.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ var ParamType = /** @class */ (function () {
baseType: ((this.components != null) ? "tuple" : this.type)
});
}
this._isParamType = true;
Object.freeze(this);
}
// Format the parameter fragment
// - non-expanded: "(uint256,address)"
Expand Down Expand Up @@ -254,7 +256,7 @@ var ParamType = /** @class */ (function () {
return ParamType.fromObject(value);
};
ParamType.fromObject = function (value) {
if (properties_1.isNamedInstance(ParamType, value)) {
if (ParamType.isParamType(value)) {
return value;
}
return new ParamType(_constructorGuard, {
Expand All @@ -275,6 +277,9 @@ var ParamType = /** @class */ (function () {
}
return ParamTypify(parseParamType(value, !!allowIndexed));
};
ParamType.isParamType = function (value) {
return !!(value != null && value._isParamType);
};
return ParamType;
}());
exports.ParamType = ParamType;
Expand All @@ -288,6 +293,8 @@ var Fragment = /** @class */ (function () {
throw new Error("use a static from method");
}
populate(this, params);
this._isFragment = true;
Object.freeze(this);
}
// @TOOD: move logic to sub-classes; make this abstract
Fragment.prototype.format = function (expanded) {
Expand Down Expand Up @@ -318,13 +325,16 @@ var Fragment = /** @class */ (function () {
return result.trim();
};
Fragment.from = function (value) {
if (Fragment.isFragment(value)) {
return value;
}
if (typeof (value) === "string") {
return Fragment.fromString(value);
}
return Fragment.fromObject(value);
};
Fragment.fromObject = function (value) {
if (properties_1.isNamedInstance(Fragment, value)) {
if (Fragment.isFragment(value)) {
return value;
}
if (value.type === "function") {
Expand Down Expand Up @@ -361,6 +371,9 @@ var Fragment = /** @class */ (function () {
}
throw new Error("unknown fragment");
};
Fragment.isFragment = function (value) {
return !!(value && value._isFragment);
};
return Fragment;
}());
exports.Fragment = Fragment;
Expand All @@ -376,7 +389,7 @@ var EventFragment = /** @class */ (function (_super) {
return EventFragment.fromObject(value);
};
EventFragment.fromObject = function (value) {
if (properties_1.isNamedInstance(EventFragment, value)) {
if (EventFragment.isEventFragment(value)) {
return value;
}
if (value.type !== "event") {
Expand Down Expand Up @@ -413,6 +426,9 @@ var EventFragment = /** @class */ (function (_super) {
type: "event"
});
};
EventFragment.isEventFragment = function (value) {
return (value && value._isFragment && value.type === "event");
};
return EventFragment;
}(Fragment));
exports.EventFragment = EventFragment;
Expand Down Expand Up @@ -474,7 +490,7 @@ var ConstructorFragment = /** @class */ (function (_super) {
return ConstructorFragment.fromObject(value);
};
ConstructorFragment.fromObject = function (value) {
if (properties_1.isNamedInstance(ConstructorFragment, value)) {
if (ConstructorFragment.isConstructorFragment(value)) {
return value;
}
if (value.type !== "constructor") {
Expand All @@ -501,6 +517,9 @@ var ConstructorFragment = /** @class */ (function (_super) {
parseModifiers(parens[3].trim(), params);
return ConstructorFragment.fromObject(params);
};
ConstructorFragment.isConstructorFragment = function (value) {
return (value && value._isFragment && value.type === "constructor");
};
return ConstructorFragment;
}(Fragment));
exports.ConstructorFragment = ConstructorFragment;
Expand All @@ -516,7 +535,7 @@ var FunctionFragment = /** @class */ (function (_super) {
return FunctionFragment.fromObject(value);
};
FunctionFragment.fromObject = function (value) {
if (properties_1.isNamedInstance(FunctionFragment, value)) {
if (FunctionFragment.isFunctionFragment(value)) {
return value;
}
if (value.type !== "function") {
Expand Down Expand Up @@ -563,6 +582,9 @@ var FunctionFragment = /** @class */ (function (_super) {
}
return FunctionFragment.fromObject(params);
};
FunctionFragment.isFunctionFragment = function (value) {
return (value && value._isFragment && value.type === "function");
};
return FunctionFragment;
}(ConstructorFragment));
exports.FunctionFragment = FunctionFragment;
Expand Down
3 changes: 3 additions & 0 deletions packages/abi/interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export declare class TransactionDescription extends Description {
}
export declare class Indexed extends Description {
readonly hash: string;
static isIndexed(value: any): value is Indexed;
}
export declare class Result {
[key: string]: any;
Expand All @@ -41,6 +42,7 @@ export declare class Interface {
};
readonly deploy: ConstructorFragment;
readonly _abiCoder: AbiCoder;
static _isInterface: boolean;
constructor(fragments: string | Array<Fragment | JsonFragment | string>);
static getAbiCoder(): AbiCoder;
static getAddress(address: string): string;
Expand All @@ -64,4 +66,5 @@ export declare class Interface {
topics: Array<string>;
data: string;
}): LogDescription;
static isInterface(value: any): value is Interface;
}
25 changes: 20 additions & 5 deletions packages/abi/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ var Indexed = /** @class */ (function (_super) {
function Indexed() {
return _super !== null && _super.apply(this, arguments) || this;
}
Indexed.isIndexed = function (value) {
return !!(value && value._isIndexed);
};
return Indexed;
}(properties_1.Description));
exports.Indexed = Indexed;
Expand All @@ -72,9 +75,6 @@ var Interface = /** @class */ (function () {
abi = fragments;
}
properties_1.defineReadOnly(this, "fragments", abi.map(function (fragment) {
if (properties_1.isNamedInstance(fragments_1.Fragment, fragment)) {
return fragment;
}
return fragments_1.Fragment.from(fragment);
}).filter(function (fragment) { return (fragment != null); }));
properties_1.defineReadOnly(this, "_abiCoder", _newTarget.getAbiCoder());
Expand Down Expand Up @@ -125,6 +125,7 @@ var Interface = /** @class */ (function () {
if (!this.deploy) {
properties_1.defineReadOnly(this, "deploy", fragments_1.ConstructorFragment.from({ type: "constructor" }));
}
properties_1.defineReadOnly(this, "_isInterface", true);
}
Interface.getAbiCoder = function () {
return abi_coder_1.defaultAbiCoder;
Expand Down Expand Up @@ -300,10 +301,10 @@ var Interface = /** @class */ (function () {
eventFragment.inputs.forEach(function (param, index) {
if (param.indexed) {
if (resultIndexed == null) {
result[index] = new Indexed({ hash: null });
result[index] = new Indexed({ _isIndexed: true, hash: null });
}
else if (dynamic[index]) {
result[index] = new Indexed({ hash: resultIndexed[indexedIndex++] });
result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });
}
else {
result[index] = resultIndexed[indexedIndex++];
Expand Down Expand Up @@ -344,6 +345,20 @@ var Interface = /** @class */ (function () {
values: this.decodeEventLog(fragment, log.data, log.topics)
});
};
/*
static from(value: Array<Fragment | string | JsonAbi> | string | Interface) {
if (Interface.isInterface(value)) {
return value;
}
if (typeof(value) === "string") {
return new Interface(JSON.parse(value));
}
return new Interface(value);
}
*/
Interface.isInterface = function (value) {
return !!(value && value._isInterface);
};
return Interface;
}());
exports.Interface = Interface;
Expand Down
4 changes: 2 additions & 2 deletions packages/abi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ethersproject/abi",
"version": "5.0.0-beta.131",
"version": "5.0.0-beta.132",
"description": "Error utility functions for ethers.",
"main": "index.js",
"scripts": {
Expand All @@ -26,5 +26,5 @@
"publishConfig": {
"access": "public"
},
"tarballHash": "0x01c9130b48add5e7f90719d23992716773073976b4f9c183858ecf3362ada3ec"
"tarballHash": "0x74367d2ba9f1a43ad8f0f5e0c5f815afd8d655ebae1ed710cd9e5d331557c78a"
}
2 changes: 1 addition & 1 deletion packages/abi/src.ts/_version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "5.0.0-beta.131";
export const version = "5.0.0-beta.132";
2 changes: 1 addition & 1 deletion packages/abstract-provider/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "5.0.0-beta.126";
export declare const version = "5.0.0-beta.127";
2 changes: 1 addition & 1 deletion packages/abstract-provider/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "5.0.0-beta.126";
exports.version = "5.0.0-beta.127";
9 changes: 7 additions & 2 deletions packages/abstract-provider/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { BigNumber, BigNumberish } from "@ethersproject/bignumber";
import { BytesLike } from "@ethersproject/bytes";
import { Network } from "@ethersproject/networks";
import { Description } from "@ethersproject/properties";
import { Transaction } from "@ethersproject/transactions";
import { OnceBlockable } from "@ethersproject/web";
export declare type TransactionRequest = {
Expand All @@ -14,6 +15,7 @@ export declare type TransactionRequest = {
chainId?: number | Promise<number>;
};
export interface TransactionResponse extends Transaction {
hash: string;
blockNumber?: number;
blockHash?: string;
timestamp?: number;
Expand Down Expand Up @@ -81,9 +83,10 @@ export interface Filter extends EventFilter {
export interface FilterByBlockHash extends EventFilter {
blockhash?: string;
}
export declare class ForkEvent {
export declare abstract class ForkEvent extends Description {
readonly expiry: number;
constructor(expiry?: number);
readonly _isForkEvent: boolean;
static isForkEvent(value: any): value is ForkEvent;
}
export declare class BlockForkEvent extends ForkEvent {
readonly blockhash: string;
Expand Down Expand Up @@ -128,6 +131,8 @@ export declare abstract class Provider implements OnceBlockable {
addListener(eventName: EventType, listener: Listener): Provider;
removeListener(eventName: EventType, listener: Listener): Provider;
abstract waitForTransaction(transactionHash: string, timeout?: number): Promise<TransactionReceipt>;
readonly _isProvider: boolean;
constructor();
static isProvider(value: any): value is Provider;
}
export {};
Loading

0 comments on commit 6c19025

Please sign in to comment.