aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-12 01:11:27 +0800
committerGitHub <noreply@github.com>2018-05-12 01:11:27 +0800
commit6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b (patch)
tree8d374bf8f4f70a40d75c8bf4b35fe9a169250909 /packages/contracts
parentf42f608f3f97a5244f09f17ae5ee184c0f775de3 (diff)
parentad8e12eeaebd40fdafac7cbef96121d4454909df (diff)
downloaddexon-0x-contracts-6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b.tar.gz
dexon-0x-contracts-6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b.tar.zst
dexon-0x-contracts-6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b.zip
Merge pull request #579 from 0xProject/breakUp0xjs
Split 0x.js into: contract-wrappers & order-watcher
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/package.json4
-rw-r--r--packages/contracts/test/ether_token.ts6
-rw-r--r--packages/contracts/test/multi_sig_with_time_lock_except_remove_auth_addr.ts1
-rw-r--r--packages/contracts/test/tutorials/arbitrage.ts3
4 files changed, 8 insertions, 6 deletions
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 9e082a6de..557effca2 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -9,7 +9,7 @@
},
"scripts": {
"build:watch": "tsc -w",
- "prebuild": "run-s clean compile copy_artifacts generate_contract_wrappers",
+ "prebuild": "run-s clean copy_artifacts generate_contract_wrappers",
"copy_artifacts": "copyfiles -u 4 '../migrations/artifacts/1.0.0/**/*' ./lib/src/artifacts;",
"build": "tsc",
"test": "run-s build run_mocha",
@@ -17,7 +17,7 @@
"run_mocha": "mocha 'lib/test/**/*.js' --timeout 100000 --bail --exit",
"compile:comment": "Yarn workspaces do not link binaries correctly so we need to reference them directly https://github.com/yarnpkg/yarn/issues/3846",
"compile": "node ../sol-compiler/lib/src/cli.js",
- "clean": "shx rm -rf ./lib",
+ "clean": "shx rm -rf lib src/contract_wrappers/generated",
"generate_contract_wrappers": "node ../abi-gen/lib/index.js --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'",
"lint": "tslint --project .",
"coverage:report:text": "istanbul report text",
diff --git a/packages/contracts/test/ether_token.ts b/packages/contracts/test/ether_token.ts
index f80f2159e..4eb901dc7 100644
--- a/packages/contracts/test/ether_token.ts
+++ b/packages/contracts/test/ether_token.ts
@@ -1,4 +1,4 @@
-import { ZeroEx, ZeroExError } from '0x.js';
+import { ContractWrappersError, ZeroEx } from '0x.js';
import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber, promisify } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
@@ -45,7 +45,7 @@ describe('EtherToken', () => {
const ethToDeposit = initEthBalance.plus(1);
return expect(zeroEx.etherToken.depositAsync(etherTokenAddress, ethToDeposit, account)).to.be.rejectedWith(
- ZeroExError.InsufficientEthBalanceForDeposit,
+ ContractWrappersError.InsufficientEthBalanceForDeposit,
);
});
@@ -74,7 +74,7 @@ describe('EtherToken', () => {
return expect(
zeroEx.etherToken.withdrawAsync(etherTokenAddress, ethTokensToWithdraw, account),
- ).to.be.rejectedWith(ZeroExError.InsufficientWEthBalanceForWithdrawal);
+ ).to.be.rejectedWith(ContractWrappersError.InsufficientWEthBalanceForWithdrawal);
});
it('should convert ether tokens to ether with sufficient balance', async () => {
diff --git a/packages/contracts/test/multi_sig_with_time_lock_except_remove_auth_addr.ts b/packages/contracts/test/multi_sig_with_time_lock_except_remove_auth_addr.ts
index 1c2ddea87..775d43d22 100644
--- a/packages/contracts/test/multi_sig_with_time_lock_except_remove_auth_addr.ts
+++ b/packages/contracts/test/multi_sig_with_time_lock_except_remove_auth_addr.ts
@@ -17,6 +17,7 @@ import { ContractName, SubmissionContractEventArgs, TransactionDataParams } from
import { chaiSetup } from './utils/chai_setup';
import { provider, txDefaults, web3Wrapper } from './utils/web3_wrapper';
+
const PROXY_ABI = artifacts.TokenTransferProxy.compilerOutput.abi;
const MUTISIG_WALLET_WITH_TIME_LOCK_EXCEPT_REMOVE_AUTHORIZED_ADDRESS_ABI =
artifacts.MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.compilerOutput.abi;
diff --git a/packages/contracts/test/tutorials/arbitrage.ts b/packages/contracts/test/tutorials/arbitrage.ts
index aa86ecd43..3d07a55a2 100644
--- a/packages/contracts/test/tutorials/arbitrage.ts
+++ b/packages/contracts/test/tutorials/arbitrage.ts
@@ -1,5 +1,6 @@
import { ECSignature, SignedOrder, ZeroEx } from '0x.js';
import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
+import { ExchangeContractErrs } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
@@ -18,7 +19,7 @@ import { constants } from '../../util/constants';
import { crypto } from '../../util/crypto';
import { ExchangeWrapper } from '../../util/exchange_wrapper';
import { OrderFactory } from '../../util/order_factory';
-import { BalancesByOwner, ContractName, ExchangeContractErrs } from '../../util/types';
+import { BalancesByOwner, ContractName } from '../../util/types';
import { chaiSetup } from '../utils/chai_setup';
import { provider, txDefaults, web3Wrapper } from '../utils/web3_wrapper';