diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-02-05 19:33:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-05 19:33:40 +0800 |
commit | 7b4f2b47de393b7ed6d5c264c8e80864d196180c (patch) | |
tree | 8e86af8000e0aedd7241a00c2189d8f7ca0fc2ad /packages/deployer/src/utils/contract.ts | |
parent | 400a97e7a8f76d894d47368425bbe1e33fa5b255 (diff) | |
parent | c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8 (diff) | |
download | dexon-0x-contracts-7b4f2b47de393b7ed6d5c264c8e80864d196180c.tar.gz dexon-0x-contracts-7b4f2b47de393b7ed6d5c264c8e80864d196180c.tar.zst dexon-0x-contracts-7b4f2b47de393b7ed6d5c264c8e80864d196180c.zip |
Merge branch 'development' into fix/ether_token_address
Diffstat (limited to 'packages/deployer/src/utils/contract.ts')
-rw-r--r-- | packages/deployer/src/utils/contract.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/deployer/src/utils/contract.ts b/packages/deployer/src/utils/contract.ts index 546e82dfb..9c57751ff 100644 --- a/packages/deployer/src/utils/contract.ts +++ b/packages/deployer/src/utils/contract.ts @@ -28,16 +28,16 @@ export class Contract implements Web3.ContractInstance { _.forEach(functionsAbi, (functionAbi: Web3.MethodAbi) => { if (functionAbi.constant) { const cbStyleCallFunction = this._contract[functionAbi.name].call; - this[functionAbi.name] = { - callAsync: promisify(cbStyleCallFunction, this._contract), - }; + this[functionAbi.name] = promisify(cbStyleCallFunction, this._contract); + this[functionAbi.name].call = promisify(cbStyleCallFunction, this._contract); } else { const cbStyleFunction = this._contract[functionAbi.name]; + const cbStyleCallFunction = this._contract[functionAbi.name].call; const cbStyleEstimateGasFunction = this._contract[functionAbi.name].estimateGas; - this[functionAbi.name] = { - estimateGasAsync: promisify(cbStyleEstimateGasFunction, this._contract), - sendTransactionAsync: this._promisifyWithDefaultParams(cbStyleFunction), - }; + this[functionAbi.name] = this._promisifyWithDefaultParams(cbStyleFunction); + this[functionAbi.name].estimateGasAsync = promisify(cbStyleEstimateGasFunction); + this[functionAbi.name].sendTransactionAsync = this._promisifyWithDefaultParams(cbStyleFunction); + this[functionAbi.name].call = promisify(cbStyleCallFunction, this._contract); } }); } |