diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-12-02 12:47:05 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-12-02 13:31:50 +0800 |
commit | eb667f653c4ee87132390844afaecf409c7575c8 (patch) | |
tree | d2d3c9b1a44bc9a93442617b0e2892cc901c5612 /packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts | |
parent | 6cbd0d4537be3e51866c407dc01fb0efca0b50c2 (diff) | |
download | dexon-0x-contracts-eb667f653c4ee87132390844afaecf409c7575c8.tar.gz dexon-0x-contracts-eb667f653c4ee87132390844afaecf409c7575c8.tar.zst dexon-0x-contracts-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.ts | 6 |
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; } |