From cb754ee1253622974e751e4a8d723a424250c878 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 6 Jun 2018 15:39:38 +0200 Subject: move generated contract wrappers from `contract_wrappers/generated/` to `generated_contract_wrappers` in package with no non-generated contract wrappers --- .gitignore | 4 ++-- packages/0x.js/package.json | 10 +++++----- packages/contracts/package.json | 4 ++-- packages/contracts/src/utils/erc20_wrapper.ts | 4 ++-- packages/contracts/src/utils/erc721_wrapper.ts | 4 ++-- packages/contracts/src/utils/exchange_wrapper.ts | 2 +- packages/contracts/src/utils/match_order_tester.ts | 10 +++++----- packages/contracts/src/utils/multi_sig_wrapper.ts | 4 ++-- packages/contracts/src/utils/token_registry_wrapper.ts | 2 +- packages/contracts/test/asset_proxy/authorizable.ts | 2 +- packages/contracts/test/asset_proxy/proxies.ts | 8 ++++---- packages/contracts/test/asset_proxy_owner.ts | 4 ++-- packages/contracts/test/ether_token.ts | 2 +- packages/contracts/test/exchange/core.ts | 10 +++++----- packages/contracts/test/exchange/dispatcher.ts | 8 ++++---- packages/contracts/test/exchange/libs.ts | 2 +- packages/contracts/test/exchange/match_orders.ts | 10 +++++----- packages/contracts/test/exchange/signature_validator.ts | 2 +- packages/contracts/test/exchange/transactions.ts | 8 ++++---- packages/contracts/test/exchange/wrapper.ts | 12 ++++++------ packages/contracts/test/libraries/lib_bytes.ts | 2 +- packages/contracts/test/multi_sig_with_time_lock.ts | 2 +- packages/contracts/test/token_registry.ts | 2 +- packages/contracts/test/tutorials/arbitrage.ts | 12 ++++++------ packages/contracts/test/unlimited_allowance_token.ts | 2 +- packages/contracts/test/zrx_token.ts | 2 +- packages/website/ts/containers/zero_ex_js_documentation.ts | 3 +++ 27 files changed, 70 insertions(+), 67 deletions(-) diff --git a/.gitignore b/.gitignore index 73b18e3f4..ed7a7b252 100644 --- a/.gitignore +++ b/.gitignore @@ -80,8 +80,8 @@ packages/order-watcher/test/artifacts/ packages/contract-wrappers/test/artifacts/ # generated contract wrappers -packages/0x.js/src/contract_wrappers/generated/ -packages/contracts/src/contract_wrappers/generated/ +packages/0x.js/src/generated_contract_wrappers/ +packages/contracts/src/generated_contract_wrappers/ packages/contract-wrappers/src/contract_wrappers/generated/ packages/metacoin/src/contract_wrappers packages/fill-scenarios/src/generated_contract_wrappers/ diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 7ddfce610..430089bff 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -20,14 +20,14 @@ "build:all": "run-p build:umd:prod build:commonjs; exit 0;", "pre_build": "run-s generate_contract_wrappers copy_artifacts", "copy_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts", - "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'", + "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'", "lint": "tslint --project .", "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", - "clean": "shx rm -rf _bundles lib test_temp scripts src/contract_wrappers/generated", + "clean": "shx rm -rf _bundles lib test_temp scripts src/generated_contract_wrappers", "build:umd:prod": "NODE_ENV=production webpack", "build:commonjs": "tsc && copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", @@ -54,9 +54,9 @@ "../contract-wrappers/src/contract_wrappers/token_transfer_proxy_wrapper.ts", "../contract-wrappers/src/contract_wrappers/token_wrapper.ts", "../order-watcher/src/order_watcher/order_watcher.ts", - "./src/contract_wrappers/generated/ether_token.ts", - "./src/contract_wrappers/generated/token.ts", - "./src/contract_wrappers/generated/exchange.ts" + "./src/generated_contract_wrappers/ether_token.ts", + "./src/generated_contract_wrappers/token.ts", + "./src/generated_contract_wrappers/exchange.ts" ], "s3BucketPath": "s3://doc-jsons/0x.js/", "s3StagingBucketPath": "s3://staging-doc-jsons/0x.js/" diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 3b9fda227..dbb476b0c 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -20,9 +20,9 @@ "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov", "run_mocha": "mocha 'lib/test/**/*.js' --timeout 100000 --bail --exit", "compile": "sol-compiler", - "clean": "shx rm -rf lib src/contract_wrappers/generated", + "clean": "shx rm -rf lib src/generated_contract_wrappers", "generate_contract_wrappers": - "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'", + "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'", "lint": "tslint --project .", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", diff --git a/packages/contracts/src/utils/erc20_wrapper.ts b/packages/contracts/src/utils/erc20_wrapper.ts index dceeceeea..91c9d50b7 100644 --- a/packages/contracts/src/utils/erc20_wrapper.ts +++ b/packages/contracts/src/utils/erc20_wrapper.ts @@ -3,8 +3,8 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; -import { DummyERC20TokenContract } from '../contract_wrappers/generated/dummy_e_r_c20_token'; -import { ERC20ProxyContract } from '../contract_wrappers/generated/e_r_c20_proxy'; +import { DummyERC20TokenContract } from '../generated_contract_wrappers/dummy_e_r_c20_token'; +import { ERC20ProxyContract } from '../generated_contract_wrappers/e_r_c20_proxy'; import { artifacts } from './artifacts'; import { constants } from './constants'; diff --git a/packages/contracts/src/utils/erc721_wrapper.ts b/packages/contracts/src/utils/erc721_wrapper.ts index 13fdf630e..b20d9acd2 100644 --- a/packages/contracts/src/utils/erc721_wrapper.ts +++ b/packages/contracts/src/utils/erc721_wrapper.ts @@ -4,8 +4,8 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; -import { DummyERC721TokenContract } from '../contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC721ProxyContract } from '../contract_wrappers/generated/e_r_c721_proxy'; +import { DummyERC721TokenContract } from '../generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC721ProxyContract } from '../generated_contract_wrappers/e_r_c721_proxy'; import { artifacts } from './artifacts'; import { constants } from './constants'; diff --git a/packages/contracts/src/utils/exchange_wrapper.ts b/packages/contracts/src/utils/exchange_wrapper.ts index dd278e77c..ebc16dc00 100644 --- a/packages/contracts/src/utils/exchange_wrapper.ts +++ b/packages/contracts/src/utils/exchange_wrapper.ts @@ -4,7 +4,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { LogEntry, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; import * as _ from 'lodash'; -import { ExchangeContract } from '../contract_wrappers/generated/exchange'; +import { ExchangeContract } from '../generated_contract_wrappers/exchange'; import { constants } from './constants'; import { formatters } from './formatters'; diff --git a/packages/contracts/src/utils/match_order_tester.ts b/packages/contracts/src/utils/match_order_tester.ts index 6170188bc..8dafe16f3 100644 --- a/packages/contracts/src/utils/match_order_tester.ts +++ b/packages/contracts/src/utils/match_order_tester.ts @@ -7,15 +7,15 @@ import { LogWithDecodedArgs } from 'ethereum-types'; import ethUtil = require('ethereumjs-util'); import * as _ from 'lodash'; -import { DummyERC20TokenContract } from '../contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../contract_wrappers/generated/e_r_c721_proxy'; +import { DummyERC20TokenContract } from '../generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../generated_contract_wrappers/e_r_c721_proxy'; import { CancelContractEventArgs, ExchangeContract, FillContractEventArgs, -} from '../contract_wrappers/generated/exchange'; +} from '../generated_contract_wrappers/exchange'; import { chaiSetup } from '../utils/chai_setup'; import { constants } from '../utils/constants'; import { ERC20Wrapper } from '../utils/erc20_wrapper'; diff --git a/packages/contracts/src/utils/multi_sig_wrapper.ts b/packages/contracts/src/utils/multi_sig_wrapper.ts index 9971e8f6e..bcb31dac2 100644 --- a/packages/contracts/src/utils/multi_sig_wrapper.ts +++ b/packages/contracts/src/utils/multi_sig_wrapper.ts @@ -3,8 +3,8 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; import * as _ from 'lodash'; -import { AssetProxyOwnerContract } from '../contract_wrappers/generated/asset_proxy_owner'; -import { MultiSigWalletContract } from '../contract_wrappers/generated/multi_sig_wallet'; +import { AssetProxyOwnerContract } from '../generated_contract_wrappers/asset_proxy_owner'; +import { MultiSigWalletContract } from '../generated_contract_wrappers/multi_sig_wallet'; import { constants } from './constants'; import { LogDecoder } from './log_decoder'; diff --git a/packages/contracts/src/utils/token_registry_wrapper.ts b/packages/contracts/src/utils/token_registry_wrapper.ts index 240c06fdc..91895aa59 100644 --- a/packages/contracts/src/utils/token_registry_wrapper.ts +++ b/packages/contracts/src/utils/token_registry_wrapper.ts @@ -1,7 +1,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider } from 'ethereum-types'; -import { TokenRegistryContract } from '../contract_wrappers/generated/token_registry'; +import { TokenRegistryContract } from '../generated_contract_wrappers/token_registry'; import { Token } from './types'; diff --git a/packages/contracts/test/asset_proxy/authorizable.ts b/packages/contracts/test/asset_proxy/authorizable.ts index e8274acb1..6ceebf089 100644 --- a/packages/contracts/test/asset_proxy/authorizable.ts +++ b/packages/contracts/test/asset_proxy/authorizable.ts @@ -4,7 +4,7 @@ import * as chai from 'chai'; import 'make-promises-safe'; import * as Web3 from 'web3'; -import { MixinAuthorizableContract } from '../../src/contract_wrappers/generated/mixin_authorizable'; +import { MixinAuthorizableContract } from '../../src/generated_contract_wrappers/mixin_authorizable'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts index faab39759..39dfb9938 100644 --- a/packages/contracts/test/asset_proxy/proxies.ts +++ b/packages/contracts/test/asset_proxy/proxies.ts @@ -6,10 +6,10 @@ import * as chai from 'chai'; import * as _ from 'lodash'; import * as Web3 from 'web3'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; import { ERC20Wrapper } from '../../src/utils/erc20_wrapper'; diff --git a/packages/contracts/test/asset_proxy_owner.ts b/packages/contracts/test/asset_proxy_owner.ts index 4c16b5cff..9618e1905 100644 --- a/packages/contracts/test/asset_proxy_owner.ts +++ b/packages/contracts/test/asset_proxy_owner.ts @@ -12,8 +12,8 @@ import { ExecutionContractEventArgs, ExecutionFailureContractEventArgs, SubmissionContractEventArgs, -} from '../src/contract_wrappers/generated/asset_proxy_owner'; -import { MixinAuthorizableContract } from '../src/contract_wrappers/generated/mixin_authorizable'; +} from '../src/generated_contract_wrappers/asset_proxy_owner'; +import { MixinAuthorizableContract } from '../src/generated_contract_wrappers/mixin_authorizable'; import { artifacts } from '../src/utils/artifacts'; import { chaiSetup } from '../src/utils/chai_setup'; import { constants } from '../src/utils/constants'; diff --git a/packages/contracts/test/ether_token.ts b/packages/contracts/test/ether_token.ts index 4e52b658f..000ea6e46 100644 --- a/packages/contracts/test/ether_token.ts +++ b/packages/contracts/test/ether_token.ts @@ -4,7 +4,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; import 'make-promises-safe'; -import { WETH9Contract } from '../src/contract_wrappers/generated/weth9'; +import { WETH9Contract } from '../src/generated_contract_wrappers/weth9'; import { artifacts } from '../src/utils/artifacts'; import { chaiSetup } from '../src/utils/chai_setup'; import { constants } from '../src/utils/constants'; diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 91ead93f0..1201ef3d9 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -8,15 +8,15 @@ import { LogWithDecodedArgs } from 'ethereum-types'; import ethUtil = require('ethereumjs-util'); import 'make-promises-safe'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; import { CancelContractEventArgs, ExchangeContract, FillContractEventArgs, -} from '../../src/contract_wrappers/generated/exchange'; +} from '../../src/generated_contract_wrappers/exchange'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; diff --git a/packages/contracts/test/exchange/dispatcher.ts b/packages/contracts/test/exchange/dispatcher.ts index 8bc66e3cf..287bbfe31 100644 --- a/packages/contracts/test/exchange/dispatcher.ts +++ b/packages/contracts/test/exchange/dispatcher.ts @@ -5,10 +5,10 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import * as Web3 from 'web3'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; -import { TestAssetProxyDispatcherContract } from '../../src/contract_wrappers/generated/test_asset_proxy_dispatcher'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; +import { TestAssetProxyDispatcherContract } from '../../src/generated_contract_wrappers/test_asset_proxy_dispatcher'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts index 10cb8b34e..176ccb87d 100644 --- a/packages/contracts/test/exchange/libs.ts +++ b/packages/contracts/test/exchange/libs.ts @@ -5,7 +5,7 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import ethUtil = require('ethereumjs-util'); -import { TestLibsContract } from '../../src/contract_wrappers/generated/test_libs'; +import { TestLibsContract } from '../../src/generated_contract_wrappers/test_libs'; import { addressUtils } from '../../src/utils/address_utils'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/match_orders.ts b/packages/contracts/test/exchange/match_orders.ts index 24ee794bc..db757c393 100644 --- a/packages/contracts/test/exchange/match_orders.ts +++ b/packages/contracts/test/exchange/match_orders.ts @@ -8,15 +8,15 @@ import { LogWithDecodedArgs } from 'ethereum-types'; import ethUtil = require('ethereumjs-util'); import * as _ from 'lodash'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; import { CancelContractEventArgs, ExchangeContract, FillContractEventArgs, -} from '../../src/contract_wrappers/generated/exchange'; +} from '../../src/generated_contract_wrappers/exchange'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts index 936910ee9..5232d1486 100644 --- a/packages/contracts/test/exchange/signature_validator.ts +++ b/packages/contracts/test/exchange/signature_validator.ts @@ -5,7 +5,7 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import ethUtil = require('ethereumjs-util'); -import { TestSignatureValidatorContract } from '../../src/contract_wrappers/generated/test_signature_validator'; +import { TestSignatureValidatorContract } from '../../src/generated_contract_wrappers/test_signature_validator'; import { addressUtils } from '../../src/utils/address_utils'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts index f31053ad3..749412658 100644 --- a/packages/contracts/test/exchange/transactions.ts +++ b/packages/contracts/test/exchange/transactions.ts @@ -6,10 +6,10 @@ import * as chai from 'chai'; import * as ethUtil from 'ethereumjs-util'; import * as Web3 from 'web3'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange'; -import { WhitelistContract } from '../../src/contract_wrappers/generated/whitelist'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ExchangeContract } from '../../src/generated_contract_wrappers/exchange'; +import { WhitelistContract } from '../../src/generated_contract_wrappers/whitelist'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index 583ec9f91..330c0ba3f 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -8,12 +8,12 @@ import * as _ from 'lodash'; import 'make-promises-safe'; import * as Web3 from 'web3'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; -import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange'; -import { TokenRegistryContract } from '../../src/contract_wrappers/generated/token_registry'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; +import { ExchangeContract } from '../../src/generated_contract_wrappers/exchange'; +import { TokenRegistryContract } from '../../src/generated_contract_wrappers/token_registry'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; diff --git a/packages/contracts/test/libraries/lib_bytes.ts b/packages/contracts/test/libraries/lib_bytes.ts index 26cfa8291..c8aecea90 100644 --- a/packages/contracts/test/libraries/lib_bytes.ts +++ b/packages/contracts/test/libraries/lib_bytes.ts @@ -8,7 +8,7 @@ import { LogWithDecodedArgs, TransactionReceiptWithDecodedLogs } from 'ethereum- import ethUtil = require('ethereumjs-util'); import * as Web3 from 'web3'; -import { TestLibBytesContract } from '../../src/contract_wrappers/generated/test_lib_bytes'; +import { TestLibBytesContract } from '../../src/generated_contract_wrappers/test_lib_bytes'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; diff --git a/packages/contracts/test/multi_sig_with_time_lock.ts b/packages/contracts/test/multi_sig_with_time_lock.ts index 1302d0fa0..930ff485a 100644 --- a/packages/contracts/test/multi_sig_with_time_lock.ts +++ b/packages/contracts/test/multi_sig_with_time_lock.ts @@ -10,7 +10,7 @@ import * as Web3 from 'web3'; import { MultiSigWalletWithTimeLockContract, SubmissionContractEventArgs, -} from '../src/contract_wrappers/generated/multi_sig_wallet_with_time_lock'; +} from '../src/generated_contract_wrappers/multi_sig_wallet_with_time_lock'; import { artifacts } from '../src/utils/artifacts'; import { chaiSetup } from '../src/utils/chai_setup'; import { constants } from '../src/utils/constants'; diff --git a/packages/contracts/test/token_registry.ts b/packages/contracts/test/token_registry.ts index 64caac387..e996f4478 100644 --- a/packages/contracts/test/token_registry.ts +++ b/packages/contracts/test/token_registry.ts @@ -7,7 +7,7 @@ import * as _ from 'lodash'; import 'make-promises-safe'; import * as Web3 from 'web3'; -import { TokenRegistryContract } from '../src/contract_wrappers/generated/token_registry'; +import { TokenRegistryContract } from '../src/generated_contract_wrappers/token_registry'; import { artifacts } from '../src/utils/artifacts'; import { chaiSetup } from '../src/utils/chai_setup'; import { constants } from '../src/utils/constants'; diff --git a/packages/contracts/test/tutorials/arbitrage.ts b/packages/contracts/test/tutorials/arbitrage.ts index df01f31bb..32fcedb43 100644 --- a/packages/contracts/test/tutorials/arbitrage.ts +++ b/packages/contracts/test/tutorials/arbitrage.ts @@ -8,12 +8,12 @@ // import ethUtil = require('ethereumjs-util'); // import * as Web3 from 'web3'; -// import { AccountLevelsContract } from '../../src/contract_wrappers/generated/account_levels'; -// import { ArbitrageContract } from '../../src/contract_wrappers/generated/arbitrage'; -// import { DummyTokenContract } from '../../src/contract_wrappers/generated/dummy_token'; -// import { EtherDeltaContract } from '../../src/contract_wrappers/generated/ether_delta'; -// import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange'; -// import { TokenTransferProxyContract } from '../../src/contract_wrappers/generated/token_transfer_proxy'; +// import { AccountLevelsContract } from '../../src/generated_contract_wrappers/account_levels'; +// import { ArbitrageContract } from '../../src/generated_contract_wrappers/arbitrage'; +// import { DummyTokenContract } from '../../src/generated_contract_wrappers/dummy_token'; +// import { EtherDeltaContract } from '../../src/generated_contract_wrappers/ether_delta'; +// import { ExchangeContract } from '../../src/generated_contract_wrappers/exchange'; +// import { TokenTransferProxyContract } from '../../src/generated_contract_wrappers/token_transfer_proxy'; // import { artifacts } from '../../util/artifacts'; // import { Balances } from '../../util/balances'; // import { constants } from '../../util/constants'; diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts index b2acdebaa..92e9fc216 100644 --- a/packages/contracts/test/unlimited_allowance_token.ts +++ b/packages/contracts/test/unlimited_allowance_token.ts @@ -5,7 +5,7 @@ import * as chai from 'chai'; import 'make-promises-safe'; import * as Web3 from 'web3'; -import { DummyERC20TokenContract } from '../src/contract_wrappers/generated/dummy_e_r_c20_token'; +import { DummyERC20TokenContract } from '../src/generated_contract_wrappers/dummy_e_r_c20_token'; import { artifacts } from '../src/utils/artifacts'; import { chaiSetup } from '../src/utils/chai_setup'; import { constants } from '../src/utils/constants'; diff --git a/packages/contracts/test/zrx_token.ts b/packages/contracts/test/zrx_token.ts index fe37e802b..4493ff7a1 100644 --- a/packages/contracts/test/zrx_token.ts +++ b/packages/contracts/test/zrx_token.ts @@ -5,7 +5,7 @@ import * as chai from 'chai'; import 'make-promises-safe'; import * as Web3 from 'web3'; -import { ZRXTokenContract } from '../src/contract_wrappers/generated/zrx_token'; +import { ZRXTokenContract } from '../src/generated_contract_wrappers/zrx_token'; import { artifacts } from '../src/utils/artifacts'; import { chaiSetup } from '../src/utils/chai_setup'; import { constants } from '../src/utils/constants'; diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index f68e2335f..59f532b62 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -103,6 +103,9 @@ const docsInfoConfig: DocsInfoConfig = { '"0x.js/src/contract_wrappers/generated/ether_token"', '"0x.js/src/contract_wrappers/generated/token"', '"0x.js/src/contract_wrappers/generated/exchange"', + '"0x.js/src/generated_contract_wrappers/ether_token"', + '"0x.js/src/generated_contract_wrappers/token"', + '"0x.js/src/generated_contract_wrappers/exchange"', ], }, menuSubsectionToVersionWhenIntroduced: { -- cgit v1.2.3 From bd3b652cfca6258055ba52eae198dd2302f0c956 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 7 Jun 2018 13:15:13 +0200 Subject: Fixed path --- packages/0x.js/package.json | 2 +- packages/contracts/package.json | 2 +- packages/contracts/test/exchange/match_orders.ts | 10 +++++----- packages/contracts/test/exchange/wrapper.ts | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 997ecff1a..6dcd1b862 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -20,7 +20,7 @@ "build:all": "run-p build:umd:prod build:commonjs; exit 0;", "pre_build": "run-s generate_contract_wrappers copy_artifacts", "copy_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts", - "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers/generated --backend ethers", + "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", "lint": "tslint --project . --exclude **/src/contract_wrappers/generated/**/*", "test:circleci": "run-s test:coverage", "test": "yarn run_mocha", diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 145b5aacf..dc5732884 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -22,7 +22,7 @@ "compile": "sol-compiler", "clean": "shx rm -rf lib src/generated_contract_wrappers", "generate_contract_wrappers": - "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers/generated --backend ethers", + "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", "lint": "tslint --project . --exclude **/src/contract_wrappers/**/* --exclude **/lib/**/*", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", diff --git a/packages/contracts/test/exchange/match_orders.ts b/packages/contracts/test/exchange/match_orders.ts index 39e11fd46..aab3308ae 100644 --- a/packages/contracts/test/exchange/match_orders.ts +++ b/packages/contracts/test/exchange/match_orders.ts @@ -6,11 +6,11 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; import * as _ from 'lodash'; -import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/generated/e_r_c721_proxy'; -import { ExchangeContract } from '../../src/generated_contract_wrappers/generated/exchange'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; +import { ExchangeContract } from '../../src/generated_contract_wrappers/exchange'; import { artifacts } from '../../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index b5e8b4125..258e1ff81 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -7,11 +7,11 @@ import * as chai from 'chai'; import * as _ from 'lodash'; import 'make-promises-safe'; -import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/generated/e_r_c721_proxy'; -import { ExchangeContract } from '../../src/generated_contract_wrappers/generated/exchange'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; +import { ExchangeContract } from '../../src/generated_contract_wrappers/exchange'; import { artifacts } from '../../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; -- cgit v1.2.3 From 4f4acc04fe6a732b0c241cc9a37b59179d981769 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 7 Jun 2018 18:14:35 +0200 Subject: Fix missing paths --- .prettierignore | 4 ++-- packages/0x.js/package.json | 2 +- packages/contracts/test/asset_proxy/proxies.ts | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.prettierignore b/.prettierignore index f78ea1034..108c167b8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,9 +1,9 @@ lib .nyc_output -/packages/0x.js/src/contract_wrappers/generated/ -/packages/contracts/src/contract_wrappers/generated/ /packages/contract-wrappers/src/contract_wrappers/generated/ /packages/metacoin/src/contract_wrappers +/packages/0x.js/src/generated_contract_wrappers/ +/packages/contracts/src/generated_contract_wrappers/ /packages/fill-scenarios/src/generated_contract_wrappers/ /packages/order-watcher/src/generated_contract_wrappers/ /packages/order-utils/src/generated_contract_wrappers/ diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 6dcd1b862..77c57645d 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -21,7 +21,7 @@ "pre_build": "run-s generate_contract_wrappers copy_artifacts", "copy_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts", "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", - "lint": "tslint --project . --exclude **/src/contract_wrappers/generated/**/*", + "lint": "tslint --project . --exclude **/src/generated_contract_wrapper/**/*", "test:circleci": "run-s test:coverage", "test": "yarn run_mocha", "rebuild_and_test": "run-s build test", diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts index bf2aa8f70..d14280c5f 100644 --- a/packages/contracts/test/asset_proxy/proxies.ts +++ b/packages/contracts/test/asset_proxy/proxies.ts @@ -4,10 +4,10 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; -import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/generated/e_r_c721_proxy'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; -- cgit v1.2.3 From 18ed45597aedfd5135626c8e0c14509a2ad7dbbe Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 7 Jun 2018 18:58:51 +0200 Subject: Fix tslint issues --- packages/contracts/test/libraries/lib_bytes.ts | 2 +- packages/contracts/test/unlimited_allowance_token.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/contracts/test/libraries/lib_bytes.ts b/packages/contracts/test/libraries/lib_bytes.ts index 355e3603c..0996cdc84 100644 --- a/packages/contracts/test/libraries/lib_bytes.ts +++ b/packages/contracts/test/libraries/lib_bytes.ts @@ -6,7 +6,7 @@ import ethUtil = require('ethereumjs-util'); import { TestLibBytesContract } from '../../src/generated_contract_wrappers/test_lib_bytes'; import { artifacts } from '../../src/utils/artifacts'; -import { expectRevertOrAlwaysFailingTransactionAsync, expectRevertOrOtherErrorAsync } from '../../src/utils/assertions'; +import { expectRevertOrOtherErrorAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper'; diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts index 35315090b..0c3f5094b 100644 --- a/packages/contracts/test/unlimited_allowance_token.ts +++ b/packages/contracts/test/unlimited_allowance_token.ts @@ -5,7 +5,7 @@ import 'make-promises-safe'; import { DummyERC20TokenContract } from '../src/generated_contract_wrappers/dummy_e_r_c20_token'; import { artifacts } from '../src/utils/artifacts'; -import { expectRevertOrAlwaysFailingTransactionAsync, expectRevertOrOtherErrorAsync } from '../src/utils/assertions'; +import { expectRevertOrOtherErrorAsync } from '../src/utils/assertions'; import { chaiSetup } from '../src/utils/chai_setup'; import { constants } from '../src/utils/constants'; import { provider, txDefaults, web3Wrapper } from '../src/utils/web3_wrapper'; -- cgit v1.2.3