aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher
diff options
context:
space:
mode:
Diffstat (limited to 'packages/order-watcher')
-rw-r--r--packages/order-watcher/CHANGELOG.json18
-rw-r--r--packages/order-watcher/CHANGELOG.md8
-rw-r--r--packages/order-watcher/package.json49
-rw-r--r--packages/order-watcher/src/artifacts.ts18
-rw-r--r--packages/order-watcher/src/compact_artifacts/ERC20Token.json49
-rw-r--r--packages/order-watcher/src/compact_artifacts/ERC721Token.json71
-rw-r--r--packages/order-watcher/src/compact_artifacts/Exchange.json143
-rw-r--r--packages/order-watcher/src/compact_artifacts/WETH9.json100
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts6
9 files changed, 62 insertions, 400 deletions
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json
index a8eb2ae9e..08c1f7f58 100644
--- a/packages/order-watcher/CHANGELOG.json
+++ b/packages/order-watcher/CHANGELOG.json
@@ -1,5 +1,23 @@
[
{
+ "version": "1.0.1-rc.2",
+ "changes": [
+ {
+ "note": "Fixed bug caused by importing non-existent dep"
+ }
+ ],
+ "timestamp": 1532619515
+ },
+ {
+ "version": "1.0.1-rc.1",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ],
+ "timestamp": 1532605697
+ },
+ {
"timestamp": 1532357734,
"version": "1.0.0",
"changes": [
diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md
index d2ab44d6c..e5a2f15c5 100644
--- a/packages/order-watcher/CHANGELOG.md
+++ b/packages/order-watcher/CHANGELOG.md
@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.1-rc.2 - _July 26, 2018_
+
+ * Fixed bug caused by importing non-existent dep
+
+## v1.0.1-rc.1 - _July 26, 2018_
+
+ * Dependencies updated
+
## v1.0.0 - _July 23, 2018_
* Dependencies updated
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json
index 2fc177db5..e4226f017 100644
--- a/packages/order-watcher/package.json
+++ b/packages/order-watcher/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/order-watcher",
- "version": "1.0.0-rc.1",
+ "version": "1.0.1-rc.2",
"description": "An order watcher daemon that watches for order validity",
"keywords": [
"0x",
@@ -14,23 +14,22 @@
"scripts": {
"watch_without_deps": "yarn pre_build && tsc -w",
"build": "yarn pre_build && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
- "pre_build": "run-s update_test_artifacts update_compact_artifacts generate_contract_wrappers",
+ "pre_build": "run-s update_artifacts copy_artifacts generate_contract_wrappers",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
- "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
+ "generate_contract_wrappers": "abi-gen --abis 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"test:circleci": "run-s test:coverage",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s build test",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
- "update_compact_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts",
- "update_test_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/1.0.0/$i.json test/artifacts; done;",
+ "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts",
+ "update_artifacts": "for i in ${npm_package_config_contracts_v2_beta}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-beta-testnet/$i.json src/artifacts; done;",
"clean": "shx rm -rf _bundles lib test_temp scripts test/artifacts src/generated_contract_wrappers",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"config": {
- "compact_artifacts": "Exchange DummyToken ZRXToken Token EtherToken TokenTransferProxy TokenRegistry",
- "contracts": "Exchange DummyToken ZRXToken Token WETH9 TokenTransferProxy_v1 MultiSigWallet MultiSigWalletWithTimeLock MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress MaliciousToken TokenRegistry Arbitrage EtherDelta AccountLevels"
+ "contracts_v2_beta": "Exchange WETH9 ERC20Token ERC721Token"
},
"repository": {
"type": "git",
@@ -41,12 +40,12 @@
"node": ">=6.0.0"
},
"devDependencies": {
- "@0xproject/abi-gen": "^1.0.0",
- "@0xproject/dev-utils": "^1.0.0",
- "@0xproject/migrations": "^1.0.0",
- "@0xproject/monorepo-scripts": "^1.0.0",
- "@0xproject/sol-compiler": "^1.0.0",
- "@0xproject/tslint-config": "^1.0.0",
+ "@0xproject/abi-gen": "^1.0.4",
+ "@0xproject/dev-utils": "^1.0.3",
+ "@0xproject/migrations": "^1.0.3",
+ "@0xproject/monorepo-scripts": "^1.0.4",
+ "@0xproject/sol-compiler": "^1.0.4",
+ "@0xproject/tslint-config": "^1.0.4",
"@types/bintrees": "^1.0.2",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
@@ -71,19 +70,19 @@
"typescript": "2.7.1"
},
"dependencies": {
- "@0xproject/assert": "^1.0.0",
- "@0xproject/base-contract": "^1.0.0",
- "@0xproject/contract-wrappers": "^1.0.0-rc.1",
- "@0xproject/fill-scenarios": "^1.0.0-rc.1",
- "@0xproject/json-schemas": "^1.0.0-rc.1",
- "@0xproject/order-utils": "^1.0.0-rc.1",
- "@0xproject/types": "^1.0.0-rc.1",
- "@0xproject/typescript-typings": "^1.0.0",
- "@0xproject/utils": "^1.0.0",
- "@0xproject/web3-wrapper": "^1.0.0",
- "ethereumjs-blockstream": "5.0.0",
- "ethereum-types": "^1.0.0",
+ "@0xproject/assert": "^1.0.4",
+ "@0xproject/base-contract": "^1.0.4",
+ "@0xproject/contract-wrappers": "^1.0.1-rc.2",
+ "@0xproject/fill-scenarios": "^1.0.1-rc.2",
+ "@0xproject/json-schemas": "^1.0.1-rc.3",
+ "@0xproject/order-utils": "^1.0.1-rc.2",
+ "@0xproject/types": "^1.0.1-rc.3",
+ "@0xproject/typescript-typings": "^1.0.3",
+ "@0xproject/utils": "^1.0.4",
+ "@0xproject/web3-wrapper": "^1.1.2",
"bintrees": "^1.0.2",
+ "ethereum-types": "^1.0.3",
+ "ethereumjs-blockstream": "5.0.0",
"ethers": "3.0.22",
"lodash": "^4.17.4"
},
diff --git a/packages/order-watcher/src/artifacts.ts b/packages/order-watcher/src/artifacts.ts
index 4732fb2b5..d47e619c2 100644
--- a/packages/order-watcher/src/artifacts.ts
+++ b/packages/order-watcher/src/artifacts.ts
@@ -1,13 +1,13 @@
-import { Artifact } from '@0xproject/types';
+import { ContractArtifact } from '@0xproject/sol-compiler';
-import * as ERC20Token from './compact_artifacts/ERC20Token.json';
-import * as ERC721Token from './compact_artifacts/ERC721Token.json';
-import * as Exchange from './compact_artifacts/Exchange.json';
-import * as WETH9 from './compact_artifacts/WETH9.json';
+import * as ERC20Token from './artifacts/ERC20Token.json';
+import * as ERC721Token from './artifacts/ERC721Token.json';
+import * as Exchange from './artifacts/Exchange.json';
+import * as WETH9 from './artifacts/WETH9.json';
export const artifacts = {
- ERC20Token: (ERC20Token as any) as Artifact,
- ERC721Token: (ERC721Token as any) as Artifact,
- Exchange: (Exchange as any) as Artifact,
- EtherToken: (WETH9 as any) as Artifact,
+ ERC20Token: (ERC20Token as any) as ContractArtifact,
+ ERC721Token: (ERC721Token as any) as ContractArtifact,
+ Exchange: (Exchange as any) as ContractArtifact,
+ EtherToken: (WETH9 as any) as ContractArtifact,
};
diff --git a/packages/order-watcher/src/compact_artifacts/ERC20Token.json b/packages/order-watcher/src/compact_artifacts/ERC20Token.json
deleted file mode 100644
index 8d60fa324..000000000
--- a/packages/order-watcher/src/compact_artifacts/ERC20Token.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "contract_name": "ERC20Token",
- "abi": [
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_from",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_to",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_spender",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- }
- ]
-}
diff --git a/packages/order-watcher/src/compact_artifacts/ERC721Token.json b/packages/order-watcher/src/compact_artifacts/ERC721Token.json
deleted file mode 100644
index 5934376d3..000000000
--- a/packages/order-watcher/src/compact_artifacts/ERC721Token.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- "contract_name": "ERC721Token",
- "abi": [
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_from",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_to",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_tokenId",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_approved",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_tokenId",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_operator",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_approved",
- "type": "bool"
- }
- ],
- "name": "ApprovalForAll",
- "type": "event"
- }
- ]
-}
diff --git a/packages/order-watcher/src/compact_artifacts/Exchange.json b/packages/order-watcher/src/compact_artifacts/Exchange.json
deleted file mode 100644
index 4e319f7cf..000000000
--- a/packages/order-watcher/src/compact_artifacts/Exchange.json
+++ /dev/null
@@ -1,143 +0,0 @@
-{
- "contract_name": "Exchange",
- "abi": [
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "makerAddress",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "feeRecipientAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "takerAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "senderAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "makerAssetFilledAmount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "takerAssetFilledAmount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "makerFeePaid",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "takerFeePaid",
- "type": "uint256"
- },
- {
- "indexed": true,
- "name": "orderHash",
- "type": "bytes32"
- },
- {
- "indexed": false,
- "name": "makerAssetData",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "takerAssetData",
- "type": "bytes"
- }
- ],
- "name": "Fill",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "makerAddress",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "feeRecipientAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "senderAddress",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "orderHash",
- "type": "bytes32"
- },
- {
- "indexed": false,
- "name": "makerAssetData",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "takerAssetData",
- "type": "bytes"
- }
- ],
- "name": "Cancel",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "makerAddress",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "senderAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "orderEpoch",
- "type": "uint256"
- }
- ],
- "name": "CancelUpTo",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0x12459c951127e0c374ff9105dda097662a027093"
- },
- "3": {
- "address": "0x479cc461fecd078f766ecc58533d6f69580cf3ac"
- },
- "4": {
- "address": "0x1d16ef40fac01cec8adac2ac49427b9384192c05"
- },
- "42": {
- "address": "0x90fe2af704b34e0224bf2299c838e04d4dcf1364"
- },
- "50": {
- "address": "0x48bacb9266a570d521063ef5dd96e61686dbe788"
- }
- }
-}
diff --git a/packages/order-watcher/src/compact_artifacts/WETH9.json b/packages/order-watcher/src/compact_artifacts/WETH9.json
deleted file mode 100644
index f635276a1..000000000
--- a/packages/order-watcher/src/compact_artifacts/WETH9.json
+++ /dev/null
@@ -1,100 +0,0 @@
-{
- "contract_name": "WETH9",
- "abi": [
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_from",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_to",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_spender",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Deposit",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Withdrawal",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- },
- "3": {
- "address": "0xc00fd9820cd2898cc4c054b7bf142de637ad129a"
- },
- "4": {
- "address": "0xc778417e063141139fce010982780140aa0cd5ab"
- },
- "42": {
- "address": "0x653e49e301e508a13237c0ddc98ae7d4cd2667a1"
- },
- "50": {
- "address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c"
- }
- }
-}
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index 2dfbd4230..e2d6fc270 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -102,9 +102,9 @@ export class OrderWatcher {
this._provider = provider;
this._collisionResistantAbiDecoder = new CollisionResistanceAbiDecoder(
- artifacts.ERC20Token.abi,
- artifacts.ERC721Token.abi,
- [artifacts.EtherToken.abi, artifacts.Exchange.abi],
+ artifacts.ERC20Token.compilerOutput.abi,
+ artifacts.ERC721Token.compilerOutput.abi,
+ [artifacts.EtherToken.compilerOutput.abi, artifacts.Exchange.compilerOutput.abi],
);
const contractWrappers = new ContractWrappers(provider, { networkId });
this._eventWatcher = new EventWatcher(provider, config.eventPollingIntervalMs, STATE_LAYER, config.isVerbose);