Merged latest development to branch
This commit is contained in:
		@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "1.0.5",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "1.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v1.0.5 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v1.0.4 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-asset-proxy",
 | 
			
		||||
    "version": "1.0.4",
 | 
			
		||||
    "version": "1.0.5",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,10 +46,10 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.1",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.2",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/node": "*",
 | 
			
		||||
@@ -66,16 +66,16 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contracts-erc20": "1.0.2",
 | 
			
		||||
        "@0x/contracts-erc721": "1.0.2",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/contracts-utils": "2.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "1.0.5",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "1.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v1.0.5 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v1.0.4 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-erc20",
 | 
			
		||||
    "version": "1.0.4",
 | 
			
		||||
    "version": "1.0.5",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,11 +46,11 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.1",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.2",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/node": "*",
 | 
			
		||||
@@ -67,13 +67,13 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contracts-exchange-libs": "1.0.2",
 | 
			
		||||
        "@0x/contracts-utils": "2.0.1",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "1.0.5",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "1.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v1.0.5 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v1.0.4 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-erc721",
 | 
			
		||||
    "version": "1.0.4",
 | 
			
		||||
    "version": "1.0.5",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,11 +46,11 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.1",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.2",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/node": "*",
 | 
			
		||||
@@ -67,12 +67,12 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contracts-utils": "2.0.1",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "1.0.5",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "1.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v1.0.5 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v1.0.4 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-exchange-forwarder",
 | 
			
		||||
    "version": "1.0.4",
 | 
			
		||||
    "version": "1.0.5",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,12 +46,12 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.0.2",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.1",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.1.0",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.2",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/node": "*",
 | 
			
		||||
@@ -68,18 +68,18 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contracts-asset-proxy": "1.0.2",
 | 
			
		||||
        "@0x/contracts-erc20": "1.0.2",
 | 
			
		||||
        "@0x/contracts-erc721": "1.0.2",
 | 
			
		||||
        "@0x/contracts-exchange": "1.0.2",
 | 
			
		||||
        "@0x/contracts-exchange-libs": "1.0.2",
 | 
			
		||||
        "@0x/contracts-utils": "2.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "1.0.5",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "1.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v1.0.5 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v1.0.4 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-exchange-libs",
 | 
			
		||||
    "version": "1.0.4",
 | 
			
		||||
    "version": "1.0.5",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,11 +46,11 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/contracts/libs/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.1",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.2",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/node": "*",
 | 
			
		||||
@@ -67,13 +67,13 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contracts-utils": "2.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "1.0.5",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "1.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v1.0.5 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v1.0.4 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-exchange",
 | 
			
		||||
    "version": "1.0.4",
 | 
			
		||||
    "version": "1.0.5",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,11 +46,11 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.1",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.2",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/node": "*",
 | 
			
		||||
@@ -67,17 +67,17 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contracts-asset-proxy": "1.0.2",
 | 
			
		||||
        "@0x/contracts-erc20": "1.0.2",
 | 
			
		||||
        "@0x/contracts-erc721": "1.0.2",
 | 
			
		||||
        "@0x/contracts-exchange-libs": "1.0.2",
 | 
			
		||||
        "@0x/contracts-utils": "2.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "ethereumjs-util": "^5.1.1",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "2.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v2.0.4 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v2.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-extensions",
 | 
			
		||||
    "version": "2.0.3",
 | 
			
		||||
    "version": "2.0.4",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,12 +46,12 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.0.2",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.1",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.1.0",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.2",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/node": "*",
 | 
			
		||||
@@ -68,18 +68,18 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contracts-asset-proxy": "1.0.2",
 | 
			
		||||
        "@0x/contracts-erc20": "1.0.2",
 | 
			
		||||
        "@0x/contracts-erc721": "1.0.2",
 | 
			
		||||
        "@0x/contracts-exchange": "1.0.2",
 | 
			
		||||
        "@0x/contracts-exchange-libs": "1.0.2",
 | 
			
		||||
        "@0x/contracts-utils": "2.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "2.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v2.0.4 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v2.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-multisig",
 | 
			
		||||
    "version": "2.0.3",
 | 
			
		||||
    "version": "2.0.4",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,11 +46,11 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/contracts/multisig/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.1",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.2",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/node": "*",
 | 
			
		||||
@@ -67,13 +67,13 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contracts-asset-proxy": "1.0.2",
 | 
			
		||||
        "@0x/contracts-erc20": "1.0.2",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "3.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "3.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v3.0.4 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v3.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-test-utils",
 | 
			
		||||
    "version": "3.0.3",
 | 
			
		||||
    "version": "3.0.4",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -40,19 +40,19 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/sol-coverage": "^2.0.2",
 | 
			
		||||
        "@0x/sol-profiler": "^2.0.3",
 | 
			
		||||
        "@0x/sol-trace": "^2.0.3",
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/sol-coverage": "^2.0.3",
 | 
			
		||||
        "@0x/sol-profiler": "^2.0.4",
 | 
			
		||||
        "@0x/sol-trace": "^2.0.4",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "@types/bn.js": "^4.11.0",
 | 
			
		||||
        "@types/js-combinatorics": "^0.5.29",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "2.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v2.0.4 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v2.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-utils",
 | 
			
		||||
    "version": "2.0.3",
 | 
			
		||||
    "version": "2.0.4",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,11 +46,11 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/contracts/utils/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.1",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/contracts-gen": "^1.0.2",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/bn.js": "^4.11.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
@@ -68,12 +68,12 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "bn.js": "^4.11.8",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "ethereumjs-util": "^5.1.1",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,14 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "version": "5.0.0",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Export `transactionHashUtils`, `DecodedCalldata`, `ZeroExTransaction`, and `SignedZeroExTransaction`",
 | 
			
		||||
                "pr": 1569
 | 
			
		||||
            }
 | 
			
		||||
        ],
 | 
			
		||||
        "timestamp": 1549733923
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "4.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v5.0.0 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Export `transactionHashUtils`, `DecodedCalldata`, `ZeroExTransaction`, and `SignedZeroExTransaction` (#1569)
 | 
			
		||||
 | 
			
		||||
## v4.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "0x.js",
 | 
			
		||||
    "version": "4.0.3",
 | 
			
		||||
    "version": "5.0.0",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -42,10 +42,10 @@
 | 
			
		||||
    },
 | 
			
		||||
    "license": "Apache-2.0",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.2",
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.3",
 | 
			
		||||
        "@0x/contract-addresses": "^2.2.1",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/migrations": "^3.0.3",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/migrations": "^3.0.4",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/mocha": "^2.2.42",
 | 
			
		||||
@@ -72,16 +72,16 @@
 | 
			
		||||
        "webpack": "^4.20.2"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/assert": "^2.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/order-watcher": "^3.0.3",
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/assert": "^2.0.3",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.1.0",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/order-watcher": "^3.0.4",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "@types/web3-provider-engine": "^14.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "ethers": "~4.0.4",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,12 @@
 | 
			
		||||
export { ContractAddresses } from '@0x/contract-addresses';
 | 
			
		||||
 | 
			
		||||
export { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0x/order-utils';
 | 
			
		||||
export {
 | 
			
		||||
    assetDataUtils,
 | 
			
		||||
    signatureUtils,
 | 
			
		||||
    generatePseudoRandomSalt,
 | 
			
		||||
    orderHashUtils,
 | 
			
		||||
    transactionHashUtils,
 | 
			
		||||
} from '@0x/order-utils';
 | 
			
		||||
 | 
			
		||||
export {
 | 
			
		||||
    ContractWrappers,
 | 
			
		||||
@@ -68,7 +74,7 @@ export {
 | 
			
		||||
    MetamaskSubprovider,
 | 
			
		||||
} from '@0x/subproviders';
 | 
			
		||||
 | 
			
		||||
export { AbiDecoder } from '@0x/utils';
 | 
			
		||||
export { AbiDecoder, DecodedCalldata } from '@0x/utils';
 | 
			
		||||
 | 
			
		||||
export { BigNumber } from '@0x/utils';
 | 
			
		||||
 | 
			
		||||
@@ -92,6 +98,8 @@ export {
 | 
			
		||||
    OrderRelevantState,
 | 
			
		||||
    Stats,
 | 
			
		||||
    DutchAuctionDetails,
 | 
			
		||||
    ZeroExTransaction,
 | 
			
		||||
    SignedZeroExTransaction,
 | 
			
		||||
} from '@0x/types';
 | 
			
		||||
 | 
			
		||||
export {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "3.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "3.0.2",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v3.0.3 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v3.0.2 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/abi-gen-wrappers",
 | 
			
		||||
    "version": "3.0.2",
 | 
			
		||||
    "version": "3.0.3",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -30,19 +30,19 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/abi-gen-templates": "^2.0.0",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "ethers": "~4.0.4",
 | 
			
		||||
        "lodash": "^4.17.11",
 | 
			
		||||
        "shx": "^0.2.2"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/base-contract": "^4.0.2"
 | 
			
		||||
        "@0x/base-contract": "^4.0.3"
 | 
			
		||||
    },
 | 
			
		||||
    "publishConfig": {
 | 
			
		||||
        "access": "public"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "2.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.0.2",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v2.0.3 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v2.0.2 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/abi-gen",
 | 
			
		||||
    "version": "2.0.2",
 | 
			
		||||
    "version": "2.0.3",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -32,7 +32,7 @@
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "chalk": "^2.3.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "glob": "^7.1.2",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "2.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.0.2",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v2.0.3 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v2.0.2 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/assert",
 | 
			
		||||
    "version": "2.0.2",
 | 
			
		||||
    "version": "2.0.3",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -44,9 +44,9 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/json-schemas": "^3.0.2",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.3",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "lodash": "^4.17.11",
 | 
			
		||||
        "valid-url": "^1.0.9"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "5.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "5.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v5.0.4 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v5.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/asset-buyer",
 | 
			
		||||
    "version": "5.0.3",
 | 
			
		||||
    "version": "5.0.4",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -36,16 +36,16 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md",
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/assert": "^2.0.2",
 | 
			
		||||
        "@0x/connect": "^4.0.3",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.0.2",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/assert": "^2.0.3",
 | 
			
		||||
        "@0x/connect": "^4.0.4",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.1.0",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.3",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "4.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "4.0.2",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v4.0.3 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v4.0.2 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/base-contract",
 | 
			
		||||
    "version": "4.0.2",
 | 
			
		||||
    "version": "4.0.3",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -41,8 +41,8 @@
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "ethers": "~4.0.4",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "4.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "4.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v4.0.4 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v4.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/connect",
 | 
			
		||||
    "version": "4.0.3",
 | 
			
		||||
    "version": "4.0.4",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -44,12 +44,12 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/assert": "^2.0.2",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/assert": "^2.0.3",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.3",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "lodash": "^4.17.11",
 | 
			
		||||
        "query-string": "^6.0.0",
 | 
			
		||||
        "sinon": "^4.0.0",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,14 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "version": "7.1.0",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Added calldata decoding to ContractWrappers",
 | 
			
		||||
                "pr": 1569
 | 
			
		||||
            }
 | 
			
		||||
        ],
 | 
			
		||||
        "timestamp": 1549733923
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "7.0.2",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v7.1.0 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Added calldata decoding to ContractWrappers (#1569)
 | 
			
		||||
 | 
			
		||||
## v7.0.2 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contract-wrappers",
 | 
			
		||||
    "version": "7.0.2",
 | 
			
		||||
    "version": "7.1.0",
 | 
			
		||||
    "description": "Smart TS wrappers for 0x smart contracts",
 | 
			
		||||
    "keywords": [
 | 
			
		||||
        "0xproject",
 | 
			
		||||
@@ -37,9 +37,9 @@
 | 
			
		||||
        "node": ">=6.0.0"
 | 
			
		||||
    },
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/migrations": "^3.0.3",
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/migrations": "^3.0.4",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
        "@types/mocha": "^2.2.42",
 | 
			
		||||
@@ -65,18 +65,18 @@
 | 
			
		||||
        "web3-provider-engine": "14.0.6"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.2",
 | 
			
		||||
        "@0x/assert": "^2.0.2",
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.3",
 | 
			
		||||
        "@0x/assert": "^2.0.3",
 | 
			
		||||
        "@0x/contract-addresses": "^2.2.1",
 | 
			
		||||
        "@0x/contract-artifacts": "^1.3.0",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.3",
 | 
			
		||||
        "@0x/fill-scenarios": "^2.0.3",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/contracts-test-utils": "^3.0.4",
 | 
			
		||||
        "@0x/fill-scenarios": "^2.0.4",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.3",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "ethereumjs-abi": "0.6.5",
 | 
			
		||||
        "ethereumjs-blockstream": "6.0.0",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
import {
 | 
			
		||||
    DutchAuction,
 | 
			
		||||
    ERC20Proxy,
 | 
			
		||||
    ERC20Token,
 | 
			
		||||
    ERC721Proxy,
 | 
			
		||||
@@ -8,6 +9,7 @@ import {
 | 
			
		||||
    OrderValidator,
 | 
			
		||||
    WETH9,
 | 
			
		||||
} from '@0x/contract-artifacts';
 | 
			
		||||
import { AbiDecoder } from '@0x/utils';
 | 
			
		||||
import { Web3Wrapper } from '@0x/web3-wrapper';
 | 
			
		||||
import { Provider } from 'ethereum-types';
 | 
			
		||||
import * as _ from 'lodash';
 | 
			
		||||
@@ -87,6 +89,7 @@ export class ContractWrappers {
 | 
			
		||||
        };
 | 
			
		||||
        this._web3Wrapper = new Web3Wrapper(provider, txDefaults);
 | 
			
		||||
        const artifactsArray = [
 | 
			
		||||
            DutchAuction,
 | 
			
		||||
            ERC20Proxy,
 | 
			
		||||
            ERC20Token,
 | 
			
		||||
            ERC721Proxy,
 | 
			
		||||
@@ -97,7 +100,7 @@ export class ContractWrappers {
 | 
			
		||||
            WETH9,
 | 
			
		||||
        ];
 | 
			
		||||
        _.forEach(artifactsArray, artifact => {
 | 
			
		||||
            this._web3Wrapper.abiDecoder.addABI(artifact.compilerOutput.abi);
 | 
			
		||||
            this._web3Wrapper.abiDecoder.addABI(artifact.compilerOutput.abi, artifact.contractName);
 | 
			
		||||
        });
 | 
			
		||||
        const blockPollingIntervalMs = _.isUndefined(config.blockPollingIntervalMs)
 | 
			
		||||
            ? constants.DEFAULT_BLOCK_POLLING_INTERVAL
 | 
			
		||||
@@ -168,4 +171,11 @@ export class ContractWrappers {
 | 
			
		||||
    public getProvider(): Provider {
 | 
			
		||||
        return this._web3Wrapper.getProvider();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the abi decoder instance currently used by contract-wrappers
 | 
			
		||||
     * @return  AbiDecoder instance
 | 
			
		||||
     */
 | 
			
		||||
    public getAbiDecoder(): AbiDecoder {
 | 
			
		||||
        return this._web3Wrapper.abiDecoder;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,8 @@ export { DutchAuctionWrapper } from './contract_wrappers/dutch_auction_wrapper';
 | 
			
		||||
 | 
			
		||||
export { TransactionEncoder } from './utils/transaction_encoder';
 | 
			
		||||
 | 
			
		||||
export { AbiDecoder, DecodedCalldata } from '@0x/utils';
 | 
			
		||||
 | 
			
		||||
export {
 | 
			
		||||
    ContractWrappersError,
 | 
			
		||||
    ForwarderWrapperError,
 | 
			
		||||
@@ -83,6 +85,11 @@ export {
 | 
			
		||||
    JSONRPCResponseError,
 | 
			
		||||
    AbiDefinition,
 | 
			
		||||
    LogWithDecodedArgs,
 | 
			
		||||
    LogEntry,
 | 
			
		||||
    DecodedLogEntry,
 | 
			
		||||
    DecodedLogEntryEvent,
 | 
			
		||||
    LogEntryEvent,
 | 
			
		||||
    RawLog,
 | 
			
		||||
    FunctionAbi,
 | 
			
		||||
    EventAbi,
 | 
			
		||||
    EventParameter,
 | 
			
		||||
 
 | 
			
		||||
@@ -241,6 +241,23 @@ export class TransactionEncoder {
 | 
			
		||||
        );
 | 
			
		||||
        return abiEncodedData;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Encodes a matchOrders transaction.
 | 
			
		||||
     * @param   leftOrder First order to match.
 | 
			
		||||
     * @param   rightOrder Second order to match.
 | 
			
		||||
     * @return Hex encoded abi of the function call.
 | 
			
		||||
     */
 | 
			
		||||
    public matchOrdersTx(leftOrder: SignedOrder, rightOrder: SignedOrder): string {
 | 
			
		||||
        assert.doesConformToSchema('leftOrder', leftOrder, schemas.orderSchema);
 | 
			
		||||
        assert.doesConformToSchema('rightOrder', rightOrder, schemas.orderSchema);
 | 
			
		||||
        const abiEncodedData = this._getExchangeContract().matchOrders.getABIEncodedTransactionData(
 | 
			
		||||
            leftOrder,
 | 
			
		||||
            rightOrder,
 | 
			
		||||
            leftOrder.signature,
 | 
			
		||||
            rightOrder.signature,
 | 
			
		||||
        );
 | 
			
		||||
        return abiEncodedData;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Encodes a preSign transaction.
 | 
			
		||||
     * @param hash          Hash to pre-sign
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										127
									
								
								packages/contract-wrappers/test/calldata_decoder_test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										127
									
								
								packages/contract-wrappers/test/calldata_decoder_test.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,127 @@
 | 
			
		||||
import { constants, OrderFactory } from '@0x/contracts-test-utils';
 | 
			
		||||
import { BlockchainLifecycle } from '@0x/dev-utils';
 | 
			
		||||
import { assetDataUtils } from '@0x/order-utils';
 | 
			
		||||
import { SignedOrder } from '@0x/types';
 | 
			
		||||
import { addressUtils, BigNumber } from '@0x/utils';
 | 
			
		||||
import * as chai from 'chai';
 | 
			
		||||
import * as _ from 'lodash';
 | 
			
		||||
import 'mocha';
 | 
			
		||||
 | 
			
		||||
import { ContractAddresses, ContractWrappers } from '../src';
 | 
			
		||||
 | 
			
		||||
import { chaiSetup } from './utils/chai_setup';
 | 
			
		||||
import { migrateOnceAsync } from './utils/migrate';
 | 
			
		||||
import { provider, web3Wrapper } from './utils/web3_wrapper';
 | 
			
		||||
 | 
			
		||||
chaiSetup.configure();
 | 
			
		||||
const expect = chai.expect;
 | 
			
		||||
 | 
			
		||||
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
 | 
			
		||||
 | 
			
		||||
describe('ABI Decoding Calldata', () => {
 | 
			
		||||
    const defaultERC20MakerAssetAddress = addressUtils.generatePseudoRandomAddress();
 | 
			
		||||
    const matchOrdersSignature =
 | 
			
		||||
        'matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)';
 | 
			
		||||
    let signedOrderLeft: SignedOrder;
 | 
			
		||||
    let signedOrderRight: SignedOrder;
 | 
			
		||||
    let orderLeft = {};
 | 
			
		||||
    let orderRight = {};
 | 
			
		||||
    let matchOrdersTxData: string;
 | 
			
		||||
    let contractAddresses: ContractAddresses;
 | 
			
		||||
    let contractWrappers: ContractWrappers;
 | 
			
		||||
 | 
			
		||||
    before(async () => {
 | 
			
		||||
        // Create accounts
 | 
			
		||||
        const accounts = await web3Wrapper.getAvailableAddressesAsync();
 | 
			
		||||
        const [makerAddressLeft, makerAddressRight] = accounts;
 | 
			
		||||
        const [privateKeyLeft, privateKeyRight] = constants.TESTRPC_PRIVATE_KEYS;
 | 
			
		||||
        const exchangeAddress = addressUtils.generatePseudoRandomAddress();
 | 
			
		||||
        const feeRecipientAddress = addressUtils.generatePseudoRandomAddress();
 | 
			
		||||
        // Create orders to match.
 | 
			
		||||
        // Values are arbitrary, with the exception of maker addresses (generated above).
 | 
			
		||||
        orderLeft = {
 | 
			
		||||
            makerAddress: makerAddressLeft,
 | 
			
		||||
            makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
 | 
			
		||||
            makerAssetAmount: new BigNumber(10),
 | 
			
		||||
            takerAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
            takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
 | 
			
		||||
            takerAssetAmount: new BigNumber(1),
 | 
			
		||||
            feeRecipientAddress,
 | 
			
		||||
            makerFee: new BigNumber(0),
 | 
			
		||||
            takerFee: new BigNumber(0),
 | 
			
		||||
            senderAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
            expirationTimeSeconds: new BigNumber(1549498915),
 | 
			
		||||
            salt: new BigNumber(217),
 | 
			
		||||
        };
 | 
			
		||||
        orderRight = {
 | 
			
		||||
            makerAddress: makerAddressRight,
 | 
			
		||||
            makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
 | 
			
		||||
            makerAssetAmount: new BigNumber(1),
 | 
			
		||||
            takerAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
            takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
 | 
			
		||||
            takerAssetAmount: new BigNumber(8),
 | 
			
		||||
            feeRecipientAddress,
 | 
			
		||||
            makerFee: new BigNumber(0),
 | 
			
		||||
            takerFee: new BigNumber(0),
 | 
			
		||||
            senderAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
            expirationTimeSeconds: new BigNumber(1549498915),
 | 
			
		||||
            salt: new BigNumber(50010),
 | 
			
		||||
        };
 | 
			
		||||
        const orderFactoryLeft = new OrderFactory(privateKeyLeft, orderLeft);
 | 
			
		||||
        signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({ exchangeAddress });
 | 
			
		||||
        const orderFactoryRight = new OrderFactory(privateKeyRight, orderRight);
 | 
			
		||||
        signedOrderRight = await orderFactoryRight.newSignedOrderAsync({ exchangeAddress });
 | 
			
		||||
        // Encode match orders transaction
 | 
			
		||||
        contractAddresses = await migrateOnceAsync();
 | 
			
		||||
        await blockchainLifecycle.startAsync();
 | 
			
		||||
        const config = {
 | 
			
		||||
            networkId: constants.TESTRPC_NETWORK_ID,
 | 
			
		||||
            contractAddresses,
 | 
			
		||||
            blockPollingIntervalMs: 10,
 | 
			
		||||
        };
 | 
			
		||||
        contractWrappers = new ContractWrappers(provider, config);
 | 
			
		||||
        const transactionEncoder = await contractWrappers.exchange.transactionEncoderAsync();
 | 
			
		||||
        matchOrdersTxData = transactionEncoder.matchOrdersTx(signedOrderLeft, signedOrderRight);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    describe('decode', () => {
 | 
			
		||||
        it('should successfully decode DutchAuction.matchOrders calldata', async () => {
 | 
			
		||||
            const contractName = 'DutchAuction';
 | 
			
		||||
            const decodedTxData = contractWrappers
 | 
			
		||||
                .getAbiDecoder()
 | 
			
		||||
                .decodeCalldataOrThrow(matchOrdersTxData, contractName);
 | 
			
		||||
            const expectedFunctionName = 'matchOrders';
 | 
			
		||||
            const expectedFunctionArguments = {
 | 
			
		||||
                buyOrder: orderLeft,
 | 
			
		||||
                sellOrder: orderRight,
 | 
			
		||||
                buySignature: signedOrderLeft.signature,
 | 
			
		||||
                sellSignature: signedOrderRight.signature,
 | 
			
		||||
            };
 | 
			
		||||
            expect(decodedTxData.functionName).to.be.equal(expectedFunctionName);
 | 
			
		||||
            expect(decodedTxData.functionSignature).to.be.equal(matchOrdersSignature);
 | 
			
		||||
            expect(decodedTxData.functionArguments).to.be.deep.equal(expectedFunctionArguments);
 | 
			
		||||
        });
 | 
			
		||||
        it('should successfully decode Exchange.matchOrders calldata (and distinguish from DutchAuction.matchOrders)', async () => {
 | 
			
		||||
            const contractName = 'Exchange';
 | 
			
		||||
            const decodedTxData = contractWrappers
 | 
			
		||||
                .getAbiDecoder()
 | 
			
		||||
                .decodeCalldataOrThrow(matchOrdersTxData, contractName);
 | 
			
		||||
            const expectedFunctionName = 'matchOrders';
 | 
			
		||||
            const expectedFunctionArguments = {
 | 
			
		||||
                leftOrder: orderLeft,
 | 
			
		||||
                rightOrder: orderRight,
 | 
			
		||||
                leftSignature: signedOrderLeft.signature,
 | 
			
		||||
                rightSignature: signedOrderRight.signature,
 | 
			
		||||
            };
 | 
			
		||||
            expect(decodedTxData.functionName).to.be.equal(expectedFunctionName);
 | 
			
		||||
            expect(decodedTxData.functionSignature).to.be.equal(matchOrdersSignature);
 | 
			
		||||
            expect(decodedTxData.functionArguments).to.be.deep.equal(expectedFunctionArguments);
 | 
			
		||||
        });
 | 
			
		||||
        it('should throw if cannot decode calldata', async () => {
 | 
			
		||||
            const badTxData = '0x01020304';
 | 
			
		||||
            expect(() => {
 | 
			
		||||
                contractWrappers.getAbiDecoder().decodeCalldataOrThrow(badTxData);
 | 
			
		||||
            }).to.throw("No functions registered for selector '0x01020304'");
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "1.0.2",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "1.0.1",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v1.0.2 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v1.0.1 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/contracts-gen",
 | 
			
		||||
    "version": "1.0.1",
 | 
			
		||||
    "version": "1.0.2",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -29,7 +29,7 @@
 | 
			
		||||
        "@0x/sol-resolver": "^2.0.2",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "lodash": "^4.17.11",
 | 
			
		||||
        "prettier": "^1.16.3",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/dev-tools-pages",
 | 
			
		||||
    "version": "0.0.18",
 | 
			
		||||
    "version": "0.0.19",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -26,7 +26,7 @@
 | 
			
		||||
    },
 | 
			
		||||
    "license": "Apache-2.0",
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/react-shared": "^2.0.3",
 | 
			
		||||
        "@0x/react-shared": "^2.0.4",
 | 
			
		||||
        "basscss": "^8.0.3",
 | 
			
		||||
        "bowser": "^1.9.3",
 | 
			
		||||
        "highlight.js": "^9.13.1",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,14 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.1.0",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Allow using the Web3Factory in-process Ganache provider with existing DB snapshot",
 | 
			
		||||
                "pr": 1602
 | 
			
		||||
            }
 | 
			
		||||
        ],
 | 
			
		||||
        "timestamp": 1549733923
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.0.2",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v2.1.0 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Allow using the Web3Factory in-process Ganache provider with existing DB snapshot (#1602)
 | 
			
		||||
 | 
			
		||||
## v2.0.2 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/dev-utils",
 | 
			
		||||
    "version": "2.0.2",
 | 
			
		||||
    "version": "2.1.0",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -41,11 +41,11 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "@types/web3-provider-engine": "^14.0.0",
 | 
			
		||||
        "chai": "^4.0.1",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
 
 | 
			
		||||
@@ -47,8 +47,11 @@ export const web3Factory = {
 | 
			
		||||
                _.isUndefined(config.shouldThrowErrorsOnGanacheRPCResponse) ||
 | 
			
		||||
                config.shouldThrowErrorsOnGanacheRPCResponse;
 | 
			
		||||
            if (!_.isUndefined(config.ganacheDatabasePath)) {
 | 
			
		||||
                // Saving the snapshot to a local db. Ganache requires this directory to exist
 | 
			
		||||
                fs.mkdirSync(config.ganacheDatabasePath);
 | 
			
		||||
                const doesDatabaseAlreadyExist = fs.existsSync(config.ganacheDatabasePath);
 | 
			
		||||
                if (!doesDatabaseAlreadyExist) {
 | 
			
		||||
                    // Working with local DB snapshot. Ganache requires this directory to exist
 | 
			
		||||
                    fs.mkdirSync(config.ganacheDatabasePath);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            provider.addProvider(
 | 
			
		||||
                new GanacheSubprovider({
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "2.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v2.0.4 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v2.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/fill-scenarios",
 | 
			
		||||
    "version": "2.0.3",
 | 
			
		||||
    "version": "2.0.4",
 | 
			
		||||
    "description": "0x order fill scenario generator",
 | 
			
		||||
    "main": "lib/index.js",
 | 
			
		||||
    "types": "lib/index.d.ts",
 | 
			
		||||
@@ -28,14 +28,14 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.3",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contract-artifacts": "^1.3.0",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "ethers": "~4.0.4",
 | 
			
		||||
        "lodash": "^4.17.11"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/instant",
 | 
			
		||||
    "version": "1.0.12",
 | 
			
		||||
    "version": "1.0.13",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -42,15 +42,15 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md",
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/assert": "^2.0.2",
 | 
			
		||||
        "@0x/asset-buyer": "^5.0.3",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/assert": "^2.0.3",
 | 
			
		||||
        "@0x/asset-buyer": "^5.0.4",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.3",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "babel-runtime": "^6.26.0",
 | 
			
		||||
        "bowser": "^1.9.4",
 | 
			
		||||
        "copy-to-clipboard": "^3.0.8",
 | 
			
		||||
 
 | 
			
		||||
@@ -17,6 +17,7 @@ import { ZeroExInstantOverlay, ZeroExInstantOverlayProps } from './index';
 | 
			
		||||
import { Network, OrderSource } from './types';
 | 
			
		||||
import { analytics } from './util/analytics';
 | 
			
		||||
import { assert } from './util/assert';
 | 
			
		||||
import { orderCoercionUtil } from './util/order_coercion';
 | 
			
		||||
import { providerFactory } from './util/provider_factory';
 | 
			
		||||
import { util } from './util/util';
 | 
			
		||||
 | 
			
		||||
@@ -93,16 +94,24 @@ export interface ZeroExInstantConfig extends ZeroExInstantOverlayProps {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_ZERO_EX_CONTAINER_SELECTOR) => {
 | 
			
		||||
    validateInstantRenderConfig(config, selector);
 | 
			
		||||
    if (config.shouldDisablePushToHistory) {
 | 
			
		||||
    // Coerces BigNumber provided in config to version utilized by 0x packages
 | 
			
		||||
    const coercedConfig = _.assign({}, config, {
 | 
			
		||||
        orderSource: _.isArray(config.orderSource)
 | 
			
		||||
            ? orderCoercionUtil.coerceOrderArrayFieldsToBigNumber(config.orderSource)
 | 
			
		||||
            : config.orderSource,
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    validateInstantRenderConfig(coercedConfig, selector);
 | 
			
		||||
 | 
			
		||||
    if (coercedConfig.shouldDisablePushToHistory) {
 | 
			
		||||
        if (!isInstantRendered()) {
 | 
			
		||||
            renderInstant(config, selector);
 | 
			
		||||
            renderInstant(coercedConfig, selector);
 | 
			
		||||
        }
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    // Before we render, push to history saying that instant is showing for this part of the history.
 | 
			
		||||
    window.history.pushState({ zeroExInstantShowing: true }, '0x Instant');
 | 
			
		||||
    let removeInstant = renderInstant(config, selector);
 | 
			
		||||
    let removeInstant = renderInstant(coercedConfig, selector);
 | 
			
		||||
    // If the integrator defined a popstate handler, save it to __zeroExInstantIntegratorsPopStateHandler
 | 
			
		||||
    // unless we have already done so on a previous render.
 | 
			
		||||
    const anyWindow = window as any;
 | 
			
		||||
@@ -116,7 +125,7 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z
 | 
			
		||||
        if (newState && newState.zeroExInstantShowing) {
 | 
			
		||||
            // We have returned to a history state that expects instant to be rendered.
 | 
			
		||||
            if (!isInstantRendered()) {
 | 
			
		||||
                removeInstant = renderInstant(config, selector);
 | 
			
		||||
                removeInstant = renderInstant(coercedConfig, selector);
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            // History has changed to a different state.
 | 
			
		||||
 
 | 
			
		||||
@@ -22,4 +22,15 @@ export const maybeBigNumberUtil = {
 | 
			
		||||
        }
 | 
			
		||||
        return _.isUndefined(val1) && _.isUndefined(val2);
 | 
			
		||||
    },
 | 
			
		||||
    // converts a BigNumber or String to the BigNumber used by 0x libraries
 | 
			
		||||
    toMaybeBigNumber: (value: any): Maybe<BigNumber> => {
 | 
			
		||||
        if (_.isString(value)) {
 | 
			
		||||
            return maybeBigNumberUtil.stringToMaybeBigNumber(value);
 | 
			
		||||
        }
 | 
			
		||||
        // checks for pre v8 bignumber with member variable
 | 
			
		||||
        if (BigNumber.isBigNumber(value) || value.isBigNumber) {
 | 
			
		||||
            return new BigNumber(value.toString());
 | 
			
		||||
        }
 | 
			
		||||
        return undefined;
 | 
			
		||||
    },
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										42
									
								
								packages/instant/src/util/order_coercion.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								packages/instant/src/util/order_coercion.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
			
		||||
import { BigNumber } from '@0x/utils';
 | 
			
		||||
import * as _ from 'lodash';
 | 
			
		||||
 | 
			
		||||
import { maybeBigNumberUtil } from './maybe_big_number';
 | 
			
		||||
 | 
			
		||||
const coerceBigNumberOrString = (value: any): BigNumber => {
 | 
			
		||||
    const bn = maybeBigNumberUtil.toMaybeBigNumber(value);
 | 
			
		||||
    return !!bn ? bn : value;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// function implies that the signed order already has been validated
 | 
			
		||||
export const orderCoercionUtil = {
 | 
			
		||||
    // coerces order big number values to the BigNumber version utilized by 0x
 | 
			
		||||
    coerceFieldsToBigNumbers(obj: any, fields: string[]): any {
 | 
			
		||||
        const result = _.assign({}, obj);
 | 
			
		||||
        _.each(fields, field => {
 | 
			
		||||
            _.update(result, field, (value: string) => {
 | 
			
		||||
                if (_.isUndefined(value)) {
 | 
			
		||||
                    throw new Error(`Could not find field '${field}' while converting fields to BigNumber.`);
 | 
			
		||||
                }
 | 
			
		||||
                return coerceBigNumberOrString(value);
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
        return result;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    coerceOrderFieldsToBigNumber: (order: any): any => {
 | 
			
		||||
        return orderCoercionUtil.coerceFieldsToBigNumbers(order, [
 | 
			
		||||
            'makerFee',
 | 
			
		||||
            'takerFee',
 | 
			
		||||
            'makerAssetAmount',
 | 
			
		||||
            'takerAssetAmount',
 | 
			
		||||
            'salt',
 | 
			
		||||
            'expirationTimeSeconds',
 | 
			
		||||
        ]);
 | 
			
		||||
    },
 | 
			
		||||
    coerceOrderArrayFieldsToBigNumber: (orders: any[]): any[] => {
 | 
			
		||||
        return _.map(orders, (value: any) => {
 | 
			
		||||
            return orderCoercionUtil.coerceOrderFieldsToBigNumber(value);
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										65
									
								
								packages/instant/test/util/maybe_big_number.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								packages/instant/test/util/maybe_big_number.test.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,65 @@
 | 
			
		||||
import { BigNumber } from '@0x/utils';
 | 
			
		||||
 | 
			
		||||
import { maybeBigNumberUtil } from '../../src/util/maybe_big_number';
 | 
			
		||||
 | 
			
		||||
const BIG_NUMBER_1 = new BigNumber('10.1');
 | 
			
		||||
const BIG_NUMBER_2 = new BigNumber('10.1');
 | 
			
		||||
const BIG_NUMBER_3 = new BigNumber('11.1');
 | 
			
		||||
 | 
			
		||||
describe('maybeBigNumberUtil', () => {
 | 
			
		||||
    describe('stringToMaybeBigNumber', () => {
 | 
			
		||||
        it('should return undefined if stringValue is NaN', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.stringToMaybeBigNumber('NaN')).toEqual(undefined);
 | 
			
		||||
        });
 | 
			
		||||
        it('should return bignumber constructed with stringValue', () => {
 | 
			
		||||
            const bn = maybeBigNumberUtil.stringToMaybeBigNumber('10.1');
 | 
			
		||||
            if (!!bn) {
 | 
			
		||||
                expect(bn.toString()).toEqual('10.1');
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
        it('should return undefined if stringValue is not valid (i.e not numeric)', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.stringToMaybeBigNumber('test')).toEqual(undefined);
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    describe('areMaybeBigNumbersEqual', () => {
 | 
			
		||||
        it('should return true if val1 and val2 are equivalent BigNumber values', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.areMaybeBigNumbersEqual(BIG_NUMBER_1, BIG_NUMBER_2)).toEqual(true);
 | 
			
		||||
        });
 | 
			
		||||
        it('should return true if val1 and val2 are both undefined', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.areMaybeBigNumbersEqual(undefined, undefined)).toEqual(true);
 | 
			
		||||
        });
 | 
			
		||||
        it('should return false if either one val1 or val2 is undefined', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.areMaybeBigNumbersEqual(BIG_NUMBER_1, undefined)).toEqual(false);
 | 
			
		||||
        });
 | 
			
		||||
        it('should return false if val1 and val2 are equivalent values BigNumber', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.areMaybeBigNumbersEqual(BIG_NUMBER_1, BIG_NUMBER_3)).toEqual(false);
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // this doesn't test coercing a pre v8.0.0 version of big number to desired version
 | 
			
		||||
    describe('toMaybeBigNumber', () => {
 | 
			
		||||
        it('should return BigNumber (>=v8.0.0) constructed with value if type is string', () => {
 | 
			
		||||
            const bn = maybeBigNumberUtil.toMaybeBigNumber('10.1');
 | 
			
		||||
            if (!!bn) {
 | 
			
		||||
                expect(bn.toString()).toEqual('10.1');
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
        it('should return undefined if value is NaN', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.toMaybeBigNumber('NaN')).toEqual(undefined);
 | 
			
		||||
        });
 | 
			
		||||
        it('should return undefined if value as string is not valid (i.e not numeric)', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.toMaybeBigNumber('test')).toEqual(undefined);
 | 
			
		||||
        });
 | 
			
		||||
        it('should return undefined if value as string is not valid (i.e not numeric)', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.toMaybeBigNumber('test')).toEqual(undefined);
 | 
			
		||||
        });
 | 
			
		||||
        it('should return BigNumber (>=v8.0.0) when passed a value as BigNumber (>=v8.0.0)', () => {
 | 
			
		||||
            const bn = maybeBigNumberUtil.toMaybeBigNumber(BIG_NUMBER_1);
 | 
			
		||||
            expect(BigNumber.isBigNumber(bn)).toEqual(true);
 | 
			
		||||
        });
 | 
			
		||||
        it('should return undefined if value is not BigNumber or string', () => {
 | 
			
		||||
            expect(maybeBigNumberUtil.toMaybeBigNumber(true)).toEqual(undefined);
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
							
								
								
									
										103
									
								
								packages/instant/test/util/order_coercion.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								packages/instant/test/util/order_coercion.test.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,103 @@
 | 
			
		||||
import { BigNumber } from '@0x/utils';
 | 
			
		||||
 | 
			
		||||
import { orderCoercionUtil } from '../../src/util/order_coercion';
 | 
			
		||||
 | 
			
		||||
const ORDER = {
 | 
			
		||||
    senderAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
    makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
 | 
			
		||||
    takerAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
    makerFee: new BigNumber('0'),
 | 
			
		||||
    takerFee: new BigNumber('0'),
 | 
			
		||||
    makerAssetAmount: new BigNumber('200000000000000000000'),
 | 
			
		||||
    takerAssetAmount: new BigNumber('10000000000000000000'),
 | 
			
		||||
    makerAssetData: '0xf47261b00000000000000000000000008cb3971b8eb709c14616bd556ff6683019e90d9c',
 | 
			
		||||
    takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
 | 
			
		||||
    expirationTimeSeconds: new BigNumber('1601535600'),
 | 
			
		||||
    feeRecipientAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
    salt: new BigNumber('3101985707338942582579795423923841749956600670712030922928319824580764688653'),
 | 
			
		||||
    signature:
 | 
			
		||||
        '0x1bd4d5686fea801fe33c68c4944356085e7e6cb553eb7073160abd815609f714e85fb47f44b7ffd0a2a1321ac40d72d55163869d0a50fdb5a402132150fe33a08403',
 | 
			
		||||
    exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const STRING_ORDER = {
 | 
			
		||||
    senderAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
    makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
 | 
			
		||||
    takerAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
    makerFee: '0',
 | 
			
		||||
    takerFee: '0',
 | 
			
		||||
    makerAssetAmount: '300000000000000000000',
 | 
			
		||||
    takerAssetAmount: '31000000000000000000',
 | 
			
		||||
    makerAssetData: '0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa',
 | 
			
		||||
    takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
 | 
			
		||||
    expirationTimeSeconds: '2524636800',
 | 
			
		||||
    feeRecipientAddress: '0x0000000000000000000000000000000000000000',
 | 
			
		||||
    salt: '64592004666704945574675477805199411288137454783320798602050822322450089238268',
 | 
			
		||||
    signature:
 | 
			
		||||
        '0x1c13cacddca8d7d8248e91f412377e68f8f1f9891a59a6c1b2eea9f7b33558c30c4fb86a448e08ab7def40a28fb3a3062dcb33bb3c45302447fce5c4288b7c7f5b03',
 | 
			
		||||
    exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const ORDERS = [ORDER, STRING_ORDER];
 | 
			
		||||
 | 
			
		||||
describe('orderCoercionUtil', () => {
 | 
			
		||||
    describe('coerceFieldsToBigNumbers', () => {
 | 
			
		||||
        it('should coerce all fields specified to a big number', () => {
 | 
			
		||||
            const coercedOrder = orderCoercionUtil.coerceFieldsToBigNumbers(STRING_ORDER, ['makerFee', 'takerFee']);
 | 
			
		||||
            expect(coercedOrder.makerFee.toString()).toEqual('0');
 | 
			
		||||
            expect(coercedOrder.takerFee.toString()).toEqual('0');
 | 
			
		||||
        });
 | 
			
		||||
        it("should throw if a field can't be found", () => {
 | 
			
		||||
            expect(() => {
 | 
			
		||||
                orderCoercionUtil.coerceFieldsToBigNumbers(ORDER, ['salty']);
 | 
			
		||||
            }).toThrow("Could not find field 'salty' while converting fields to BigNumber.");
 | 
			
		||||
        });
 | 
			
		||||
        it('should not change value if not numeric string or big number', () => {
 | 
			
		||||
            const obj = { number: 'number' };
 | 
			
		||||
            const coercedObj = orderCoercionUtil.coerceFieldsToBigNumbers(obj, ['number']);
 | 
			
		||||
            expect(coercedObj).toEqual({
 | 
			
		||||
                number: 'number',
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
    // Note: this doesn't test coercing pre v8.0.0 BigNumber versions to specified one used by 0x
 | 
			
		||||
    describe('coerceOrderFieldsToBigNumber', () => {
 | 
			
		||||
        it('should convert string values in order to big number', () => {
 | 
			
		||||
            const coercedOrder = orderCoercionUtil.coerceOrderFieldsToBigNumber(STRING_ORDER);
 | 
			
		||||
            expect(coercedOrder.makerFee.toString()).toEqual(STRING_ORDER.makerFee);
 | 
			
		||||
            expect(coercedOrder.takerFee.toString()).toEqual(STRING_ORDER.takerFee);
 | 
			
		||||
            expect(coercedOrder.takerAssetAmount.toString()).toEqual(STRING_ORDER.takerAssetAmount);
 | 
			
		||||
            expect(coercedOrder.makerAssetAmount.toString()).toEqual(STRING_ORDER.makerAssetAmount);
 | 
			
		||||
            expect(coercedOrder.salt.toString()).toEqual(STRING_ORDER.salt);
 | 
			
		||||
            expect(coercedOrder.expirationTimeSeconds.toString()).toEqual(STRING_ORDER.expirationTimeSeconds);
 | 
			
		||||
        });
 | 
			
		||||
        it('should convert big number values in order to big number', () => {
 | 
			
		||||
            const coercedOrder = orderCoercionUtil.coerceOrderFieldsToBigNumber(ORDER);
 | 
			
		||||
            expect(coercedOrder.makerFee).toEqual(ORDER.makerFee);
 | 
			
		||||
            expect(coercedOrder.takerFee).toEqual(ORDER.takerFee);
 | 
			
		||||
            expect(coercedOrder.takerAssetAmount).toEqual(ORDER.takerAssetAmount);
 | 
			
		||||
            expect(coercedOrder.makerAssetAmount).toEqual(ORDER.makerAssetAmount);
 | 
			
		||||
            expect(coercedOrder.salt).toEqual(ORDER.salt);
 | 
			
		||||
            expect(coercedOrder.expirationTimeSeconds).toEqual(ORDER.expirationTimeSeconds);
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
    // Note: this doesn't test coercing pre v8.0.0 BigNumber versions to specified one used by 0x
 | 
			
		||||
    describe('coerceOrderArrayFieldsToBigNumber', () => {
 | 
			
		||||
        it('should convert string values and big numbers in orders to big number', () => {
 | 
			
		||||
            const coercedOrders = orderCoercionUtil.coerceOrderArrayFieldsToBigNumber(ORDERS);
 | 
			
		||||
            expect(coercedOrders[0].makerFee).toEqual(ORDER.makerFee);
 | 
			
		||||
            expect(coercedOrders[0].takerFee).toEqual(ORDER.takerFee);
 | 
			
		||||
            expect(coercedOrders[0].takerAssetAmount).toEqual(ORDER.takerAssetAmount);
 | 
			
		||||
            expect(coercedOrders[0].makerAssetAmount).toEqual(ORDER.makerAssetAmount);
 | 
			
		||||
            expect(coercedOrders[0].salt).toEqual(ORDER.salt);
 | 
			
		||||
            expect(coercedOrders[0].expirationTimeSeconds).toEqual(ORDER.expirationTimeSeconds);
 | 
			
		||||
 | 
			
		||||
            expect(coercedOrders[1].makerFee.toString()).toEqual(STRING_ORDER.makerFee);
 | 
			
		||||
            expect(coercedOrders[1].takerFee.toString()).toEqual(STRING_ORDER.takerFee);
 | 
			
		||||
            expect(coercedOrders[1].takerAssetAmount.toString()).toEqual(STRING_ORDER.takerAssetAmount);
 | 
			
		||||
            expect(coercedOrders[1].makerAssetAmount.toString()).toEqual(STRING_ORDER.makerAssetAmount);
 | 
			
		||||
            expect(coercedOrders[1].salt.toString()).toEqual(STRING_ORDER.salt);
 | 
			
		||||
            expect(coercedOrders[1].expirationTimeSeconds.toString()).toEqual(STRING_ORDER.expirationTimeSeconds);
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "3.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "3.0.2",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v3.0.3 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v3.0.2 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/json-schemas",
 | 
			
		||||
    "version": "3.0.2",
 | 
			
		||||
    "version": "3.0.3",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -46,7 +46,7 @@
 | 
			
		||||
    },
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@types/lodash.foreach": "^4.5.3",
 | 
			
		||||
        "@types/lodash.values": "^4.3.3",
 | 
			
		||||
        "@types/mocha": "^2.2.42",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/metacoin",
 | 
			
		||||
    "version": "0.0.39",
 | 
			
		||||
    "version": "0.0.40",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -30,18 +30,18 @@
 | 
			
		||||
    "author": "",
 | 
			
		||||
    "license": "Apache-2.0",
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^2.0.2",
 | 
			
		||||
        "@0x/abi-gen": "^2.0.3",
 | 
			
		||||
        "@0x/abi-gen-templates": "^2.0.0",
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/sol-coverage": "^2.0.2",
 | 
			
		||||
        "@0x/sol-profiler": "^2.0.3",
 | 
			
		||||
        "@0x/sol-trace": "^2.0.3",
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/sol-coverage": "^2.0.3",
 | 
			
		||||
        "@0x/sol-profiler": "^2.0.4",
 | 
			
		||||
        "@0x/sol-trace": "^2.0.4",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "@types/mocha": "^2.2.42",
 | 
			
		||||
        "copyfiles": "^2.0.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
@@ -50,8 +50,8 @@
 | 
			
		||||
        "run-s": "^0.0.0"
 | 
			
		||||
    },
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "chai": "^4.0.1",
 | 
			
		||||
        "chai-as-promised": "^7.1.0",
 | 
			
		||||
        "chai-bignumber": "^3.0.0",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "3.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "3.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v3.0.4 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v3.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/migrations",
 | 
			
		||||
    "version": "3.0.3",
 | 
			
		||||
    "version": "3.0.4",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -35,7 +35,7 @@
 | 
			
		||||
    },
 | 
			
		||||
    "license": "Apache-2.0",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@types/yargs": "^11.0.0",
 | 
			
		||||
@@ -48,16 +48,16 @@
 | 
			
		||||
        "yargs": "^10.0.3"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.3",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contract-addresses": "^2.2.1",
 | 
			
		||||
        "@0x/contract-artifacts": "^1.3.0",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.2",
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/sol-compiler": "^3.0.3",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "@ledgerhq/hw-app-eth": "^4.3.0",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "ethers": "~4.0.4",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
{
 | 
			
		||||
    "private": true,
 | 
			
		||||
    "name": "@0x/monorepo-scripts",
 | 
			
		||||
    "version": "1.0.23",
 | 
			
		||||
    "version": "1.0.24",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -48,7 +48,7 @@
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@lerna/batch-packages": "^3.0.0-beta.18",
 | 
			
		||||
        "@types/depcheck": "^0.6.0",
 | 
			
		||||
        "async-child-process": "^1.1.1",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,14 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "version": "6.1.0",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Updated implementation of `generatePseudoRandomSalt` to use generator from @0x/utils",
 | 
			
		||||
                "pr": 1569
 | 
			
		||||
            }
 | 
			
		||||
        ],
 | 
			
		||||
        "timestamp": 1549733923
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "6.0.1",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v6.1.0 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Updated implementation of `generatePseudoRandomSalt` to use generator from @0x/utils (#1569)
 | 
			
		||||
 | 
			
		||||
## v6.0.1 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/order-utils",
 | 
			
		||||
    "version": "6.0.1",
 | 
			
		||||
    "version": "6.1.0",
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "node": ">=6.12"
 | 
			
		||||
    },
 | 
			
		||||
@@ -35,7 +35,7 @@
 | 
			
		||||
    },
 | 
			
		||||
    "homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md",
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/bn.js": "^4.11.0",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
@@ -53,16 +53,16 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.2",
 | 
			
		||||
        "@0x/assert": "^2.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.3",
 | 
			
		||||
        "@0x/assert": "^2.0.3",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contract-addresses": "^2.2.1",
 | 
			
		||||
        "@0x/contract-artifacts": "^1.3.0",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.2",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.3",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "@types/node": "*",
 | 
			
		||||
        "bn.js": "^4.11.8",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,4 @@
 | 
			
		||||
import { BigNumber } from '@0x/utils';
 | 
			
		||||
 | 
			
		||||
const MAX_DIGITS_IN_UNSIGNED_256_INT = 78;
 | 
			
		||||
import { BigNumber, generatePseudoRandom256BitNumber } from '@0x/utils';
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Generates a pseudo-random 256-bit salt.
 | 
			
		||||
@@ -9,10 +7,6 @@ const MAX_DIGITS_IN_UNSIGNED_256_INT = 78;
 | 
			
		||||
 * @return  A pseudo-random 256-bit number that can be used as a salt.
 | 
			
		||||
 */
 | 
			
		||||
export function generatePseudoRandomSalt(): BigNumber {
 | 
			
		||||
    // BigNumber.random returns a pseudo-random number between 0 & 1 with a passed in number of decimal places.
 | 
			
		||||
    // Source: https://mikemcl.github.io/bignumber.js/#random
 | 
			
		||||
    const randomNumber = BigNumber.random(MAX_DIGITS_IN_UNSIGNED_256_INT);
 | 
			
		||||
    const factor = new BigNumber(10).pow(MAX_DIGITS_IN_UNSIGNED_256_INT - 1);
 | 
			
		||||
    const salt = randomNumber.times(factor).integerValue();
 | 
			
		||||
    const salt = generatePseudoRandom256BitNumber();
 | 
			
		||||
    return salt;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "3.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "3.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
 | 
			
		||||
 | 
			
		||||
CHANGELOG
 | 
			
		||||
 | 
			
		||||
## v3.0.4 - _February 9, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 | 
			
		||||
## v3.0.3 - _February 7, 2019_
 | 
			
		||||
 | 
			
		||||
    * Dependencies updated
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/order-watcher",
 | 
			
		||||
    "version": "3.0.3",
 | 
			
		||||
    "version": "3.0.4",
 | 
			
		||||
    "description": "An order watcher daemon that watches for order validity",
 | 
			
		||||
    "keywords": [
 | 
			
		||||
        "0x",
 | 
			
		||||
@@ -38,9 +38,9 @@
 | 
			
		||||
        "node": ">=6.0.0"
 | 
			
		||||
    },
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/migrations": "^3.0.3",
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/migrations": "^3.0.4",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/tslint-config": "^3.0.0",
 | 
			
		||||
        "@types/bintrees": "^1.0.2",
 | 
			
		||||
        "@types/lodash": "4.14.104",
 | 
			
		||||
@@ -63,19 +63,19 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.2",
 | 
			
		||||
        "@0x/assert": "^2.0.2",
 | 
			
		||||
        "@0x/base-contract": "^4.0.2",
 | 
			
		||||
        "@0x/abi-gen-wrappers": "^3.0.3",
 | 
			
		||||
        "@0x/assert": "^2.0.3",
 | 
			
		||||
        "@0x/base-contract": "^4.0.3",
 | 
			
		||||
        "@0x/contract-addresses": "^2.2.1",
 | 
			
		||||
        "@0x/contract-artifacts": "^1.3.0",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.0.2",
 | 
			
		||||
        "@0x/fill-scenarios": "^2.0.3",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.1.0",
 | 
			
		||||
        "@0x/fill-scenarios": "^2.0.4",
 | 
			
		||||
        "@0x/json-schemas": "^3.0.3",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/typescript-typings": "^4.0.0",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "bintrees": "^1.0.2",
 | 
			
		||||
        "ethereum-types": "^2.0.0",
 | 
			
		||||
        "ethereumjs-blockstream": "6.0.0",
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,35 @@
 | 
			
		||||
import { MigrationInterface, QueryRunner } from 'typeorm';
 | 
			
		||||
 | 
			
		||||
const tableNames = ['exchange_cancel_events', 'exchange_cancel_up_to_events', 'exchange_fill_events'];
 | 
			
		||||
 | 
			
		||||
const oldPrimaryColumns = ['contract_address', 'log_index', 'block_number'];
 | 
			
		||||
 | 
			
		||||
const newPrimaryColumns = ['transaction_hash'];
 | 
			
		||||
 | 
			
		||||
async function updatePrimaryKeysAsync(queryRunner: QueryRunner, columnNames: string[]): Promise<void> {
 | 
			
		||||
    for (const tableName of tableNames) {
 | 
			
		||||
        const table = await queryRunner.getTable(`raw.${tableName}`);
 | 
			
		||||
        if (table === undefined) {
 | 
			
		||||
            throw new Error(`Couldn't get table 'raw.${tableName}'`);
 | 
			
		||||
        }
 | 
			
		||||
        const columns = [];
 | 
			
		||||
        for (const columnName of columnNames) {
 | 
			
		||||
            const column = table.findColumnByName(columnName);
 | 
			
		||||
            if (column === undefined) {
 | 
			
		||||
                throw new Error(`Couldn't get column '${columnName}' from table 'raw.${tableName}'`);
 | 
			
		||||
            }
 | 
			
		||||
            columns.push(column);
 | 
			
		||||
        }
 | 
			
		||||
        await queryRunner.updatePrimaryKeys(table, columns);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class AddTxHashToExchangeEventPrimaryKey1549479172800 implements MigrationInterface {
 | 
			
		||||
    public async up(queryRunner: QueryRunner): Promise<any> {
 | 
			
		||||
        await updatePrimaryKeysAsync(queryRunner, oldPrimaryColumns.concat(newPrimaryColumns));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public async down(queryRunner: QueryRunner): Promise<any> {
 | 
			
		||||
        await updatePrimaryKeysAsync(queryRunner, oldPrimaryColumns);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,31 @@
 | 
			
		||||
import { MigrationInterface, QueryRunner } from 'typeorm';
 | 
			
		||||
 | 
			
		||||
const oldPrimaryColumns = ['token_address', 'log_index', 'block_number'];
 | 
			
		||||
 | 
			
		||||
const newPrimaryColumns = ['transaction_hash'];
 | 
			
		||||
 | 
			
		||||
async function updatePrimaryKeysAsync(queryRunner: QueryRunner, columnNames: string[]): Promise<void> {
 | 
			
		||||
    const table = await queryRunner.getTable(`raw.erc20_approval_events`);
 | 
			
		||||
    if (table === undefined) {
 | 
			
		||||
        throw new Error(`Couldn't get table 'raw.erc20_approval_events'`);
 | 
			
		||||
    }
 | 
			
		||||
    const columns = [];
 | 
			
		||||
    for (const columnName of columnNames) {
 | 
			
		||||
        const column = table.findColumnByName(columnName);
 | 
			
		||||
        if (column === undefined) {
 | 
			
		||||
            throw new Error(`Couldn't get column '${columnName}' from table 'raw.erc20_approval_events'`);
 | 
			
		||||
        }
 | 
			
		||||
        columns.push(column);
 | 
			
		||||
    }
 | 
			
		||||
    await queryRunner.updatePrimaryKeys(table, columns);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class AddTxHashToERC20ApprovalEventPrimaryKey1549499426238 implements MigrationInterface {
 | 
			
		||||
    public async up(queryRunner: QueryRunner): Promise<any> {
 | 
			
		||||
        await updatePrimaryKeysAsync(queryRunner, oldPrimaryColumns.concat(newPrimaryColumns));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public async down(queryRunner: QueryRunner): Promise<any> {
 | 
			
		||||
        await updatePrimaryKeysAsync(queryRunner, oldPrimaryColumns);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "@0x/pipeline",
 | 
			
		||||
    "version": "1.0.9",
 | 
			
		||||
    "version": "1.0.10",
 | 
			
		||||
    "private": true,
 | 
			
		||||
    "description": "Data pipeline for offline analysis",
 | 
			
		||||
    "scripts": {
 | 
			
		||||
@@ -39,16 +39,16 @@
 | 
			
		||||
        "typescript": "3.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "@0x/connect": "^4.0.3",
 | 
			
		||||
        "@0x/connect": "^4.0.4",
 | 
			
		||||
        "@0x/contract-addresses": "^2.2.1",
 | 
			
		||||
        "@0x/contract-artifacts": "^1.3.0",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.0.2",
 | 
			
		||||
        "@0x/dev-utils": "^2.0.2",
 | 
			
		||||
        "@0x/order-utils": "^6.0.1",
 | 
			
		||||
        "@0x/subproviders": "^3.0.2",
 | 
			
		||||
        "@0x/contract-wrappers": "^7.1.0",
 | 
			
		||||
        "@0x/dev-utils": "^2.1.0",
 | 
			
		||||
        "@0x/order-utils": "^6.1.0",
 | 
			
		||||
        "@0x/subproviders": "^3.0.3",
 | 
			
		||||
        "@0x/types": "^2.0.2",
 | 
			
		||||
        "@0x/utils": "^4.0.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^4.0.2",
 | 
			
		||||
        "@0x/utils": "^4.1.0",
 | 
			
		||||
        "@0x/web3-wrapper": "^5.0.0",
 | 
			
		||||
        "@types/dockerode": "^2.5.9",
 | 
			
		||||
        "@types/p-limit": "^2.0.0",
 | 
			
		||||
        "async-parallel": "^1.2.3",
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ export class ERC20ApprovalEvent {
 | 
			
		||||
    @Column({ name: 'raw_data' })
 | 
			
		||||
    public rawData!: string;
 | 
			
		||||
 | 
			
		||||
    @Column({ name: 'transaction_hash' })
 | 
			
		||||
    @PrimaryColumn({ name: 'transaction_hash' })
 | 
			
		||||
    public transactionHash!: string;
 | 
			
		||||
    @Column({ name: 'owner_address' })
 | 
			
		||||
    public ownerAddress!: string;
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ export class ExchangeCancelEvent {
 | 
			
		||||
    @Column({ name: 'raw_data' })
 | 
			
		||||
    public rawData!: string;
 | 
			
		||||
 | 
			
		||||
    @Column({ name: 'transaction_hash' })
 | 
			
		||||
    @PrimaryColumn({ name: 'transaction_hash' })
 | 
			
		||||
    public transactionHash!: string;
 | 
			
		||||
    @Column({ name: 'maker_address' })
 | 
			
		||||
    public makerAddress!: string;
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ export class ExchangeCancelUpToEvent {
 | 
			
		||||
    @Column({ name: 'raw_data' })
 | 
			
		||||
    public rawData!: string;
 | 
			
		||||
 | 
			
		||||
    @Column({ name: 'transaction_hash' })
 | 
			
		||||
    @PrimaryColumn({ name: 'transaction_hash' })
 | 
			
		||||
    public transactionHash!: string;
 | 
			
		||||
    @Column({ name: 'maker_address' })
 | 
			
		||||
    public makerAddress!: string;
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ export class ExchangeFillEvent {
 | 
			
		||||
    @Column({ name: 'raw_data' })
 | 
			
		||||
    public rawData!: string;
 | 
			
		||||
 | 
			
		||||
    @Column({ name: 'transaction_hash' })
 | 
			
		||||
    @PrimaryColumn({ name: 'transaction_hash' })
 | 
			
		||||
    public transactionHash!: string;
 | 
			
		||||
    @Column({ name: 'maker_address' })
 | 
			
		||||
    public makerAddress!: string;
 | 
			
		||||
 
 | 
			
		||||
@@ -112,15 +112,20 @@ async function saveIndividuallyWithFallbackAsync<T extends ExchangeEvent>(
 | 
			
		||||
    events: T[],
 | 
			
		||||
): Promise<void> {
 | 
			
		||||
    // Note(albrow): This is a temporary hack because `save` is not working as
 | 
			
		||||
    // documented and is causing a foreign key constraint violation. Hopefully
 | 
			
		||||
    // documented and is causing a primary key constraint violation. Hopefully
 | 
			
		||||
    // can remove later because this "poor man's upsert" implementation operates
 | 
			
		||||
    // on one event at a time and is therefore much slower.
 | 
			
		||||
    for (const event of events) {
 | 
			
		||||
        try {
 | 
			
		||||
            // First try an insert.
 | 
			
		||||
            await repository.insert(event);
 | 
			
		||||
        } catch {
 | 
			
		||||
            // If it fails, assume it was a foreign key constraint error and try
 | 
			
		||||
        } catch (err) {
 | 
			
		||||
            if (err.message.includes('duplicate key value violates unique constraint')) {
 | 
			
		||||
                logUtils.log("Ignore the preceeding INSERT failure; it's not unexpected");
 | 
			
		||||
            } else {
 | 
			
		||||
                throw err;
 | 
			
		||||
            }
 | 
			
		||||
            // If it fails, assume it was a primary key constraint error and try
 | 
			
		||||
            // doing an update instead.
 | 
			
		||||
            // Note(albrow): Unfortunately the `as any` hack here seems
 | 
			
		||||
            // required. I can't figure out how to convince the type-checker
 | 
			
		||||
@@ -132,6 +137,7 @@ async function saveIndividuallyWithFallbackAsync<T extends ExchangeEvent>(
 | 
			
		||||
                    contractAddress: event.contractAddress,
 | 
			
		||||
                    blockNumber: event.blockNumber,
 | 
			
		||||
                    logIndex: event.logIndex,
 | 
			
		||||
                    transactionHash: event.transactionHash,
 | 
			
		||||
                } as any,
 | 
			
		||||
                event as any,
 | 
			
		||||
            );
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1549733923,
 | 
			
		||||
        "version": "2.0.4",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Dependencies updated"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "2.0.3",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user