aboutsummaryrefslogtreecommitdiffstats
path: root/packages/metacoin/test/metacoin_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/metacoin/test/metacoin_test.ts')
-rw-r--r--packages/metacoin/test/metacoin_test.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/metacoin/test/metacoin_test.ts b/packages/metacoin/test/metacoin_test.ts
index 51830d1ef..6fe751d12 100644
--- a/packages/metacoin/test/metacoin_test.ts
+++ b/packages/metacoin/test/metacoin_test.ts
@@ -1,15 +1,19 @@
+import { ContractArtifact } from '@0xproject/deployer';
import { BlockchainLifecycle, devConstants } from '@0xproject/dev-utils';
import { LogWithDecodedArgs } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
+import * as MetacoinArtifact from '../artifacts/Metacoin.json';
import { MetacoinContract, TransferContractEventArgs } from '../src/contract_wrappers/metacoin';
import { chaiSetup } from './utils/chai_setup';
-import { deployer } from './utils/deployer';
+import { config } from './utils/config';
import { provider, web3Wrapper } from './utils/web3_wrapper';
+const artifact: ContractArtifact = MetacoinArtifact as any;
+
chaiSetup.configure();
const { expect } = chai;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
@@ -19,9 +23,8 @@ describe('Metacoin', () => {
const ownerAddress = devConstants.TESTRPC_FIRST_ADDRESS;
const INITIAL_BALANCE = new BigNumber(10000);
before(async () => {
- const metacoinInstance = await deployer.deployAsync('Metacoin');
- web3Wrapper.abiDecoder.addABI(metacoinInstance.abi);
- metacoin = new MetacoinContract(metacoinInstance.abi, metacoinInstance.address, provider);
+ metacoin = await MetacoinContract.deploy0xArtifactAsync(artifact, provider, config.defaults);
+ web3Wrapper.abiDecoder.addABI(metacoin.abi);
});
beforeEach(async () => {
await blockchainLifecycle.startAsync();