diff options
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/package.json | 15 | ||||
-rw-r--r-- | packages/contracts/src/contracts/current/test/DummyERC20Token/DummyERC20Token.sol (renamed from packages/contracts/src/contracts/current/test/DummyToken/DummyToken.sol) | 14 | ||||
-rw-r--r-- | packages/contracts/src/contracts/current/test/MaliciousToken/MaliciousToken.sol | 49 | ||||
-rw-r--r-- | packages/contracts/src/contracts/current/test/Mintable/Mintable.sol | 2 | ||||
-rw-r--r-- | packages/contracts/src/utils/artifacts.ts | 6 | ||||
-rw-r--r-- | packages/contracts/src/utils/balances.ts | 6 | ||||
-rw-r--r-- | packages/contracts/src/utils/types.ts | 3 | ||||
-rw-r--r-- | packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts | 8 | ||||
-rw-r--r-- | packages/contracts/test/asset_proxy_dispatcher/proxies.ts | 8 | ||||
-rw-r--r-- | packages/contracts/test/exchange/core.ts | 20 | ||||
-rw-r--r-- | packages/contracts/test/exchange/helpers.ts | 6 | ||||
-rw-r--r-- | packages/contracts/test/exchange/wrapper.ts | 20 | ||||
-rw-r--r-- | packages/contracts/test/tutorials/arbitrage.ts | 4 | ||||
-rw-r--r-- | packages/contracts/test/unlimited_allowance_token.ts | 8 |
14 files changed, 61 insertions, 108 deletions
diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 78585e8e7..1efe31968 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -15,10 +15,13 @@ "test": "run-s build run_mocha", "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:comment": "Yarn workspaces do not link binaries correctly so we need to reference them directly https://github.com/yarnpkg/yarn/issues/3846", - "compile": "node ../deployer/lib/src/cli.js compile --contracts ${npm_package_config_contracts} --contracts-dir src/contracts --artifacts-dir ../migrations/src/artifacts", + "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 ../deployer/lib/src/cli.js compile --contracts ${npm_package_config_contracts} --contracts-dir src/contracts --artifacts-dir ../migrations/src/artifacts", "clean": "shx rm -rf ./lib", - "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'", + "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 . 'migrations/**/*.ts' 'test/**/*.ts' 'util/**/*.ts' 'deploy/**/*.ts'", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", @@ -26,8 +29,10 @@ "test:circleci": "yarn test:coverage" }, "config": { - "abis": "../migrations/src/artifacts/@(DummyToken|Exchange|TokenRegistry|MultiSigWallet|MultiSigWalletWithTimeLock|MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress|TokenRegistry|ZRXToken|AssetProxyDispatcher|ERC20Proxy|ERC721Proxy|DummyERC721Token|LibBytes).json", - "contracts": "Exchange,DummyToken,ZRXToken,Token,WETH9,MultiSigWallet,MultiSigWalletWithTimeLock,MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress,MaliciousToken,TokenRegistry,AssetProxyDispatcher,ERC20Proxy,ERC721Proxy,DummyERC721Token,LibBytes" + "abis": + "../migrations/src/artifacts/@(DummyERC20Token|Exchange|TokenRegistry|MultiSigWallet|MultiSigWalletWithTimeLock|MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress|TokenRegistry|ZRXToken|AssetProxyDispatcher|ERC20Proxy|ERC721Proxy|DummyERC721Token|LibBytes).json", + "contracts": + "Exchange,DummyERC20Token,ZRXToken,Token,WETH9,MultiSigWallet,MultiSigWalletWithTimeLock,MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress,MaliciousToken,TokenRegistry,AssetProxyDispatcher,ERC20Proxy,ERC721Proxy,DummyERC721Token,LibBytes" }, "repository": { "type": "git", diff --git a/packages/contracts/src/contracts/current/test/DummyToken/DummyToken.sol b/packages/contracts/src/contracts/current/test/DummyERC20Token/DummyERC20Token.sol index 8b29da919..2626399c2 100644 --- a/packages/contracts/src/contracts/current/test/DummyToken/DummyToken.sol +++ b/packages/contracts/src/contracts/current/test/DummyERC20Token/DummyERC20Token.sol @@ -21,16 +21,16 @@ pragma solidity ^0.4.21; import "../Mintable/Mintable.sol"; import "../../utils/Ownable/Ownable.sol"; -contract DummyToken is Mintable, Ownable { +contract DummyERC20Token is Mintable, Ownable { string public name; string public symbol; - uint public decimals; + uint256 public decimals; - function DummyToken( + function DummyERC20Token( string _name, string _symbol, - uint _decimals, - uint _totalSupply) + uint256 _decimals, + uint256 _totalSupply) public { name = _name; @@ -40,11 +40,11 @@ contract DummyToken is Mintable, Ownable { balances[msg.sender] = _totalSupply; } - function setBalance(address _target, uint _value) + function setBalance(address _target, uint256 _value) public onlyOwner { - uint currBalance = balanceOf(_target); + uint256 currBalance = balanceOf(_target); if (_value < currBalance) { totalSupply = safeSub(totalSupply, safeSub(currBalance, _value)); } else { diff --git a/packages/contracts/src/contracts/current/test/MaliciousToken/MaliciousToken.sol b/packages/contracts/src/contracts/current/test/MaliciousToken/MaliciousToken.sol deleted file mode 100644 index 3a0092276..000000000 --- a/packages/contracts/src/contracts/current/test/MaliciousToken/MaliciousToken.sol +++ /dev/null @@ -1,49 +0,0 @@ -/* - - Copyright 2018 ZeroEx Intl. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -pragma solidity ^0.4.21; - -import "../../tokens/ERC20Token/ERC20Token.sol"; - -contract MaliciousToken is ERC20Token { - uint8 stateToUpdate = 1; // Not null so that change only requires 5000 gas - - function updateState() - internal - { - stateToUpdate++; - } - - function balanceOf(address _owner) - public - constant - returns (uint) - { - updateState(); - return balances[_owner]; - } - - function allowance(address _owner, address _spender) - public - constant - returns (uint) - { - updateState(); - return allowed[_owner][_spender]; - } -} diff --git a/packages/contracts/src/contracts/current/test/Mintable/Mintable.sol b/packages/contracts/src/contracts/current/test/Mintable/Mintable.sol index 81cbd39dd..305737b72 100644 --- a/packages/contracts/src/contracts/current/test/Mintable/Mintable.sol +++ b/packages/contracts/src/contracts/current/test/Mintable/Mintable.sol @@ -26,7 +26,7 @@ import "../../utils/SafeMath/SafeMath.sol"; * Base contract that creates a mintable UnlimitedAllowanceToken */ contract Mintable is UnlimitedAllowanceToken, SafeMath { - function mint(uint _value) + function mint(uint256 _value) public { require(_value <= 100000000000000000000); diff --git a/packages/contracts/src/utils/artifacts.ts b/packages/contracts/src/utils/artifacts.ts index 87cc73cff..db52ef0d8 100644 --- a/packages/contracts/src/utils/artifacts.ts +++ b/packages/contracts/src/utils/artifacts.ts @@ -1,6 +1,5 @@ -import * as DummyTokenArtifact from '../artifacts/DummyToken.json'; +import * as DummyERC20TokenArtifact from '../artifacts/DummyERC20Token.json'; import * as ExchangeArtifact from '../artifacts/Exchange.json'; -import * as MaliciousTokenArtifact from '../artifacts/MaliciousToken.json'; import * as MultiSigWalletWithTimeLockArtifact from '../artifacts/MultiSigWalletWithTimeLock.json'; import * as MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddressArtifact from '../artifacts/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json'; import * as TokenArtifact from '../artifacts/Token.json'; @@ -12,12 +11,11 @@ import { Artifact } from './types'; export const artifacts = { ZRXArtifact: (ZRXArtifact as any) as Artifact, - DummyTokenArtifact: (DummyTokenArtifact as any) as Artifact, + DummyERC20TokenArtifact: (DummyERC20TokenArtifact as any) as Artifact, TokenArtifact: (TokenArtifact as any) as Artifact, ExchangeArtifact: (ExchangeArtifact as any) as Artifact, EtherTokenArtifact: (EtherTokenArtifact as any) as Artifact, TokenRegistryArtifact: (TokenRegistryArtifact as any) as Artifact, - MaliciousTokenArtifact: (MaliciousTokenArtifact as any) as Artifact, MultiSigWalletWithTimeLockArtifact: (MultiSigWalletWithTimeLockArtifact as any) as Artifact, MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddressArtifact: (MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddressArtifact as any) as Artifact, }; diff --git a/packages/contracts/src/utils/balances.ts b/packages/contracts/src/utils/balances.ts index 2ebc10313..40a59e815 100644 --- a/packages/contracts/src/utils/balances.ts +++ b/packages/contracts/src/utils/balances.ts @@ -2,14 +2,14 @@ import { BigNumber } from '@0xproject/utils'; import * as _ from 'lodash'; import * as Web3 from 'web3'; -import { DummyTokenContract } from '../contract_wrappers/generated/dummy_token'; +import { DummyERC20TokenContract } from '../contract_wrappers/generated/dummy_e_r_c20_token'; import { BalancesByOwner } from './types'; export class Balances { - private _tokenContractInstances: DummyTokenContract[]; + private _tokenContractInstances: DummyERC20TokenContract[]; private _ownerAddresses: string[]; - constructor(tokenContractInstances: DummyTokenContract[], ownerAddresses: string[]) { + constructor(tokenContractInstances: DummyERC20TokenContract[], ownerAddresses: string[]) { this._tokenContractInstances = tokenContractInstances; this._ownerAddresses = ownerAddresses; } diff --git a/packages/contracts/src/utils/types.ts b/packages/contracts/src/utils/types.ts index 7de167f27..69792b846 100644 --- a/packages/contracts/src/utils/types.ts +++ b/packages/contracts/src/utils/types.ts @@ -100,10 +100,9 @@ export enum ContractName { MultiSigWalletWithTimeLock = 'MultiSigWalletWithTimeLock', Exchange = 'Exchange', ZRXToken = 'ZRXToken', - DummyToken = 'DummyToken', + DummyERC20Token = 'DummyERC20Token', EtherToken = 'WETH9', MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress = 'MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress', - MaliciousToken = 'MaliciousToken', AccountLevels = 'AccountLevels', EtherDelta = 'EtherDelta', Arbitrage = 'Arbitrage', diff --git a/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts b/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts index 48312d4ee..a69a4238c 100644 --- a/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts +++ b/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts @@ -6,8 +6,8 @@ import * as chai from 'chai'; import * as Web3 from 'web3'; import { AssetProxyDispatcherContract } from '../../src/contract_wrappers/generated/asset_proxy_dispatcher'; +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 { DummyTokenContract } from '../../src/contract_wrappers/generated/dummy_token'; import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; import { proxyUtils } from '../../src/utils/asset_proxy_utils'; @@ -30,7 +30,7 @@ describe('AssetProxyDispatcher', () => { let tokenOwner: string; let makerAddress: string; let takerAddress: string; - let zrx: DummyTokenContract; + let zrx: DummyERC20TokenContract; let dmyBalances: Balances; let assetProxyDispatcher: AssetProxyDispatcherContract; let erc20Proxy: ERC20ProxyContract; @@ -68,8 +68,8 @@ describe('AssetProxyDispatcher', () => { from: owner, }); // Deploy zrx and set initial balances - const zrxInstance = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS); - zrx = new DummyTokenContract(zrxInstance.abi, zrxInstance.address, provider); + const zrxInstance = await deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS); + zrx = new DummyERC20TokenContract(zrxInstance.abi, zrxInstance.address, provider); await zrx.setBalance.sendTransactionAsync(makerAddress, INITIAL_BALANCE, { from: tokenOwner }); await zrx.setBalance.sendTransactionAsync(takerAddress, INITIAL_BALANCE, { from: tokenOwner }); dmyBalances = new Balances([zrx], [makerAddress, takerAddress]); diff --git a/packages/contracts/test/asset_proxy_dispatcher/proxies.ts b/packages/contracts/test/asset_proxy_dispatcher/proxies.ts index df585a68d..8b4f3faed 100644 --- a/packages/contracts/test/asset_proxy_dispatcher/proxies.ts +++ b/packages/contracts/test/asset_proxy_dispatcher/proxies.ts @@ -6,8 +6,8 @@ import * as chai from 'chai'; import * as Web3 from 'web3'; import { AssetProxyDispatcherContract } from '../../src/contract_wrappers/generated/asset_proxy_dispatcher'; +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 { DummyTokenContract } from '../../src/contract_wrappers/generated/dummy_token'; import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; import { proxyUtils } from '../../src/utils/asset_proxy_utils'; @@ -29,7 +29,7 @@ describe('Asset Transfer Proxies', () => { let tokenOwner: string; let makerAddress: string; let takerAddress: string; - let zrx: DummyTokenContract; + let zrx: DummyERC20TokenContract; let erc721Token: DummyERC721TokenContract; let dmyBalances: Balances; let erc20Proxy: ERC20ProxyContract; @@ -59,8 +59,8 @@ describe('Asset Transfer Proxies', () => { from: owner, }); // Deploy zrx and set initial balances - const zrxInstance = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS); - zrx = new DummyTokenContract(zrxInstance.abi, zrxInstance.address, provider); + const zrxInstance = await deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS); + zrx = new DummyERC20TokenContract(zrxInstance.abi, zrxInstance.address, provider); await zrx.setBalance.sendTransactionAsync(makerAddress, INITIAL_BALANCE, { from: tokenOwner }); await zrx.setBalance.sendTransactionAsync(takerAddress, INITIAL_BALANCE, { from: tokenOwner }); dmyBalances = new Balances([zrx], [makerAddress, takerAddress]); diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 482eb84e9..a33b06a12 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -8,8 +8,8 @@ import * as _ from 'lodash'; import * as Web3 from 'web3'; import { AssetProxyDispatcherContract } from '../../src/contract_wrappers/generated/asset_proxy_dispatcher'; +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 { DummyTokenContract } from '../../src/contract_wrappers/generated/dummy_token'; import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; import { @@ -49,9 +49,9 @@ describe('Exchange', () => { const INITIAL_BALANCE = ZeroEx.toBaseUnitAmount(new BigNumber(10000), 18); const INITIAL_ALLOWANCE = ZeroEx.toBaseUnitAmount(new BigNumber(10000), 18); - let rep: DummyTokenContract; - let dgd: DummyTokenContract; - let zrx: DummyTokenContract; + let rep: DummyERC20TokenContract; + let dgd: DummyERC20TokenContract; + let zrx: DummyERC20TokenContract; let erc721Token: DummyERC721TokenContract; let exchange: ExchangeContract; let assetProxyDispatcher: AssetProxyDispatcherContract; @@ -85,14 +85,14 @@ describe('Exchange', () => { [tokenOwner, takerAddress, feeRecipientAddress] = accounts; const owner = tokenOwner; const [repInstance, dgdInstance, zrxInstance, erc721TokenInstance] = await Promise.all([ - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), deployer.deployAsync(ContractName.DummyERC721Token, constants.DUMMY_ERC721TOKEN_ARGS), ]); - rep = new DummyTokenContract(repInstance.abi, repInstance.address, provider); - dgd = new DummyTokenContract(dgdInstance.abi, dgdInstance.address, provider); - zrx = new DummyTokenContract(zrxInstance.abi, zrxInstance.address, provider); + rep = new DummyERC20TokenContract(repInstance.abi, repInstance.address, provider); + dgd = new DummyERC20TokenContract(dgdInstance.abi, dgdInstance.address, provider); + zrx = new DummyERC20TokenContract(zrxInstance.abi, zrxInstance.address, provider); erc721Token = new DummyERC721TokenContract(erc721TokenInstance.abi, erc721TokenInstance.address, provider); // Deploy Asset Proxy Dispatcher const assetProxyDispatcherInstance = await deployer.deployAsync(ContractName.AssetProxyDispatcher); diff --git a/packages/contracts/test/exchange/helpers.ts b/packages/contracts/test/exchange/helpers.ts index 430305d8d..f758de1c9 100644 --- a/packages/contracts/test/exchange/helpers.ts +++ b/packages/contracts/test/exchange/helpers.ts @@ -36,9 +36,9 @@ describe('Exchange', () => { const owner = accounts[0]; const tokenRegistry = await deployer.deployAsync(ContractName.TokenRegistry); const [rep, dgd, zrx] = await Promise.all([ - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), ]); const assetProxyDispatcher = await deployer.deployAsync(ContractName.AssetProxyDispatcher); // Deploy and configure Exchange diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index 3023596ae..e6e2d7060 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -7,8 +7,8 @@ import * as _ from 'lodash'; import * as Web3 from 'web3'; import { AssetProxyDispatcherContract } from '../../src/contract_wrappers/generated/asset_proxy_dispatcher'; +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 { DummyTokenContract } from '../../src/contract_wrappers/generated/dummy_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'; @@ -36,9 +36,9 @@ describe('Exchange', () => { const INITIAL_BALANCE = ZeroEx.toBaseUnitAmount(new BigNumber(10000), 18); const INITIAL_ALLOWANCE = ZeroEx.toBaseUnitAmount(new BigNumber(10000), 18); - let rep: DummyTokenContract; - let dgd: DummyTokenContract; - let zrx: DummyTokenContract; + let rep: DummyERC20TokenContract; + let dgd: DummyERC20TokenContract; + let zrx: DummyERC20TokenContract; let erc721Token: DummyERC721TokenContract; let exchange: ExchangeContract; let tokenRegistry: TokenRegistryContract; @@ -64,14 +64,14 @@ describe('Exchange', () => { [makerAddress, takerAddress, feeRecipientAddress] = accounts; const owner = tokenOwner; const [repInstance, dgdInstance, zrxInstance, erc721TokenInstance] = await Promise.all([ - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), - deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), + deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS), deployer.deployAsync(ContractName.DummyERC721Token, constants.DUMMY_ERC721TOKEN_ARGS), ]); - rep = new DummyTokenContract(repInstance.abi, repInstance.address, provider); - dgd = new DummyTokenContract(dgdInstance.abi, dgdInstance.address, provider); - zrx = new DummyTokenContract(zrxInstance.abi, zrxInstance.address, provider); + rep = new DummyERC20TokenContract(repInstance.abi, repInstance.address, provider); + dgd = new DummyERC20TokenContract(dgdInstance.abi, dgdInstance.address, provider); + zrx = new DummyERC20TokenContract(zrxInstance.abi, zrxInstance.address, provider); erc721Token = new DummyERC721TokenContract(erc721TokenInstance.abi, erc721TokenInstance.address, provider); const tokenRegistryInstance = await deployer.deployAsync(ContractName.TokenRegistry); tokenRegistry = new TokenRegistryContract(tokenRegistryInstance.abi, tokenRegistryInstance.address, provider); diff --git a/packages/contracts/test/tutorials/arbitrage.ts b/packages/contracts/test/tutorials/arbitrage.ts index d8f777c8f..95bc421e1 100644 --- a/packages/contracts/test/tutorials/arbitrage.ts +++ b/packages/contracts/test/tutorials/arbitrage.ts @@ -54,8 +54,8 @@ // before(async () => { // const accounts = await web3Wrapper.getAvailableAddressesAsync(); // [coinbase, maker, edMaker, edFrontRunner] = accounts; -// weth = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS); -// zrx = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS); +// weth = await deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS); +// zrx = await deployer.deployAsync(ContractName.DummyERC20Token, 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 50d5c4d03..f2284685f 100644 --- a/packages/contracts/test/unlimited_allowance_token.ts +++ b/packages/contracts/test/unlimited_allowance_token.ts @@ -5,7 +5,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; import * as Web3 from 'web3'; -import { DummyTokenContract } from '../src/contract_wrappers/generated/dummy_token'; +import { DummyERC20TokenContract } from '../src/contract_wrappers/generated/dummy_e_r_c20_token'; import { constants } from '../src/utils/constants'; import { ContractName } from '../src/utils/types'; @@ -27,14 +27,14 @@ describe('UnlimitedAllowanceToken', () => { const MAX_MINT_VALUE = new BigNumber(100000000000000000000); let tokenAddress: string; - let token: DummyTokenContract; + let token: DummyERC20TokenContract; before(async () => { const accounts = await web3Wrapper.getAvailableAddressesAsync(); owner = accounts[0]; spender = accounts[1]; - const tokenInstance = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS); - token = new DummyTokenContract(tokenInstance.abi, tokenInstance.address, provider); + const tokenInstance = await deployer.deployAsync(ContractName.DummyERC20Token, constants.DUMMY_TOKEN_ARGS); + token = new DummyERC20TokenContract(tokenInstance.abi, tokenInstance.address, provider); await token.mint.sendTransactionAsync(MAX_MINT_VALUE, { from: owner }); tokenAddress = token.address; }); |