merge development
This commit is contained in:
commit
de7470d936
@ -35,9 +35,7 @@
|
|||||||
"test": "wsrun test $PKG --fast-exit --serial --exclude-missing",
|
"test": "wsrun test $PKG --fast-exit --serial --exclude-missing",
|
||||||
"generate_doc": "node ./packages/monorepo-scripts/lib/doc_generate_and_upload.js",
|
"generate_doc": "node ./packages/monorepo-scripts/lib/doc_generate_and_upload.js",
|
||||||
"test:generate_docs:circleci": "for i in ${npm_package_config_packagesWithDocPages}; do yarn generate_doc --package $i --shouldUpload false --isStaging true || break -1; done;",
|
"test:generate_docs:circleci": "for i in ${npm_package_config_packagesWithDocPages}; do yarn generate_doc --package $i --shouldUpload false --isStaging true || break -1; done;",
|
||||||
"lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing",
|
"lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing"
|
||||||
"comment:postinstall": "HACK: For some reason `yarn` is not setting up symlink properly for types. We temporarily make it manually. Remove this ASAP!",
|
|
||||||
"postinstall": "shx cp -R node_modules/@0xproject/types packages/website/node_modules/@0xproject; shx cp -R node_modules/@0xproject/types packages/sra-report/node_modules/@0xproject; rimraf node_modules/@0xproject/types; shx ln -s ../../packages/types node_modules/@0xproject/types"
|
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic",
|
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic",
|
||||||
@ -55,8 +53,5 @@
|
|||||||
"source-map-support": "^0.5.6",
|
"source-map-support": "^0.5.6",
|
||||||
"typescript": "3.0.1",
|
"typescript": "3.0.1",
|
||||||
"wsrun": "^2.2.0"
|
"wsrun": "^2.2.0"
|
||||||
},
|
|
||||||
"resolutions": {
|
|
||||||
"ethers": "0xproject/ethers.js#eip-838-reasons"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.7",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.7 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.6 - _September 25, 2018_
|
## v1.0.6 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "0x.js",
|
"name": "0x.js",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -41,10 +41,10 @@
|
|||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/abi-gen": "^1.0.11",
|
"@0xproject/abi-gen": "^1.0.12",
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/migrations": "^1.0.12",
|
"@0xproject/migrations": "^1.0.13",
|
||||||
"@0xproject/monorepo-scripts": "^1.0.9",
|
"@0xproject/monorepo-scripts": "^1.0.10",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@types/lodash": "4.14.104",
|
"@types/lodash": "4.14.104",
|
||||||
"@types/mocha": "^2.2.42",
|
"@types/mocha": "^2.2.42",
|
||||||
@ -73,18 +73,18 @@
|
|||||||
"webpack": "^3.1.0"
|
"webpack": "^3.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/base-contract": "^2.0.5",
|
"@0xproject/base-contract": "^3.0.0",
|
||||||
"@0xproject/contract-wrappers": "^2.0.0",
|
"@0xproject/contract-wrappers": "^2.0.1",
|
||||||
"@0xproject/order-utils": "^1.0.5",
|
"@0xproject/order-utils": "^1.0.6",
|
||||||
"@0xproject/order-watcher": "^2.0.0",
|
"@0xproject/order-watcher": "^2.1.0",
|
||||||
"@0xproject/subproviders": "^2.0.5",
|
"@0xproject/subproviders": "^2.0.6",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
"web3-provider-engine": "14.0.6"
|
"web3-provider-engine": "14.0.6"
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.12",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.12 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.11 - _September 25, 2018_
|
## v1.0.11 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/abi-gen",
|
"name": "@0xproject/abi-gen",
|
||||||
"version": "1.0.11",
|
"version": "1.0.12",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -30,10 +30,10 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"chalk": "^2.3.0",
|
"chalk": "^2.3.0",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"glob": "^7.1.2",
|
"glob": "^7.1.2",
|
||||||
"handlebars": "^4.0.11",
|
"handlebars": "^4.0.11",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.12",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.12 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.11 - _September 25, 2018_
|
## v1.0.11 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/assert",
|
"name": "@0xproject/assert",
|
||||||
"version": "1.0.11",
|
"version": "1.0.12",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -44,9 +44,9 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/json-schemas": "^1.0.4",
|
"@0xproject/json-schemas": "^1.0.5",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
"valid-url": "^1.0.9"
|
"valid-url": "^1.0.9"
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.2",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.2 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.1 - _September 25, 2018_
|
## v1.0.1 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/asset-buyer",
|
"name": "@0xproject/asset-buyer",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -36,17 +36,17 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/connect": "^2.0.4",
|
"@0xproject/connect": "^3.0.0",
|
||||||
"@0xproject/contract-wrappers": "^2.0.0",
|
"@0xproject/contract-wrappers": "^2.0.1",
|
||||||
"@0xproject/json-schemas": "^1.0.4",
|
"@0xproject/json-schemas": "^1.0.5",
|
||||||
"@0xproject/order-utils": "^1.0.5",
|
"@0xproject/order-utils": "^1.0.6",
|
||||||
"@0xproject/subproviders": "^2.0.5",
|
"@0xproject/subproviders": "^2.0.6",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"lodash": "^4.17.10"
|
"lodash": "^4.17.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "3.0.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Change the way we detect BN to work with the newest ethers.js",
|
||||||
|
"pr": 1069
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "Add baseContract._throwIfRevertWithReasonCallResult",
|
||||||
|
"pr": 1069
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1538157789
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
|
@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v3.0.0 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Change the way we detect BN to work with the newest ethers.js (#1069)
|
||||||
|
* Add baseContract._throwIfRevertWithReasonCallResult (#1069)
|
||||||
|
|
||||||
## v2.0.5 - _September 25, 2018_
|
## v2.0.5 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/base-contract",
|
"name": "@0xproject/base-contract",
|
||||||
"version": "2.0.5",
|
"version": "3.0.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -40,11 +40,11 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@ -20,6 +20,11 @@ export interface EthersInterfaceByFunctionSignature {
|
|||||||
[key: string]: ethers.Interface;
|
[key: string]: ethers.Interface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const REVERT_ERROR_SELECTOR = '08c379a0';
|
||||||
|
const REVERT_ERROR_SELECTOR_OFFSET = 2;
|
||||||
|
const REVERT_ERROR_SELECTOR_BYTES_LENGTH = 4;
|
||||||
|
const REVERT_ERROR_SELECTOR_END = REVERT_ERROR_SELECTOR_OFFSET + REVERT_ERROR_SELECTOR_BYTES_LENGTH * 2;
|
||||||
|
|
||||||
export class BaseContract {
|
export class BaseContract {
|
||||||
protected _ethersInterfacesByFunctionSignature: EthersInterfaceByFunctionSignature;
|
protected _ethersInterfacesByFunctionSignature: EthersInterfaceByFunctionSignature;
|
||||||
protected _web3Wrapper: Web3Wrapper;
|
protected _web3Wrapper: Web3Wrapper;
|
||||||
@ -61,7 +66,7 @@ export class BaseContract {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected static _bnToBigNumber(_type: string, value: any): any {
|
protected static _bnToBigNumber(_type: string, value: any): any {
|
||||||
return _.isObject(value) && value._bn ? new BigNumber(value.toString()) : value;
|
return _.isObject(value) && value._hex ? new BigNumber(value.toString()) : value;
|
||||||
}
|
}
|
||||||
protected static async _applyDefaultsToTxDataAsync<T extends Partial<TxData | TxDataPayable>>(
|
protected static async _applyDefaultsToTxDataAsync<T extends Partial<TxData | TxDataPayable>>(
|
||||||
txData: T,
|
txData: T,
|
||||||
@ -82,15 +87,24 @@ export class BaseContract {
|
|||||||
}
|
}
|
||||||
return txDataWithDefaults;
|
return txDataWithDefaults;
|
||||||
}
|
}
|
||||||
|
protected static _throwIfRevertWithReasonCallResult(rawCallResult: string): void {
|
||||||
|
if (rawCallResult.slice(REVERT_ERROR_SELECTOR_OFFSET, REVERT_ERROR_SELECTOR_END) === REVERT_ERROR_SELECTOR) {
|
||||||
|
const revertReason = ethers.utils.defaultAbiCoder.decode(
|
||||||
|
['string'],
|
||||||
|
ethers.utils.hexDataSlice(rawCallResult, REVERT_ERROR_SELECTOR_BYTES_LENGTH),
|
||||||
|
);
|
||||||
|
throw new Error(revertReason);
|
||||||
|
}
|
||||||
|
}
|
||||||
// Throws if the given arguments cannot be safely/correctly encoded based on
|
// Throws if the given arguments cannot be safely/correctly encoded based on
|
||||||
// the given inputAbi. An argument may not be considered safely encodeable
|
// the given inputAbi. An argument may not be considered safely encodeable
|
||||||
// if it overflows the corresponding Solidity type, there is a bug in the
|
// if it overflows the corresponding Solidity type, there is a bug in the
|
||||||
// encoder, or the encoder performs unsafe type coercion.
|
// encoder, or the encoder performs unsafe type coercion.
|
||||||
public static strictArgumentEncodingCheck(inputAbi: DataItem[], args: any[]): void {
|
public static strictArgumentEncodingCheck(inputAbi: DataItem[], args: any[]): void {
|
||||||
const coder = ethers.utils.AbiCoder.defaultCoder;
|
const coder = new ethers.AbiCoder();
|
||||||
const params = abiUtils.parseEthersParams(inputAbi);
|
const params = abiUtils.parseEthersParams(inputAbi);
|
||||||
const rawEncoded = coder.encode(params.names, params.types, args);
|
const rawEncoded = coder.encode(inputAbi, args);
|
||||||
const rawDecoded = coder.decode(params.names, params.types, rawEncoded);
|
const rawDecoded = coder.decode(inputAbi, rawEncoded);
|
||||||
for (let i = 0; i < rawDecoded.length; i++) {
|
for (let i = 0; i < rawDecoded.length; i++) {
|
||||||
const original = args[i];
|
const original = args[i];
|
||||||
const decoded = rawDecoded[i];
|
const decoded = rawDecoded[i];
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
"note": "Change /order_config request to a POST instead of GET",
|
"note": "Change /order_config request to a POST instead of GET",
|
||||||
"pr": 1091
|
"pr": 1091
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"timestamp": 1538157789
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v3.0.0 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Change /order_config request to a POST instead of GET (#1091)
|
||||||
|
|
||||||
## v2.0.4 - _September 25, 2018_
|
## v2.0.4 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/connect",
|
"name": "@0xproject/connect",
|
||||||
"version": "2.0.4",
|
"version": "3.0.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -43,12 +43,12 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/json-schemas": "^1.0.4",
|
"@0xproject/json-schemas": "^1.0.5",
|
||||||
"@0xproject/order-utils": "^1.0.5",
|
"@0xproject/order-utils": "^1.0.6",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
"query-string": "^5.0.1",
|
"query-string": "^5.0.1",
|
||||||
"sinon": "^4.0.0",
|
"sinon": "^4.0.0",
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "2.0.1",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v2.0.1 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v2.0.0 - _September 25, 2018_
|
## v2.0.0 - _September 25, 2018_
|
||||||
|
|
||||||
* Fixes dropped events in subscriptions by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too. (#1080)
|
* Fixes dropped events in subscriptions by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too. (#1080)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/contract-wrappers",
|
"name": "@0xproject/contract-wrappers",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"description": "Smart TS wrappers for 0x smart contracts",
|
"description": "Smart TS wrappers for 0x smart contracts",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"0xproject",
|
"0xproject",
|
||||||
@ -41,10 +41,10 @@
|
|||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/abi-gen": "^1.0.11",
|
"@0xproject/abi-gen": "^1.0.12",
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/migrations": "^1.0.12",
|
"@0xproject/migrations": "^1.0.13",
|
||||||
"@0xproject/subproviders": "^2.0.5",
|
"@0xproject/subproviders": "^2.0.6",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@types/lodash": "4.14.104",
|
"@types/lodash": "4.14.104",
|
||||||
"@types/mocha": "^2.2.42",
|
"@types/mocha": "^2.2.42",
|
||||||
@ -72,19 +72,19 @@
|
|||||||
"web3-provider-engine": "14.0.6"
|
"web3-provider-engine": "14.0.6"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/base-contract": "^2.0.5",
|
"@0xproject/base-contract": "^3.0.0",
|
||||||
"@0xproject/fill-scenarios": "^1.0.5",
|
"@0xproject/fill-scenarios": "^1.0.6",
|
||||||
"@0xproject/json-schemas": "^1.0.4",
|
"@0xproject/json-schemas": "^1.0.5",
|
||||||
"@0xproject/order-utils": "^1.0.5",
|
"@0xproject/order-utils": "^1.0.6",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-blockstream": "6.0.0",
|
"ethereumjs-blockstream": "6.0.0",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"js-sha3": "^0.7.0",
|
"js-sha3": "^0.7.0",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
"uuid": "^3.1.0"
|
"uuid": "^3.1.0"
|
||||||
|
122
packages/contract-wrappers/test/revert_validation_test.ts
Normal file
122
packages/contract-wrappers/test/revert_validation_test.ts
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
|
||||||
|
import { FillScenarios } from '@0xproject/fill-scenarios';
|
||||||
|
import { runV2MigrationsAsync } from '@0xproject/migrations';
|
||||||
|
import { assetDataUtils } from '@0xproject/order-utils';
|
||||||
|
import { SignedOrder } from '@0xproject/types';
|
||||||
|
import { BigNumber } from '@0xproject/utils';
|
||||||
|
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||||
|
import * as chai from 'chai';
|
||||||
|
import 'mocha';
|
||||||
|
|
||||||
|
import { ContractWrappers } from '../src';
|
||||||
|
|
||||||
|
import { chaiSetup } from './utils/chai_setup';
|
||||||
|
import { constants } from './utils/constants';
|
||||||
|
import { tokenUtils } from './utils/token_utils';
|
||||||
|
|
||||||
|
chaiSetup.configure();
|
||||||
|
const expect = chai.expect;
|
||||||
|
|
||||||
|
describe('Revert Validation ExchangeWrapper', () => {
|
||||||
|
let contractWrappers: ContractWrappers;
|
||||||
|
let userAddresses: string[];
|
||||||
|
let zrxTokenAddress: string;
|
||||||
|
let fillScenarios: FillScenarios;
|
||||||
|
let exchangeContractAddress: string;
|
||||||
|
let makerTokenAddress: string;
|
||||||
|
let takerTokenAddress: string;
|
||||||
|
let coinbase: string;
|
||||||
|
let makerAddress: string;
|
||||||
|
let anotherMakerAddress: string;
|
||||||
|
let takerAddress: string;
|
||||||
|
let makerAssetData: string;
|
||||||
|
let takerAssetData: string;
|
||||||
|
let feeRecipient: string;
|
||||||
|
let txHash: string;
|
||||||
|
let blockchainLifecycle: BlockchainLifecycle;
|
||||||
|
let web3Wrapper: Web3Wrapper;
|
||||||
|
const fillableAmount = new BigNumber(5);
|
||||||
|
const takerTokenFillAmount = new BigNumber(5);
|
||||||
|
let signedOrder: SignedOrder;
|
||||||
|
const config = {
|
||||||
|
networkId: constants.TESTRPC_NETWORK_ID,
|
||||||
|
blockPollingIntervalMs: 0,
|
||||||
|
};
|
||||||
|
before(async () => {
|
||||||
|
// vmErrorsOnRPCResponse is useful for quick feedback and testing during development
|
||||||
|
// but is not the default behaviour in production. Here we ensure our failure cases
|
||||||
|
// are handled in an environment which behaves similar to production
|
||||||
|
const provider = web3Factory.getRpcProvider({
|
||||||
|
shouldUseInProcessGanache: true,
|
||||||
|
shouldThrowErrorsOnGanacheRPCResponse: false,
|
||||||
|
});
|
||||||
|
web3Wrapper = new Web3Wrapper(provider);
|
||||||
|
blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||||
|
const txDefaults = {
|
||||||
|
gas: devConstants.GAS_LIMIT,
|
||||||
|
from: devConstants.TESTRPC_FIRST_ADDRESS,
|
||||||
|
};
|
||||||
|
const artifactsDir = `src/artifacts`;
|
||||||
|
// Re-deploy the artifacts in this provider, rather than in the default provider exposed in
|
||||||
|
// the beforeAll hook. This is due to the fact that the default provider enabled vmErrorsOnRPCResponse
|
||||||
|
// and we are explicity testing with vmErrorsOnRPCResponse disabled.
|
||||||
|
await runV2MigrationsAsync(provider, artifactsDir, txDefaults);
|
||||||
|
await blockchainLifecycle.startAsync();
|
||||||
|
contractWrappers = new ContractWrappers(provider, config);
|
||||||
|
exchangeContractAddress = contractWrappers.exchange.getContractAddress();
|
||||||
|
userAddresses = await web3Wrapper.getAvailableAddressesAsync();
|
||||||
|
zrxTokenAddress = tokenUtils.getProtocolTokenAddress();
|
||||||
|
fillScenarios = new FillScenarios(
|
||||||
|
provider,
|
||||||
|
userAddresses,
|
||||||
|
zrxTokenAddress,
|
||||||
|
exchangeContractAddress,
|
||||||
|
contractWrappers.erc20Proxy.getContractAddress(),
|
||||||
|
contractWrappers.erc721Proxy.getContractAddress(),
|
||||||
|
);
|
||||||
|
[coinbase, makerAddress, takerAddress, feeRecipient, anotherMakerAddress] = userAddresses;
|
||||||
|
[makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses();
|
||||||
|
[makerAssetData, takerAssetData] = [
|
||||||
|
assetDataUtils.encodeERC20AssetData(makerTokenAddress),
|
||||||
|
assetDataUtils.encodeERC20AssetData(takerTokenAddress),
|
||||||
|
];
|
||||||
|
signedOrder = await fillScenarios.createFillableSignedOrderAsync(
|
||||||
|
makerAssetData,
|
||||||
|
takerAssetData,
|
||||||
|
makerAddress,
|
||||||
|
takerAddress,
|
||||||
|
fillableAmount,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
after(async () => {
|
||||||
|
await blockchainLifecycle.revertAsync();
|
||||||
|
});
|
||||||
|
beforeEach(async () => {
|
||||||
|
await blockchainLifecycle.startAsync();
|
||||||
|
});
|
||||||
|
afterEach(async () => {
|
||||||
|
await blockchainLifecycle.revertAsync();
|
||||||
|
});
|
||||||
|
describe('#fillOrderAsync', () => {
|
||||||
|
it('should throw the revert reason when shouldValidate is true and a fill would revert', async () => {
|
||||||
|
// Create a scenario where the fill will revert
|
||||||
|
const makerTokenBalance = await contractWrappers.erc20Token.getBalanceAsync(
|
||||||
|
makerTokenAddress,
|
||||||
|
makerAddress,
|
||||||
|
);
|
||||||
|
// Transfer all of the tokens from maker to create a failure scenario
|
||||||
|
txHash = await contractWrappers.erc20Token.transferAsync(
|
||||||
|
makerTokenAddress,
|
||||||
|
makerAddress,
|
||||||
|
takerAddress,
|
||||||
|
makerTokenBalance,
|
||||||
|
);
|
||||||
|
await web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
|
||||||
|
expect(
|
||||||
|
contractWrappers.exchange.fillOrderAsync(signedOrder, takerTokenFillAmount, takerAddress, {
|
||||||
|
shouldValidate: true,
|
||||||
|
}),
|
||||||
|
).to.be.rejectedWith('TRANSFER_FAILED');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@ -1,6 +1,6 @@
|
|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||||
import { FillScenarios } from '@0xproject/fill-scenarios';
|
import { FillScenarios } from '@0xproject/fill-scenarios';
|
||||||
import { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils';
|
import { assetDataUtils, generatePseudoRandomSalt, orderHashUtils, signatureUtils } from '@0xproject/order-utils';
|
||||||
import { SignedOrder, SignerType } from '@0xproject/types';
|
import { SignedOrder, SignerType } from '@0xproject/types';
|
||||||
import { BigNumber } from '@0xproject/utils';
|
import { BigNumber } from '@0xproject/utils';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
|
@ -65,10 +65,12 @@ export class {{contractName}}Contract extends BaseContract {
|
|||||||
[{{> params inputs=ctor.inputs}}],
|
[{{> params inputs=ctor.inputs}}],
|
||||||
BaseContract._bigNumberToString,
|
BaseContract._bigNumberToString,
|
||||||
);
|
);
|
||||||
const txData = ethers.Contract.getDeployTransaction(bytecode, abi, {{> params inputs=ctor.inputs}});
|
const iface = new ethers.Interface(abi);
|
||||||
|
const deployInfo = iface.deployFunction;
|
||||||
|
const txData = deployInfo.encode(bytecode, [{{> params inputs=ctor.inputs}}]);
|
||||||
const web3Wrapper = new Web3Wrapper(provider);
|
const web3Wrapper = new Web3Wrapper(provider);
|
||||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||||
txData,
|
{data: txData},
|
||||||
txDefaults,
|
txDefaults,
|
||||||
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
|
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
|
||||||
);
|
);
|
||||||
|
@ -8,10 +8,8 @@ async callAsync(
|
|||||||
const inputAbi = self._lookupAbi(functionSignature).inputs;
|
const inputAbi = self._lookupAbi(functionSignature).inputs;
|
||||||
[{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
|
[{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
|
||||||
BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]);
|
BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]);
|
||||||
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.{{this.name}}(
|
const ethersFunction = self._lookupEthersInterface(functionSignature).functions.{{this.name}};
|
||||||
{{> params inputs=inputs}}
|
const encodedData = ethersFunction.encode([{{> params inputs=inputs}}]);
|
||||||
) as ethers.CallDescription;
|
|
||||||
const encodedData = ethersFunction.data;
|
|
||||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||||
{
|
{
|
||||||
to: self.address,
|
to: self.address,
|
||||||
@ -21,7 +19,8 @@ async callAsync(
|
|||||||
self._web3Wrapper.getContractDefaults(),
|
self._web3Wrapper.getContractDefaults(),
|
||||||
);
|
);
|
||||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||||
let resultArray = ethersFunction.parse(rawCallResult);
|
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||||
|
let resultArray = ethersFunction.decode(rawCallResult);
|
||||||
const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs;
|
const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs;
|
||||||
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
|
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
|
||||||
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
|
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
|
||||||
|
@ -12,9 +12,7 @@ public {{this.tsName}} = {
|
|||||||
const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
|
const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
|
||||||
[{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
|
[{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self));
|
||||||
BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]);
|
BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]);
|
||||||
const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}(
|
const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]);
|
||||||
{{> params inputs=inputs}}
|
|
||||||
).data;
|
|
||||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||||
{
|
{
|
||||||
to: self.address,
|
to: self.address,
|
||||||
@ -37,9 +35,7 @@ public {{this.tsName}} = {
|
|||||||
const self = this as any as {{contractName}}Contract;
|
const self = this as any as {{contractName}}Contract;
|
||||||
const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
|
const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
|
||||||
[{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString);
|
[{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString);
|
||||||
const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}(
|
const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]);
|
||||||
{{> params inputs=inputs}}
|
|
||||||
).data;
|
|
||||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||||
{
|
{
|
||||||
to: self.address,
|
to: self.address,
|
||||||
@ -57,9 +53,7 @@ public {{this.tsName}} = {
|
|||||||
const self = this as any as {{contractName}}Contract;
|
const self = this as any as {{contractName}}Contract;
|
||||||
const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
|
const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs;
|
||||||
[{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString);
|
[{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString);
|
||||||
const abiEncodedTransactionData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}(
|
const abiEncodedTransactionData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]);
|
||||||
{{> params inputs=inputs}}
|
|
||||||
).data;
|
|
||||||
return abiEncodedTransactionData;
|
return abiEncodedTransactionData;
|
||||||
},
|
},
|
||||||
{{> callAsync}}
|
{{> callAsync}}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "contracts",
|
"name": "contracts",
|
||||||
"version": "2.1.47",
|
"version": "2.1.48",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -45,11 +45,11 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/abi-gen": "^1.0.11",
|
"@0xproject/abi-gen": "^1.0.12",
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/sol-compiler": "^1.1.5",
|
"@0xproject/sol-compiler": "^1.1.6",
|
||||||
"@0xproject/sol-cov": "^2.1.5",
|
"@0xproject/sol-cov": "^2.1.6",
|
||||||
"@0xproject/subproviders": "^2.0.5",
|
"@0xproject/subproviders": "^2.0.6",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@types/bn.js": "^4.11.0",
|
"@types/bn.js": "^4.11.0",
|
||||||
"@types/ethereumjs-abi": "^0.6.0",
|
"@types/ethereumjs-abi": "^0.6.0",
|
||||||
@ -72,18 +72,18 @@
|
|||||||
"yargs": "^10.0.3"
|
"yargs": "^10.0.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/base-contract": "^2.0.5",
|
"@0xproject/base-contract": "^3.0.0",
|
||||||
"@0xproject/order-utils": "^1.0.5",
|
"@0xproject/order-utils": "^1.0.6",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"@types/js-combinatorics": "^0.5.29",
|
"@types/js-combinatorics": "^0.5.29",
|
||||||
"bn.js": "^4.11.8",
|
"bn.js": "^4.11.8",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-abi": "0.6.5",
|
"ethereumjs-abi": "0.6.5",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"js-combinatorics": "^0.5.3",
|
"js-combinatorics": "^0.5.3",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.11",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.10",
|
"version": "1.0.10",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.11 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.10 - _September 25, 2018_
|
## v1.0.10 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/dev-utils",
|
"name": "@0xproject/dev-utils",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -42,12 +42,12 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/subproviders": "^2.0.5",
|
"@0xproject/subproviders": "^2.0.6",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@ -14,6 +14,7 @@ import { env, EnvVars } from './env';
|
|||||||
export interface Web3Config {
|
export interface Web3Config {
|
||||||
hasAddresses?: boolean; // default: true
|
hasAddresses?: boolean; // default: true
|
||||||
shouldUseInProcessGanache?: boolean; // default: false
|
shouldUseInProcessGanache?: boolean; // default: false
|
||||||
|
shouldThrowErrorsOnGanacheRPCResponse?: boolean; // default: true
|
||||||
rpcUrl?: string; // default: localhost:8545
|
rpcUrl?: string; // default: localhost:8545
|
||||||
shouldUseFakeGasEstimate?: boolean; // default: true
|
shouldUseFakeGasEstimate?: boolean; // default: true
|
||||||
}
|
}
|
||||||
@ -41,15 +42,19 @@ export const web3Factory = {
|
|||||||
if (!_.isUndefined(config.rpcUrl)) {
|
if (!_.isUndefined(config.rpcUrl)) {
|
||||||
throw new Error('Cannot use both GanacheSubrovider and RPCSubprovider');
|
throw new Error('Cannot use both GanacheSubrovider and RPCSubprovider');
|
||||||
}
|
}
|
||||||
|
const shouldThrowErrorsOnGanacheRPCResponse =
|
||||||
|
_.isUndefined(config.shouldThrowErrorsOnGanacheRPCResponse) ||
|
||||||
|
config.shouldThrowErrorsOnGanacheRPCResponse;
|
||||||
provider.addProvider(
|
provider.addProvider(
|
||||||
new GanacheSubprovider({
|
new GanacheSubprovider({
|
||||||
|
vmErrorsOnRPCResponse: shouldThrowErrorsOnGanacheRPCResponse,
|
||||||
gasLimit: constants.GAS_LIMIT,
|
gasLimit: constants.GAS_LIMIT,
|
||||||
logger,
|
logger,
|
||||||
verbose: env.parseBoolean(EnvVars.VerboseGanache),
|
verbose: env.parseBoolean(EnvVars.VerboseGanache),
|
||||||
port: 8545,
|
port: 8545,
|
||||||
network_id: 50,
|
network_id: 50,
|
||||||
mnemonic: 'concert load couple harbor equip island argue ramp clarify fence smart topic',
|
mnemonic: 'concert load couple harbor equip island argue ramp clarify fence smart topic',
|
||||||
}),
|
} as any), // TODO remove any once types are merged in DefinitelyTyped
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
provider.addProvider(new RPCSubprovider(config.rpcUrl || constants.RPC_URL));
|
provider.addProvider(new RPCSubprovider(config.rpcUrl || constants.RPC_URL));
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.9",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.8",
|
"version": "1.0.8",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.9 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.8 - _September 25, 2018_
|
## v1.0.8 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ethereum-types",
|
"name": "ethereum-types",
|
||||||
"version": "1.0.8",
|
"version": "1.0.9",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
|
@ -366,11 +366,7 @@ export type ErrorType =
|
|||||||
export type ErrorSeverity = 'error' | 'warning';
|
export type ErrorSeverity = 'error' | 'warning';
|
||||||
|
|
||||||
export interface SolcError {
|
export interface SolcError {
|
||||||
sourceLocation?: {
|
sourceLocation?: SourceLocation;
|
||||||
file: string;
|
|
||||||
start: number;
|
|
||||||
end: number;
|
|
||||||
};
|
|
||||||
type: ErrorType;
|
type: ErrorType;
|
||||||
component: 'general' | 'ewasm';
|
component: 'general' | 'ewasm';
|
||||||
severity: ErrorSeverity;
|
severity: ErrorSeverity;
|
||||||
@ -378,6 +374,12 @@ export interface SolcError {
|
|||||||
formattedMessage?: string;
|
formattedMessage?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SourceLocation {
|
||||||
|
file: string;
|
||||||
|
start: number;
|
||||||
|
end: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface EvmOutput {
|
export interface EvmOutput {
|
||||||
bytecode: EvmBytecodeOutput;
|
bytecode: EvmBytecodeOutput;
|
||||||
deployedBytecode: EvmBytecodeOutput;
|
deployedBytecode: EvmBytecodeOutput;
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.6",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.6 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.5 - _September 25, 2018_
|
## v1.0.5 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/fill-scenarios",
|
"name": "@0xproject/fill-scenarios",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"description": "0x order fill scenario generator",
|
"description": "0x order fill scenario generator",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/abi-gen": "^1.0.11",
|
"@0xproject/abi-gen": "^1.0.12",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@types/lodash": "4.14.104",
|
"@types/lodash": "4.14.104",
|
||||||
"copyfiles": "^2.0.0",
|
"copyfiles": "^2.0.0",
|
||||||
@ -37,14 +37,14 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/base-contract": "^2.0.5",
|
"@0xproject/base-contract": "^3.0.0",
|
||||||
"@0xproject/order-utils": "^1.0.5",
|
"@0xproject/order-utils": "^1.0.6",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.5",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.5 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.4 - _September 25, 2018_
|
## v1.0.4 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/json-schemas",
|
"name": "@0xproject/json-schemas",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -38,14 +38,14 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"jsonschema": "^1.2.0",
|
"jsonschema": "^1.2.0",
|
||||||
"lodash.values": "^4.3.0"
|
"lodash.values": "^4.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@types/lodash.foreach": "^4.5.3",
|
"@types/lodash.foreach": "^4.5.3",
|
||||||
"@types/lodash.values": "^4.3.3",
|
"@types/lodash.values": "^4.3.3",
|
||||||
"@types/mocha": "^2.2.42",
|
"@types/mocha": "^2.2.42",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/metacoin",
|
"name": "@0xproject/metacoin",
|
||||||
"version": "0.0.21",
|
"version": "0.0.22",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -28,25 +28,25 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/abi-gen": "^1.0.11",
|
"@0xproject/abi-gen": "^1.0.12",
|
||||||
"@0xproject/base-contract": "^2.0.5",
|
"@0xproject/base-contract": "^3.0.0",
|
||||||
"@0xproject/sol-cov": "^2.1.5",
|
"@0xproject/sol-cov": "^2.1.6",
|
||||||
"@0xproject/subproviders": "^2.0.5",
|
"@0xproject/subproviders": "^2.0.6",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"@types/mocha": "^5.2.2",
|
"@types/mocha": "^5.2.2",
|
||||||
"copyfiles": "^2.0.0",
|
"copyfiles": "^2.0.0",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
"run-s": "^0.0.0"
|
"run-s": "^0.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/sol-compiler": "^1.1.5",
|
"@0xproject/sol-compiler": "^1.1.6",
|
||||||
"chai": "^4.0.1",
|
"chai": "^4.0.1",
|
||||||
"chai-as-promised": "^7.1.0",
|
"chai-as-promised": "^7.1.0",
|
||||||
"chai-bignumber": "^2.0.1",
|
"chai-bignumber": "^2.0.1",
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.13",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.12",
|
"version": "1.0.12",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.13 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.12 - _September 25, 2018_
|
## v1.0.12 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/migrations",
|
"name": "@0xproject/migrations",
|
||||||
"version": "1.0.12",
|
"version": "1.0.13",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -30,10 +30,10 @@
|
|||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/abi-gen": "^1.0.11",
|
"@0xproject/abi-gen": "^1.0.12",
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@types/yargs": "^10.0.0",
|
"@types/yargs": "^10.0.0",
|
||||||
"copyfiles": "^2.0.0",
|
"copyfiles": "^2.0.0",
|
||||||
"make-promises-safe": "^1.1.0",
|
"make-promises-safe": "^1.1.0",
|
||||||
@ -44,16 +44,16 @@
|
|||||||
"yargs": "^10.0.3"
|
"yargs": "^10.0.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/base-contract": "^2.0.5",
|
"@0xproject/base-contract": "^3.0.0",
|
||||||
"@0xproject/order-utils": "^1.0.5",
|
"@0xproject/order-utils": "^1.0.6",
|
||||||
"@0xproject/sol-compiler": "^1.1.5",
|
"@0xproject/sol-compiler": "^1.1.6",
|
||||||
"@0xproject/subproviders": "^2.0.5",
|
"@0xproject/subproviders": "^2.0.6",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"@ledgerhq/hw-app-eth": "^4.3.0",
|
"@ledgerhq/hw-app-eth": "^4.3.0",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "@0xproject/monorepo-scripts",
|
"name": "@0xproject/monorepo-scripts",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,15 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "1.0.6",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note":
|
||||||
|
"Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address",
|
||||||
|
"pr": 1096
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1538157789
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.6 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address (#1096)
|
||||||
|
|
||||||
## v1.0.5 - _September 25, 2018_
|
## v1.0.5 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/order-utils",
|
"name": "@0xproject/order-utils",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -38,7 +38,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@types/bn.js": "^4.11.0",
|
"@types/bn.js": "^4.11.0",
|
||||||
"@types/lodash": "4.14.104",
|
"@types/lodash": "4.14.104",
|
||||||
@ -57,19 +57,19 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/base-contract": "^2.0.5",
|
"@0xproject/base-contract": "^3.0.0",
|
||||||
"@0xproject/json-schemas": "^1.0.4",
|
"@0xproject/json-schemas": "^1.0.5",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"bn.js": "^4.11.8",
|
"bn.js": "^4.11.8",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-abi": "0.6.5",
|
"ethereumjs-abi": "0.6.5",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@ -174,6 +174,7 @@ export const signatureUtils = {
|
|||||||
assert.isHexString('data', data);
|
assert.isHexString('data', data);
|
||||||
assert.doesConformToSchema('signature', signature, schemas.ecSignatureSchema);
|
assert.doesConformToSchema('signature', signature, schemas.ecSignatureSchema);
|
||||||
assert.isETHAddressHex('signerAddress', signerAddress);
|
assert.isETHAddressHex('signerAddress', signerAddress);
|
||||||
|
const normalizedSignerAddress = signerAddress.toLowerCase();
|
||||||
|
|
||||||
const msgHashBuff = ethUtil.toBuffer(data);
|
const msgHashBuff = ethUtil.toBuffer(data);
|
||||||
try {
|
try {
|
||||||
@ -184,7 +185,8 @@ export const signatureUtils = {
|
|||||||
ethUtil.toBuffer(signature.s),
|
ethUtil.toBuffer(signature.s),
|
||||||
);
|
);
|
||||||
const retrievedAddress = ethUtil.bufferToHex(ethUtil.pubToAddress(pubKey));
|
const retrievedAddress = ethUtil.bufferToHex(ethUtil.pubToAddress(pubKey));
|
||||||
return retrievedAddress === signerAddress;
|
const normalizedRetrievedAddress = retrievedAddress.toLowerCase();
|
||||||
|
return normalizedRetrievedAddress === normalizedSignerAddress;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "2.1.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Export ExpirationWatcher",
|
||||||
|
"pr": 1097
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1538157789
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v2.1.0 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Export ExpirationWatcher (#1097)
|
||||||
|
|
||||||
## v2.0.0 - _September 25, 2018_
|
## v2.0.0 - _September 25, 2018_
|
||||||
|
|
||||||
* Fixes dropped events issue by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too. (#1080)
|
* Fixes dropped events issue by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too. (#1080)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/order-watcher",
|
"name": "@0xproject/order-watcher",
|
||||||
"version": "2.0.0",
|
"version": "2.1.0",
|
||||||
"description": "An order watcher daemon that watches for order validity",
|
"description": "An order watcher daemon that watches for order validity",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"0x",
|
"0x",
|
||||||
@ -42,9 +42,9 @@
|
|||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/abi-gen": "^1.0.11",
|
"@0xproject/abi-gen": "^1.0.12",
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/migrations": "^1.0.12",
|
"@0xproject/migrations": "^1.0.13",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@types/bintrees": "^1.0.2",
|
"@types/bintrees": "^1.0.2",
|
||||||
"@types/lodash": "4.14.104",
|
"@types/lodash": "4.14.104",
|
||||||
@ -70,20 +70,20 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/base-contract": "^2.0.5",
|
"@0xproject/base-contract": "^3.0.0",
|
||||||
"@0xproject/contract-wrappers": "^2.0.0",
|
"@0xproject/contract-wrappers": "^2.0.1",
|
||||||
"@0xproject/fill-scenarios": "^1.0.5",
|
"@0xproject/fill-scenarios": "^1.0.6",
|
||||||
"@0xproject/json-schemas": "^1.0.4",
|
"@0xproject/json-schemas": "^1.0.5",
|
||||||
"@0xproject/order-utils": "^1.0.5",
|
"@0xproject/order-utils": "^1.0.6",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"bintrees": "^1.0.2",
|
"bintrees": "^1.0.2",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-blockstream": "6.0.0",
|
"ethereumjs-blockstream": "6.0.0",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
export { OrderWatcher } from './order_watcher/order_watcher';
|
export { OrderWatcher } from './order_watcher/order_watcher';
|
||||||
|
export { ExpirationWatcher } from './order_watcher/expiration_watcher';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
OrderStateValid,
|
OrderStateValid,
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.12",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.12 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.11 - _September 25, 2018_
|
## v1.0.11 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/react-docs",
|
"name": "@0xproject/react-docs",
|
||||||
"version": "1.0.11",
|
"version": "1.0.12",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -23,7 +23,7 @@
|
|||||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@types/compare-versions": "^3.0.0",
|
"@types/compare-versions": "^3.0.0",
|
||||||
"copyfiles": "^2.0.0",
|
"copyfiles": "^2.0.0",
|
||||||
@ -33,9 +33,9 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/react-shared": "^1.0.12",
|
"@0xproject/react-shared": "^1.0.13",
|
||||||
"@0xproject/types": "^1.1.0",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@types/lodash": "4.14.104",
|
"@types/lodash": "4.14.104",
|
||||||
"@types/material-ui": "^0.20.0",
|
"@types/material-ui": "^0.20.0",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.13",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.12",
|
"version": "1.0.12",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.13 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.12 - _September 25, 2018_
|
## v1.0.12 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/react-shared",
|
"name": "@0xproject/react-shared",
|
||||||
"version": "1.0.12",
|
"version": "1.0.13",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -24,7 +24,7 @@
|
|||||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"copyfiles": "^2.0.0",
|
"copyfiles": "^2.0.0",
|
||||||
"make-promises-safe": "^1.1.0",
|
"make-promises-safe": "^1.1.0",
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.1.6",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.1.5",
|
"version": "1.1.5",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.1.6 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.1.5 - _September 25, 2018_
|
## v1.1.5 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/sol-compiler",
|
"name": "@0xproject/sol-compiler",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -41,7 +41,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
"@types/mkdirp": "^0.5.2",
|
"@types/mkdirp": "^0.5.2",
|
||||||
"@types/require-from-string": "^1.2.0",
|
"@types/require-from-string": "^1.2.0",
|
||||||
@ -64,16 +64,16 @@
|
|||||||
"zeppelin-solidity": "1.8.0"
|
"zeppelin-solidity": "1.8.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/json-schemas": "^1.0.4",
|
"@0xproject/json-schemas": "^1.0.5",
|
||||||
"@0xproject/sol-resolver": "^1.0.11",
|
"@0xproject/sol-resolver": "^1.0.12",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"@types/yargs": "^11.0.0",
|
"@types/yargs": "^11.0.0",
|
||||||
"chalk": "^2.3.0",
|
"chalk": "^2.3.0",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
|
@ -25,4 +25,5 @@ export {
|
|||||||
StandardContractOutput,
|
StandardContractOutput,
|
||||||
StandardOutput,
|
StandardOutput,
|
||||||
StateMutability,
|
StateMutability,
|
||||||
|
SourceLocation,
|
||||||
} from 'ethereum-types';
|
} from 'ethereum-types';
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "2.1.6",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "2.1.5",
|
"version": "2.1.5",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v2.1.6 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v2.1.5 - _September 25, 2018_
|
## v2.1.5 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/sol-cov",
|
"name": "@0xproject/sol-cov",
|
||||||
"version": "2.1.5",
|
"version": "2.1.6",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -41,13 +41,13 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md",
|
"homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/dev-utils": "^1.0.10",
|
"@0xproject/dev-utils": "^1.0.11",
|
||||||
"@0xproject/sol-compiler": "^1.1.5",
|
"@0xproject/sol-compiler": "^1.1.6",
|
||||||
"@0xproject/subproviders": "^2.0.5",
|
"@0xproject/subproviders": "^2.0.6",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"glob": "^7.1.2",
|
"glob": "^7.1.2",
|
||||||
"istanbul": "^0.4.5",
|
"istanbul": "^0.4.5",
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.1",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
14
packages/sol-doc/CHANGELOG.md
Normal file
14
packages/sol-doc/CHANGELOG.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!--
|
||||||
|
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
|
||||||
|
Edit the package's CHANGELOG.json file only.
|
||||||
|
-->
|
||||||
|
|
||||||
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.1 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
|
## v1.0.0 - _Invalid date_
|
||||||
|
|
||||||
|
* Utility to generate documentation for Solidity smart contracts, outputting a format compliant with @0xproject/types.DocAgnosticFormat (#1004)
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/sol-doc",
|
"name": "@0xproject/sol-doc",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "Solidity documentation generator",
|
"description": "Solidity documentation generator",
|
||||||
"main": "lib/src/index.js",
|
"main": "lib/src/index.js",
|
||||||
"types": "lib/src/index.d.js",
|
"types": "lib/src/index.d.js",
|
||||||
@ -24,10 +24,10 @@
|
|||||||
"author": "F. Eugene Aumson",
|
"author": "F. Eugene Aumson",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/sol-compiler": "^1.1.5",
|
"@0xproject/sol-compiler": "^1.1.6",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"ethereum-types": "^1.0.4",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"lodash": "^4.17.10",
|
"lodash": "^4.17.10",
|
||||||
"yargs": "^12.0.2"
|
"yargs": "^12.0.2"
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.12",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.12 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.11 - _September 25, 2018_
|
## v1.0.11 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/sol-resolver",
|
"name": "@0xproject/sol-resolver",
|
||||||
"version": "1.0.11",
|
"version": "1.0.12",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -30,8 +30,8 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.12",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.12 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.11 - _September 25, 2018_
|
## v1.0.11 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/sra-report",
|
"name": "@0xproject/sra-report",
|
||||||
"version": "1.0.11",
|
"version": "1.0.12",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -33,13 +33,13 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-report/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-report/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/connect": "1.0.4",
|
"@0xproject/connect": "1.0.4",
|
||||||
"@0xproject/json-schemas": "^0.8.3",
|
"@0xproject/json-schemas": "^0.8.3",
|
||||||
"@0xproject/order-utils": "^0.0.9",
|
"@0xproject/order-utils": "^0.0.9",
|
||||||
"@0xproject/types": "^0.8.2",
|
"@0xproject/types": "^0.8.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"chalk": "^2.3.0",
|
"chalk": "^2.3.0",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
"newman": "^3.9.3",
|
"newman": "^3.9.3",
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.0.5",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.0.5 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.0.4 - _September 25, 2018_
|
## v1.0.4 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/sra-spec",
|
"name": "@0xproject/sra-spec",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -34,7 +34,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/json-schemas": "^1.0.4"
|
"@0xproject/json-schemas": "^1.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/tslint-config": "^1.0.7",
|
"@0xproject/tslint-config": "^1.0.7",
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "2.0.6",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v2.0.6 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v2.0.5 - _September 25, 2018_
|
## v2.0.5 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/subproviders",
|
"name": "@0xproject/subproviders",
|
||||||
"version": "2.0.5",
|
"version": "2.0.6",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -28,11 +28,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"@ledgerhq/hw-app-eth": "^4.3.0",
|
"@ledgerhq/hw-app-eth": "^4.3.0",
|
||||||
"@ledgerhq/hw-transport-u2f": "^4.3.0",
|
"@ledgerhq/hw-transport-u2f": "^4.3.0",
|
||||||
"@types/eth-lightwallet": "^3.0.0",
|
"@types/eth-lightwallet": "^3.0.0",
|
||||||
@ -41,7 +41,7 @@
|
|||||||
"bip39": "^2.5.0",
|
"bip39": "^2.5.0",
|
||||||
"bn.js": "^4.11.8",
|
"bn.js": "^4.11.8",
|
||||||
"eth-lightwallet": "^3.0.1",
|
"eth-lightwallet": "^3.0.1",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-tx": "^1.3.5",
|
"ethereumjs-tx": "^1.3.5",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"ganache-core": "0xProject/ganache-core#monorepo-dep",
|
"ganache-core": "0xProject/ganache-core#monorepo-dep",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "@0xproject/testnet-faucets",
|
"name": "@0xproject/testnet-faucets",
|
||||||
"version": "1.0.49",
|
"version": "1.0.50",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -17,13 +17,13 @@
|
|||||||
"author": "Fabio Berger",
|
"author": "Fabio Berger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"0x.js": "^1.0.6",
|
"0x.js": "^1.0.7",
|
||||||
"@0xproject/subproviders": "^2.0.5",
|
"@0xproject/subproviders": "^2.0.6",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"@0xproject/web3-wrapper": "^3.0.1",
|
"@0xproject/web3-wrapper": "^3.0.2",
|
||||||
"body-parser": "^1.17.1",
|
"body-parser": "^1.17.1",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-tx": "^1.3.5",
|
"ethereumjs-tx": "^1.3.5",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"express": "^4.15.2",
|
"express": "^4.15.2",
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "1.1.2",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.1.2 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.1.1 - _September 25, 2018_
|
## v1.1.1 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/types",
|
"name": "@0xproject/types",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -32,7 +32,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"bignumber.js": "~4.1.0",
|
"bignumber.js": "~4.1.0",
|
||||||
"ethereum-types": "^1.0.8"
|
"ethereum-types": "^1.0.9"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "3.0.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Remove types for ethers.js",
|
||||||
|
"pr": "1069"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1538157789
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v3.0.0 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Remove types for ethers.js (#1069)
|
||||||
|
|
||||||
## v2.0.2 - _September 25, 2018_
|
## v2.0.2 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/typescript-typings",
|
"name": "@0xproject/typescript-typings",
|
||||||
"version": "2.0.2",
|
"version": "3.0.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -26,7 +26,7 @@
|
|||||||
"@types/bn.js": "^4.11.0",
|
"@types/bn.js": "^4.11.0",
|
||||||
"@types/react": "*",
|
"@types/react": "*",
|
||||||
"bignumber.js": "~4.1.0",
|
"bignumber.js": "~4.1.0",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"popper.js": "1.14.3"
|
"popper.js": "1.14.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
declare module 'ethers' {
|
|
||||||
import { TxData } from 'ethereum-types';
|
|
||||||
|
|
||||||
export interface TransactionDescription {
|
|
||||||
name: string;
|
|
||||||
signature: string;
|
|
||||||
sighash: string;
|
|
||||||
data: string;
|
|
||||||
}
|
|
||||||
export interface CallDescription extends TransactionDescription {
|
|
||||||
parse: (...args: any[]) => any;
|
|
||||||
}
|
|
||||||
export interface FunctionDescription {
|
|
||||||
(...params: any[]): TransactionDescription | CallDescription;
|
|
||||||
inputs: { names: string[]; types: string[] };
|
|
||||||
outputs: { names: string[]; types: string[] };
|
|
||||||
type: string;
|
|
||||||
}
|
|
||||||
export interface EventDescription {
|
|
||||||
parse: (...args: any[]) => any;
|
|
||||||
inputs: { names: string[]; types: string[] };
|
|
||||||
signature: string;
|
|
||||||
topics: string[];
|
|
||||||
}
|
|
||||||
export class Interface {
|
|
||||||
public functions: { [functionName: string]: FunctionDescription };
|
|
||||||
public events: { [eventName: string]: EventDescription };
|
|
||||||
constructor(abi: any);
|
|
||||||
}
|
|
||||||
export class Contract {
|
|
||||||
public static getDeployTransaction(bytecode: string, abi: any, ...args: any[]): Partial<TxData>;
|
|
||||||
constructor(address: string, abi: any, provider: any);
|
|
||||||
}
|
|
||||||
const enum errors {
|
|
||||||
INVALID_ARGUMENT = 'INVALID_ARGUMENT',
|
|
||||||
}
|
|
||||||
|
|
||||||
export type ParamName = null | string | NestedParamName;
|
|
||||||
|
|
||||||
export interface NestedParamName {
|
|
||||||
name: string | null;
|
|
||||||
names: ParamName[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export const utils: {
|
|
||||||
AbiCoder: {
|
|
||||||
defaultCoder: AbiCoder;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface AbiCoder {
|
|
||||||
encode: (names: ParamName[] | string[], types: string[] | any[], args: any[] | undefined) => string;
|
|
||||||
decode: (names: ParamName[] | string[], types: string[] | string, data: string | undefined) => any;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +1,14 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Make abi_decoder compatible with ethers ^4.0.0",
|
||||||
|
"pr": 1069
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1538157789
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v2.0.0 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Make abi_decoder compatible with ethers ^4.0.0 (#1069)
|
||||||
|
|
||||||
## v1.0.11 - _September 25, 2018_
|
## v1.0.11 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/utils",
|
"name": "@0xproject/utils",
|
||||||
"version": "1.0.11",
|
"version": "2.0.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -41,15 +41,15 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/types": "^1.1.1",
|
"@0xproject/types": "^1.1.2",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"abortcontroller-polyfill": "^1.1.9",
|
"abortcontroller-polyfill": "^1.1.9",
|
||||||
"bignumber.js": "~4.1.0",
|
"bignumber.js": "~4.1.0",
|
||||||
"detect-node": "2.0.3",
|
"detect-node": "2.0.3",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"isomorphic-fetch": "^2.2.1",
|
"isomorphic-fetch": "^2.2.1",
|
||||||
"js-sha3": "^0.7.0",
|
"js-sha3": "^0.7.0",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
|
@ -47,7 +47,7 @@ export class AbiDecoder {
|
|||||||
|
|
||||||
let decodedData: any[];
|
let decodedData: any[];
|
||||||
try {
|
try {
|
||||||
decodedData = ethersInterface.events[event.name].parse(log.data);
|
decodedData = ethersInterface.events[event.name].decode(log.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code === ethers.errors.INVALID_ARGUMENT) {
|
if (error.code === ethers.errors.INVALID_ARGUMENT) {
|
||||||
// Because we index events by Method ID, and Method IDs are derived from the method
|
// Because we index events by Method ID, and Method IDs are derived from the method
|
||||||
@ -99,7 +99,7 @@ export class AbiDecoder {
|
|||||||
const ethersInterface = new ethers.Interface(abiArray);
|
const ethersInterface = new ethers.Interface(abiArray);
|
||||||
_.map(abiArray, (abi: AbiDefinition) => {
|
_.map(abiArray, (abi: AbiDefinition) => {
|
||||||
if (abi.type === AbiType.Event) {
|
if (abi.type === AbiType.Event) {
|
||||||
const topic = ethersInterface.events[abi.name].topics[0];
|
const topic = ethersInterface.events[abi.name].topic;
|
||||||
const numIndexedArgs = _.reduce(abi.inputs, (sum, input) => (input.indexed ? sum + 1 : sum), 0);
|
const numIndexedArgs = _.reduce(abi.inputs, (sum, input) => (input.indexed ? sum + 1 : sum), 0);
|
||||||
this._methodIds[topic] = {
|
this._methodIds[topic] = {
|
||||||
...this._methodIds[topic],
|
...this._methodIds[topic],
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
import { AbiDefinition, AbiType, ContractAbi, DataItem, MethodAbi } from 'ethereum-types';
|
import { AbiDefinition, AbiType, ContractAbi, DataItem, MethodAbi } from 'ethereum-types';
|
||||||
import * as ethers from 'ethers';
|
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
|
|
||||||
import { BigNumber } from './configured_bignumber';
|
import { BigNumber } from './configured_bignumber';
|
||||||
|
|
||||||
|
type ParamName = null | string | NestedParamName;
|
||||||
|
interface NestedParamName {
|
||||||
|
name: string | null;
|
||||||
|
names: ParamName[];
|
||||||
|
}
|
||||||
|
|
||||||
// Note(albrow): This function is unexported in ethers.js. Copying it here for
|
// Note(albrow): This function is unexported in ethers.js. Copying it here for
|
||||||
// now.
|
// now.
|
||||||
// Source: https://github.com/ethers-io/ethers.js/blob/884593ab76004a808bf8097e9753fb5f8dcc3067/contracts/interface.js#L30
|
// Source: https://github.com/ethers-io/ethers.js/blob/884593ab76004a808bf8097e9753fb5f8dcc3067/contracts/interface.js#L30
|
||||||
function parseEthersParams(params: DataItem[]): { names: ethers.ParamName[]; types: string[] } {
|
function parseEthersParams(params: DataItem[]): { names: ParamName[]; types: string[] } {
|
||||||
const names: ethers.ParamName[] = [];
|
const names: ParamName[] = [];
|
||||||
const types: string[] = [];
|
const types: string[] = [];
|
||||||
|
|
||||||
params.forEach((param: DataItem) => {
|
params.forEach((param: DataItem) => {
|
||||||
@ -37,7 +42,7 @@ function parseEthersParams(params: DataItem[]): { names: ethers.ParamName[]; typ
|
|||||||
// returns true if x is equal to y and false otherwise. Performs some minimal
|
// returns true if x is equal to y and false otherwise. Performs some minimal
|
||||||
// type conversion and data massaging for x and y, depending on type. name and
|
// type conversion and data massaging for x and y, depending on type. name and
|
||||||
// type should typically be derived from parseEthersParams.
|
// type should typically be derived from parseEthersParams.
|
||||||
function isAbiDataEqual(name: ethers.ParamName, type: string, x: any, y: any): boolean {
|
function isAbiDataEqual(name: ParamName, type: string, x: any, y: any): boolean {
|
||||||
if (_.isUndefined(x) && _.isUndefined(y)) {
|
if (_.isUndefined(x) && _.isUndefined(y)) {
|
||||||
return true;
|
return true;
|
||||||
} else if (_.isUndefined(x) && !_.isUndefined(y)) {
|
} else if (_.isUndefined(x) && !_.isUndefined(y)) {
|
||||||
@ -89,7 +94,7 @@ function isAbiDataEqual(name: ethers.ParamName, type: string, x: any, y: any): b
|
|||||||
//
|
//
|
||||||
const nestedName = _.isString(name.names[i])
|
const nestedName = _.isString(name.names[i])
|
||||||
? (name.names[i] as string)
|
? (name.names[i] as string)
|
||||||
: ((name.names[i] as ethers.NestedParamName).name as string);
|
: ((name.names[i] as NestedParamName).name as string);
|
||||||
if (!isAbiDataEqual(name.names[i], types[i], x[nestedName], y[nestedName])) {
|
if (!isAbiDataEqual(name.names[i], types[i], x[nestedName], y[nestedName])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1538157789,
|
||||||
|
"version": "3.0.2",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1537907159,
|
"timestamp": 1537907159,
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v3.0.2 - _September 28, 2018_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v3.0.1 - _September 25, 2018_
|
## v3.0.1 - _September 25, 2018_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/web3-wrapper",
|
"name": "@0xproject/web3-wrapper",
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@ -53,13 +53,13 @@
|
|||||||
"typescript": "3.0.1"
|
"typescript": "3.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/assert": "^1.0.11",
|
"@0xproject/assert": "^1.0.12",
|
||||||
"@0xproject/json-schemas": "^1.0.4",
|
"@0xproject/json-schemas": "^1.0.5",
|
||||||
"@0xproject/typescript-typings": "^2.0.2",
|
"@0xproject/typescript-typings": "^3.0.0",
|
||||||
"@0xproject/utils": "^1.0.11",
|
"@0xproject/utils": "^2.0.0",
|
||||||
"ethereum-types": "^1.0.8",
|
"ethereum-types": "^1.0.9",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"ethers": "3.0.22",
|
"ethers": "4.0.0-beta.14",
|
||||||
"lodash": "^4.17.5"
|
"lodash": "^4.17.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user