aboutsummaryrefslogtreecommitdiffstats
path: root/packages/metacoin/test/metacoin_test.ts
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/metacoin/test/metacoin_test.ts
parentc64ad1af28ef116e210aafb3ea6ad2138361cd7c (diff)
downloaddexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar
dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.gz
dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.bz2
dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.lz
dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.xz
dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.tar.zst
dexon-sol-tools-3d58b38e4e8565e7ee10e4d6c9f57cd745957ab4.zip
Remove deployer from metacoin and contract tests
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();