diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-24 03:35:44 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-28 04:05:23 +0800 |
commit | 2d561bc8a05e8d1fca91cde93bae2080d87be926 (patch) | |
tree | 10d785eff73c67ecae09a337ed3721ff6b6102a9 /packages/0x.js/src/contract_wrappers/token_wrapper.ts | |
parent | f5275d3ad75d2a989556de99cdef82bcf2cd687c (diff) | |
download | dexon-0x-contracts-2d561bc8a05e8d1fca91cde93bae2080d87be926.tar dexon-0x-contracts-2d561bc8a05e8d1fca91cde93bae2080d87be926.tar.gz dexon-0x-contracts-2d561bc8a05e8d1fca91cde93bae2080d87be926.tar.bz2 dexon-0x-contracts-2d561bc8a05e8d1fca91cde93bae2080d87be926.tar.lz dexon-0x-contracts-2d561bc8a05e8d1fca91cde93bae2080d87be926.tar.xz dexon-0x-contracts-2d561bc8a05e8d1fca91cde93bae2080d87be926.tar.zst dexon-0x-contracts-2d561bc8a05e8d1fca91cde93bae2080d87be926.zip |
Allow users to specify the contracts backend in abi-gen
Diffstat (limited to 'packages/0x.js/src/contract_wrappers/token_wrapper.ts')
-rw-r--r-- | packages/0x.js/src/contract_wrappers/token_wrapper.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/0x.js/src/contract_wrappers/token_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_wrapper.ts index 11a7670c0..0ec9ad707 100644 --- a/packages/0x.js/src/contract_wrappers/token_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/token_wrapper.ts @@ -419,11 +419,11 @@ export class TokenWrapper extends ContractWrapper { if (!_.isUndefined(tokenContract)) { return tokenContract; } - const web3ContractInstance = await this._instantiateContractIfExistsAsync( + const [abi, address] = await this._getContractAbiAndAddressFromArtifactsAsync( artifacts.TokenArtifact, normalizedTokenAddress, ); - const contractInstance = new TokenContract(web3ContractInstance, this._web3Wrapper.getContractDefaults()); + const contractInstance = new TokenContract(this._web3Wrapper, abi, address); tokenContract = contractInstance; this._tokenContractsByAddress[normalizedTokenAddress] = tokenContract; return tokenContract; |