aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts13
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);