aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/contract_wrappers/token_registry_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/token_registry_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/token_registry_wrapper.ts')
-rw-r--r--packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts
index 35337fa35..27ecb8bde 100644
--- a/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts
@@ -1,12 +1,13 @@
import * as _ from 'lodash';
import {artifacts} from '../artifacts';
-import {Token, TokenMetadata, TokenRegistryContract, ZeroExError} from '../types';
+import {Token, TokenMetadata, ZeroExError} from '../types';
import {assert} from '../utils/assert';
import {constants} from '../utils/constants';
import {Web3Wrapper} from '../web3_wrapper';
import {ContractWrapper} from './contract_wrapper';
+import {TokenRegistryContract} from './generated/token_registry';
/**
* This class includes all the functionality related to interacting with the 0x Token Registry smart contract.
@@ -116,9 +117,12 @@ export class TokenRegistryWrapper extends ContractWrapper {
if (!_.isUndefined(this._tokenRegistryContractIfExists)) {
return this._tokenRegistryContractIfExists;
}
- const contractInstance = await this._instantiateContractIfExistsAsync<TokenRegistryContract>(
+ const web3ContractInstance = await this._instantiateContractIfExistsAsync(
artifacts.TokenRegistryArtifact, this._contractAddressIfExists,
);
+ const contractInstance = new TokenRegistryContract(
+ web3ContractInstance, this._web3Wrapper.getContractDefaults(),
+ );
this._tokenRegistryContractIfExists = contractInstance;
return this._tokenRegistryContractIfExists;
}