aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/token_transfer_proxy
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-05-08 04:11:09 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-05-10 23:46:57 +0800
commit3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4 (patch)
tree5cff4a892b4094b972b59f119cb2998088fcea76 /packages/contracts/test/token_transfer_proxy
parentc64ad1af28ef116e210aafb3ea6ad2138361cd7c (diff)
downloaddexon-0x-contracts-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.gz
dexon-0x-contracts-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.zst
dexon-0x-contracts-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.zip
Remove deployer from metacoin and contract tests
Diffstat (limited to 'packages/contracts/test/token_transfer_proxy')
-rw-r--r--packages/contracts/test/token_transfer_proxy/auth.ts12
-rw-r--r--packages/contracts/test/token_transfer_proxy/transfer_from.ts24
2 files changed, 21 insertions, 15 deletions
diff --git a/packages/contracts/test/token_transfer_proxy/auth.ts b/packages/contracts/test/token_transfer_proxy/auth.ts
index 885ff3bc1..78ef78beb 100644
--- a/packages/contracts/test/token_transfer_proxy/auth.ts
+++ b/packages/contracts/test/token_transfer_proxy/auth.ts
@@ -4,11 +4,12 @@ import * as chai from 'chai';
import * as Web3 from 'web3';
import { TokenTransferProxyContract } from '../../src/contract_wrappers/generated/token_transfer_proxy';
+import { artifacts } from '../../util/artifacts';
import { constants } from '../../util/constants';
import { ContractName } from '../../util/types';
import { chaiSetup } from '../utils/chai_setup';
-import { deployer } from '../utils/deployer';
-import { provider, web3Wrapper } from '../utils/web3_wrapper';
+
+import { defaults, provider, web3Wrapper } from '../utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;
@@ -23,11 +24,10 @@ describe('TokenTransferProxy', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = address = accounts[0];
notOwner = accounts[1];
- const tokenTransferProxyInstance = await deployer.deployAsync(ContractName.TokenTransferProxy);
- tokenTransferProxy = new TokenTransferProxyContract(
- tokenTransferProxyInstance.abi,
- tokenTransferProxyInstance.address,
+ tokenTransferProxy = await TokenTransferProxyContract.deploy0xArtifactAsync(
+ artifacts.TokenTransferProxy,
provider,
+ defaults,
);
});
beforeEach(async () => {
diff --git a/packages/contracts/test/token_transfer_proxy/transfer_from.ts b/packages/contracts/test/token_transfer_proxy/transfer_from.ts
index dff1a0cfb..79189415f 100644
--- a/packages/contracts/test/token_transfer_proxy/transfer_from.ts
+++ b/packages/contracts/test/token_transfer_proxy/transfer_from.ts
@@ -6,12 +6,13 @@ import * as Web3 from 'web3';
import { DummyTokenContract } from '../../src/contract_wrappers/generated/dummy_token';
import { TokenTransferProxyContract } from '../../src/contract_wrappers/generated/token_transfer_proxy';
+import { artifacts } from '../../util/artifacts';
import { Balances } from '../../util/balances';
import { constants } from '../../util/constants';
import { ContractName } from '../../util/types';
import { chaiSetup } from '../utils/chai_setup';
-import { deployer } from '../utils/deployer';
-import { provider, web3Wrapper } from '../utils/web3_wrapper';
+
+import { defaults, provider, web3Wrapper } from '../utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;
@@ -31,15 +32,20 @@ describe('TokenTransferProxy', () => {
before(async () => {
accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = notAuthorized = accounts[0];
- const tokenTransferProxyInstance = await deployer.deployAsync(ContractName.TokenTransferProxy);
- tokenTransferProxy = new TokenTransferProxyContract(
- tokenTransferProxyInstance.abi,
- tokenTransferProxyInstance.address,
+ tokenTransferProxy = await TokenTransferProxyContract.deploy0xArtifactAsync(
+ artifacts.TokenTransferProxy,
provider,
+ defaults,
+ );
+ rep = await DummyTokenContract.deploy0xArtifactAsync(
+ artifacts.DummyToken,
+ provider,
+ defaults,
+ constants.DUMMY_TOKEN_NAME,
+ constants.DUMMY_TOKEN_SYMBOL,
+ constants.DUMMY_TOKEN_DECIMALS,
+ constants.DUMMY_TOKEN_TOTAL_SUPPLY,
);
- const repInstance = await deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS);
- rep = new DummyTokenContract(repInstance.abi, repInstance.address, provider);
-
dmyBalances = new Balances([rep], [accounts[0], accounts[1]]);
await Promise.all([
rep.approve.sendTransactionAsync(tokenTransferProxy.address, INIT_ALLOW, {