diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-01 17:08:14 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-01 17:08:14 +0800 |
commit | b05e96699f781398c2aac97082c565a531b6e4eb (patch) | |
tree | e5c3e447594be5170004c04520ac67cd0f581e8a /src/contract_wrappers | |
parent | cc7592e9315f9cd9eba0a4049c4382545e8154e1 (diff) | |
download | dexon-sol-tools-b05e96699f781398c2aac97082c565a531b6e4eb.tar.gz dexon-sol-tools-b05e96699f781398c2aac97082c565a531b6e4eb.tar.zst dexon-sol-tools-b05e96699f781398c2aac97082c565a531b6e4eb.zip |
Temporarily fix gas extimation
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 3f6210894..754210778 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -80,6 +80,18 @@ export class ExchangeWrapper extends ContractWrapper { signedOrder.expirationUnixTimestampSec, signedOrder.salt, ]; + const gas = await exchangeInstance.fill.estimateGas( + orderAddresses, + orderValues, + fillAmount, + shouldCheckTransfer, + signedOrder.ecSignature.v, + signedOrder.ecSignature.r, + signedOrder.ecSignature.s, + { + from: senderAddress, + }, + ); const response: ContractResponse = await exchangeInstance.fill( orderAddresses, orderValues, @@ -90,6 +102,7 @@ export class ExchangeWrapper extends ContractWrapper { signedOrder.ecSignature.s, { from: senderAddress, + gas, }, ); this.throwErrorLogsAsErrors(response.logs); |