aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/src/utils/contract.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/deployer/src/utils/contract.ts')
-rw-r--r--packages/deployer/src/utils/contract.ts14
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);
}
});
}