aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/contract_wrappers/contract_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/contract_wrapper.ts
parent6cbd0d4537be3e51866c407dc01fb0efca0b50c2 (diff)
downloaddexon-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/contract_wrapper.ts')
-rw-r--r--packages/0x.js/src/contract_wrappers/contract_wrapper.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/0x.js/src/contract_wrappers/contract_wrapper.ts b/packages/0x.js/src/contract_wrappers/contract_wrapper.ts
index 8c92931b4..5e5a38f8c 100644
--- a/packages/0x.js/src/contract_wrappers/contract_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/contract_wrapper.ts
@@ -90,11 +90,13 @@ export class ContractWrapper {
const logWithDecodedArgs = this._abiDecoder.tryToDecodeLogOrNoop(log);
return logWithDecodedArgs;
}
- protected async _instantiateContractIfExistsAsync<ContractType extends Web3.ContractInstance>(
- artifact: Artifact, addressIfExists?: string): Promise<ContractType> {
- const contractInstance =
- await this._web3Wrapper.getContractInstanceFromArtifactAsync<ContractType>(artifact, addressIfExists);
- return contractInstance;
+ protected async _instantiateContractIfExistsAsync(
+ artifact: Artifact, addressIfExists?: string,
+ ): Promise<Web3.ContractInstance> {
+ const web3ContractInstance = await this._web3Wrapper.getContractInstanceFromArtifactAsync(
+ artifact, addressIfExists,
+ );
+ return web3ContractInstance;
}
protected _getContractAddress(artifact: Artifact, addressIfExists?: string): string {
if (_.isUndefined(addressIfExists)) {