diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-03-09 00:43:16 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-03-09 00:43:16 +0800 |
commit | 098dae9a7e57385505f0f272fd76d44f43fa1e34 (patch) | |
tree | bcd47532910e5804746ec88c8d9f6b85c157d6e1 /packages/contracts | |
parent | 5b5037a844f49c17deeaf695fc8ed57832038da6 (diff) | |
parent | aaa7affa46450bb48639e9b90c2a2e8adb28826c (diff) | |
download | dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.gz dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.bz2 dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.lz dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.xz dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.tar.zst dexon-sol-tools-098dae9a7e57385505f0f272fd76d44f43fa1e34.zip |
Merge branch 'development' into feature/sra-reporter
* development: (68 commits)
Update list of packages and organize them alphabetically
Fix prettier issues
Add support for going back to previous hashes via the browser back button to wiki
Scroll to previous hashed elements when user clicks back button
Add back strict null checks to react-shared package and fix issues
remove ability to have implicit dependencies and add missing deps
update license
remove no-implicit-this
Add example & screenshot to npmignore
Remove `;` to be nice to windows users
Use unencoded @ symbol, browser will fix
Fix external type links
Add comment about commented out CSS exception
Update prettier since the previous version had a bug when dealing with css files
Fix css files with prettier
Added base-contract package to README
Prettify test jsons
Update yarn.lock
Improve README
Feedback
...
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/test/exchange/core.ts | 6 | ||||
-rw-r--r-- | packages/contracts/test/exchange/helpers.ts | 6 | ||||
-rw-r--r-- | packages/contracts/test/exchange/wrapper.ts | 6 | ||||
-rw-r--r-- | packages/contracts/test/token_transfer_proxy/transfer_from.ts | 2 | ||||
-rw-r--r-- | packages/contracts/test/unlimited_allowance_token.ts | 2 | ||||
-rw-r--r-- | packages/contracts/util/constants.ts | 6 |
6 files changed, 17 insertions, 11 deletions
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/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], }; |