diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-23 04:53:32 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-30 23:01:36 +0800 |
commit | 387363283ca03ac1d6c9be5b7be2107790bbf79d (patch) | |
tree | 7f9ce518e2f4931321901dfeb2675d70854e996d /packages/deployer/src | |
parent | 709026bf1a49d468850b4ebed845c8598fa4fd75 (diff) | |
download | dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.tar dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.tar.gz dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.tar.bz2 dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.tar.lz dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.tar.xz dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.tar.zst dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.zip |
Remove truffle from tests
Diffstat (limited to 'packages/deployer/src')
-rw-r--r-- | packages/deployer/src/index.ts | 1 | ||||
-rw-r--r-- | packages/deployer/src/utils/contract.ts | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/packages/deployer/src/index.ts b/packages/deployer/src/index.ts new file mode 100644 index 000000000..06dc9e596 --- /dev/null +++ b/packages/deployer/src/index.ts @@ -0,0 +1 @@ +export { Deployer } from './deployer'; 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); } }); } |