aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorTom Schmidt <imtomhschmidt@gmail.com>2018-03-10 07:22:59 +0800
committerGitHub <noreply@github.com>2018-03-10 07:22:59 +0800
commit47af38ecb8d59789af9db2079e18ee0b6e589786 (patch)
treeabd75e02d19d7c2e9c7b8df1ebe7152e2d364a40 /packages/contracts
parent654c790c3df3ee857952a1023761f186bb9c777d (diff)
parent7116f100ee194f46d0e34782afa8f680791adc9c (diff)
downloaddexon-sol-tools-47af38ecb8d59789af9db2079e18ee0b6e589786.tar
dexon-sol-tools-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.gz
dexon-sol-tools-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.bz2
dexon-sol-tools-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.lz
dexon-sol-tools-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.xz
dexon-sol-tools-47af38ecb8d59789af9db2079e18ee0b6e589786.tar.zst
dexon-sol-tools-47af38ecb8d59789af9db2079e18ee0b6e589786.zip
Merge branch 'development' into feature/website/web3-logging
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/package.json16
-rw-r--r--packages/contracts/test/exchange/core.ts6
-rw-r--r--packages/contracts/test/exchange/helpers.ts6
-rw-r--r--packages/contracts/test/exchange/wrapper.ts6
-rw-r--r--packages/contracts/test/token_transfer_proxy/transfer_from.ts2
-rw-r--r--packages/contracts/test/tutorials/arbitrage.ts4
-rw-r--r--packages/contracts/test/unlimited_allowance_token.ts2
-rw-r--r--packages/contracts/util/constants.ts6
8 files changed, 27 insertions, 21 deletions
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 0d084a542..3f7c70c02 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "contracts",
- "version": "2.1.14",
+ "version": "2.1.15",
"description": "Smart contract components of 0x protocol",
"main": "index.js",
"directories": {
@@ -36,7 +36,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
"devDependencies": {
- "@0xproject/dev-utils": "^0.2.0",
+ "@0xproject/dev-utils": "^0.2.1",
"@0xproject/tslint-config": "^0.4.10",
"@types/bluebird": "^3.5.3",
"@types/lodash": "^4.14.86",
@@ -63,12 +63,12 @@
"yargs": "^10.0.3"
},
"dependencies": {
- "0x.js": "^0.33.0",
- "@0xproject/deployer": "^0.2.0",
- "@0xproject/json-schemas": "^0.7.13",
- "@0xproject/types": "^0.3.0",
- "@0xproject/utils": "^0.4.0",
- "@0xproject/web3-wrapper": "^0.2.0",
+ "0x.js": "^0.33.1",
+ "@0xproject/deployer": "^0.2.1",
+ "@0xproject/json-schemas": "^0.7.14",
+ "@0xproject/types": "^0.3.1",
+ "@0xproject/utils": "^0.4.1",
+ "@0xproject/web3-wrapper": "^0.2.1",
"bluebird": "^3.5.0",
"bn.js": "^4.11.8",
"ethereumjs-abi": "^0.6.4",
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts
index 303d745aa..710d6fe94 100644
--- a/packages/contracts/test/exchange/core.ts
+++ b/packages/contracts/test/exchange/core.ts
@@ -56,9 +56,9 @@ describe('Exchange', () => {
maker = accounts[0];
[tokenOwner, taker, feeRecipient] = accounts;
const [repInstance, dgdInstance, zrxInstance] = await Promise.all([
- deployer.deployAsync(ContractName.DummyToken),
- deployer.deployAsync(ContractName.DummyToken),
- deployer.deployAsync(ContractName.DummyToken),
+ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
+ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
+ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
]);
rep = new DummyTokenContract(web3Wrapper, repInstance.abi, repInstance.address);
dgd = new DummyTokenContract(web3Wrapper, dgdInstance.abi, dgdInstance.address);
diff --git a/packages/contracts/test/exchange/helpers.ts b/packages/contracts/test/exchange/helpers.ts
index 9869c2155..625234729 100644
--- a/packages/contracts/test/exchange/helpers.ts
+++ b/packages/contracts/test/exchange/helpers.ts
@@ -39,9 +39,9 @@ describe('Exchange', () => {
const tokenRegistry = await deployer.deployAsync(ContractName.TokenRegistry);
const tokenTransferProxy = await deployer.deployAsync(ContractName.TokenTransferProxy);
const [rep, dgd, zrx] = await Promise.all([
- deployer.deployAsync(ContractName.DummyToken),
- deployer.deployAsync(ContractName.DummyToken),
- deployer.deployAsync(ContractName.DummyToken),
+ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
+ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
+ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
]);
const exchangeInstance = await deployer.deployAsync(ContractName.Exchange, [
zrx.address,
diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts
index 4ea40cb59..239f13a4f 100644
--- a/packages/contracts/test/exchange/wrapper.ts
+++ b/packages/contracts/test/exchange/wrapper.ts
@@ -56,9 +56,9 @@ describe('Exchange', () => {
tokenOwner = accounts[0];
[maker, taker, feeRecipient] = accounts;
const [repInstance, dgdInstance, zrxInstance] = await Promise.all([
- deployer.deployAsync(ContractName.DummyToken),
- deployer.deployAsync(ContractName.DummyToken),
- deployer.deployAsync(ContractName.DummyToken),
+ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
+ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
+ deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
]);
rep = new DummyTokenContract(web3Wrapper, repInstance.abi, repInstance.address);
dgd = new DummyTokenContract(web3Wrapper, dgdInstance.abi, dgdInstance.address);
diff --git a/packages/contracts/test/token_transfer_proxy/transfer_from.ts b/packages/contracts/test/token_transfer_proxy/transfer_from.ts
index 6b86a0e97..a77590288 100644
--- a/packages/contracts/test/token_transfer_proxy/transfer_from.ts
+++ b/packages/contracts/test/token_transfer_proxy/transfer_from.ts
@@ -38,7 +38,7 @@ describe('TokenTransferProxy', () => {
tokenTransferProxyInstance.abi,
tokenTransferProxyInstance.address,
);
- const repInstance = await deployer.deployAsync(ContractName.DummyToken);
+ const repInstance = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS);
rep = new DummyTokenContract(web3Wrapper, repInstance.abi, repInstance.address);
dmyBalances = new Balances([rep], [accounts[0], accounts[1]]);
diff --git a/packages/contracts/test/tutorials/arbitrage.ts b/packages/contracts/test/tutorials/arbitrage.ts
index 2bafbff0b..055fe9687 100644
--- a/packages/contracts/test/tutorials/arbitrage.ts
+++ b/packages/contracts/test/tutorials/arbitrage.ts
@@ -55,8 +55,8 @@ describe('Arbitrage', () => {
before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
[coinbase, maker, edMaker, edFrontRunner] = accounts;
- weth = await deployer.deployAsync(ContractName.DummyToken);
- zrx = await deployer.deployAsync(ContractName.DummyToken);
+ weth = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS);
+ zrx = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS);
const accountLevels = await deployer.deployAsync(ContractName.AccountLevels);
const edAdminAddress = accounts[0];
const edMakerFee = 0;
diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts
index 03eb581ad..553178d80 100644
--- a/packages/contracts/test/unlimited_allowance_token.ts
+++ b/packages/contracts/test/unlimited_allowance_token.ts
@@ -34,7 +34,7 @@ describe('UnlimitedAllowanceToken', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = accounts[0];
spender = accounts[1];
- const tokenInstance = await deployer.deployAsync(ContractName.DummyToken);
+ const tokenInstance = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS);
token = new DummyTokenContract(web3Wrapper, tokenInstance.abi, tokenInstance.address);
await token.mint.sendTransactionAsync(MAX_MINT_VALUE, { from: owner });
tokenAddress = token.address;
diff --git a/packages/contracts/util/constants.ts b/packages/contracts/util/constants.ts
index e61b2f802..9bb090a2a 100644
--- a/packages/contracts/util/constants.ts
+++ b/packages/contracts/util/constants.ts
@@ -1,3 +1,8 @@
+const DUMMY_TOKEN_NAME = '';
+const DUMMY_TOKEN_SYMBOL = '';
+const DUMMY_TOKEN_DECIMALS = 18;
+const DUMMY_TOKEN_TOTAL_SUPPLY = 0;
+
export const constants = {
NULL_BYTES: '0x',
INVALID_OPCODE: 'invalid opcode',
@@ -6,4 +11,5 @@ export const constants = {
MAX_ETHERTOKEN_WITHDRAW_GAS: 43000,
MAX_TOKEN_TRANSFERFROM_GAS: 80000,
MAX_TOKEN_APPROVE_GAS: 60000,
+ DUMMY_TOKEN_ARGS: [DUMMY_TOKEN_NAME, DUMMY_TOKEN_SYMBOL, DUMMY_TOKEN_DECIMALS, DUMMY_TOKEN_TOTAL_SUPPLY],
};