From 3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 7 May 2018 22:11:09 +0200 Subject: Remove deployer from metacoin and contract tests --- packages/contracts/test/unlimited_allowance_token.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'packages/contracts/test/unlimited_allowance_token.ts') diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts index 618bda72d..a541c495f 100644 --- a/packages/contracts/test/unlimited_allowance_token.ts +++ b/packages/contracts/test/unlimited_allowance_token.ts @@ -6,12 +6,12 @@ import * as chai from 'chai'; import * as Web3 from 'web3'; import { DummyTokenContract } from '../src/contract_wrappers/generated/dummy_token'; +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; @@ -33,8 +33,15 @@ describe('UnlimitedAllowanceToken', () => { 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); + token = await DummyTokenContract.deploy0xArtifactAsync( + artifacts.DummyToken, + provider, + defaults, + constants.DUMMY_TOKEN_NAME, + constants.DUMMY_TOKEN_SYMBOL, + constants.DUMMY_TOKEN_DECIMALS, + constants.DUMMY_TOKEN_TOTAL_SUPPLY, + ); await token.mint.sendTransactionAsync(MAX_MINT_VALUE, { from: owner }); tokenAddress = token.address; }); -- cgit v1.2.3 From 75d24dea0e10d098d3833488a420498410c22991 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 8 May 2018 16:02:04 +0200 Subject: Fix linter issues --- packages/contracts/test/unlimited_allowance_token.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/contracts/test/unlimited_allowance_token.ts') diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts index a541c495f..546958cfd 100644 --- a/packages/contracts/test/unlimited_allowance_token.ts +++ b/packages/contracts/test/unlimited_allowance_token.ts @@ -33,7 +33,7 @@ describe('UnlimitedAllowanceToken', () => { const accounts = await web3Wrapper.getAvailableAddressesAsync(); owner = accounts[0]; spender = accounts[1]; - token = await DummyTokenContract.deploy0xArtifactAsync( + token = await DummyTokenContract.deployFrom0xArtifactAsync( artifacts.DummyToken, provider, defaults, -- cgit v1.2.3 From f854f3ee2bd74bbb61ed465099168b4d391f92c8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 10 May 2018 15:20:00 +0200 Subject: Remove unused deployer docs configs --- packages/contracts/test/unlimited_allowance_token.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/contracts/test/unlimited_allowance_token.ts') diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts index 546958cfd..860efa73c 100644 --- a/packages/contracts/test/unlimited_allowance_token.ts +++ b/packages/contracts/test/unlimited_allowance_token.ts @@ -11,7 +11,7 @@ import { constants } from '../util/constants'; import { ContractName } from '../util/types'; import { chaiSetup } from './utils/chai_setup'; -import { defaults, provider, web3Wrapper } from './utils/web3_wrapper'; +import { txDefaults, provider, web3Wrapper } from './utils/web3_wrapper'; chaiSetup.configure(); const expect = chai.expect; @@ -36,7 +36,7 @@ describe('UnlimitedAllowanceToken', () => { token = await DummyTokenContract.deployFrom0xArtifactAsync( artifacts.DummyToken, provider, - defaults, + txDefaults, constants.DUMMY_TOKEN_NAME, constants.DUMMY_TOKEN_SYMBOL, constants.DUMMY_TOKEN_DECIMALS, -- cgit v1.2.3 From e972ed8456b4e98af649b0e7878693322ed94a90 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 10 May 2018 18:12:34 +0200 Subject: Fix linter errors --- packages/contracts/test/unlimited_allowance_token.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/contracts/test/unlimited_allowance_token.ts') diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts index 860efa73c..da2e5fb5b 100644 --- a/packages/contracts/test/unlimited_allowance_token.ts +++ b/packages/contracts/test/unlimited_allowance_token.ts @@ -11,7 +11,7 @@ import { constants } from '../util/constants'; import { ContractName } from '../util/types'; import { chaiSetup } from './utils/chai_setup'; -import { txDefaults, provider, web3Wrapper } from './utils/web3_wrapper'; +import { provider, txDefaults, web3Wrapper } from './utils/web3_wrapper'; chaiSetup.configure(); const expect = chai.expect; -- cgit v1.2.3