aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/ether_token.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/test/ether_token.ts')
-rw-r--r--packages/contracts/test/ether_token.ts17
1 files changed, 8 insertions, 9 deletions
diff --git a/packages/contracts/test/ether_token.ts b/packages/contracts/test/ether_token.ts
index e9aba07c5..213c7c8a6 100644
--- a/packages/contracts/test/ether_token.ts
+++ b/packages/contracts/test/ether_token.ts
@@ -1,15 +1,14 @@
-import { ZeroEx, ZeroExError } from '0x.js';
+import { ContractWrappersError, ZeroEx } from '0x.js';
import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber, promisify } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
+import { WETH9Contract } from '../src/contract_wrappers/generated/weth9';
+import { artifacts } from '../src/utils/artifacts';
+import { chaiSetup } from '../src/utils/chai_setup';
import { constants } from '../src/utils/constants';
-import { ContractName } from '../src/utils/types';
-
-import { chaiSetup } from './utils/chai_setup';
-import { deployer } from './utils/deployer';
-import { provider, web3Wrapper } from './utils/web3_wrapper';
+import { provider, txDefaults, web3Wrapper } from '../src/utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;
@@ -24,7 +23,7 @@ describe('EtherToken', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
account = accounts[0];
- const etherToken = await deployer.deployAsync(ContractName.EtherToken);
+ const etherToken = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.EtherToken, provider, txDefaults);
etherTokenAddress = etherToken.address;
zeroEx = new ZeroEx(provider, {
gasPrice,
@@ -43,7 +42,7 @@ describe('EtherToken', () => {
const ethToDeposit = initEthBalance.plus(1);
return expect(zeroEx.etherToken.depositAsync(etherTokenAddress, ethToDeposit, account)).to.be.rejectedWith(
- ZeroExError.InsufficientEthBalanceForDeposit,
+ ContractWrappersError.InsufficientEthBalanceForDeposit,
);
});
@@ -72,7 +71,7 @@ describe('EtherToken', () => {
return expect(
zeroEx.etherToken.withdrawAsync(etherTokenAddress, ethTokensToWithdraw, account),
- ).to.be.rejectedWith(ZeroExError.InsufficientWEthBalanceForWithdrawal);
+ ).to.be.rejectedWith(ContractWrappersError.InsufficientWEthBalanceForWithdrawal);
});
it('should convert ether tokens to ether with sufficient balance', async () => {