aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-02 12:47:05 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-02 13:31:50 +0800
commiteb667f653c4ee87132390844afaecf409c7575c8 (patch)
treed2d3c9b1a44bc9a93442617b0e2892cc901c5612 /packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
parent6cbd0d4537be3e51866c407dc01fb0efca0b50c2 (diff)
downloaddexon-sol-tools-eb667f653c4ee87132390844afaecf409c7575c8.tar
dexon-sol-tools-eb667f653c4ee87132390844afaecf409c7575c8.tar.gz
dexon-sol-tools-eb667f653c4ee87132390844afaecf409c7575c8.tar.bz2
dexon-sol-tools-eb667f653c4ee87132390844afaecf409c7575c8.tar.lz
dexon-sol-tools-eb667f653c4ee87132390844afaecf409c7575c8.tar.xz
dexon-sol-tools-eb667f653c4ee87132390844afaecf409c7575c8.tar.zst
dexon-sol-tools-eb667f653c4ee87132390844afaecf409c7575c8.zip
Adjust 0x.js to use generated wrappers
Diffstat (limited to 'packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts')
-rw-r--r--packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts b/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
index ede0460bd..26025f6f9 100644
--- a/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
@@ -2,11 +2,12 @@ import BigNumber from 'bignumber.js';
import * as _ from 'lodash';
import {artifacts} from '../artifacts';
-import {EtherTokenContract, TransactionOpts, ZeroExError} from '../types';
+import {TransactionOpts, ZeroExError} from '../types';
import {assert} from '../utils/assert';
import {Web3Wrapper} from '../web3_wrapper';
import {ContractWrapper} from './contract_wrapper';
+import {EtherTokenContract} from './generated/ether_token';
import {TokenWrapper} from './token_wrapper';
/**
@@ -92,9 +93,10 @@ export class EtherTokenWrapper extends ContractWrapper {
if (!_.isUndefined(this._etherTokenContractIfExists)) {
return this._etherTokenContractIfExists;
}
- const contractInstance = await this._instantiateContractIfExistsAsync<EtherTokenContract>(
+ const web3ContractInstance = await this._instantiateContractIfExistsAsync(
artifacts.EtherTokenArtifact, this._contractAddressIfExists,
);
+ const contractInstance = new EtherTokenContract(web3ContractInstance, this._web3Wrapper.getContractDefaults());
this._etherTokenContractIfExists = contractInstance;
return this._etherTokenContractIfExists;
}