aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/partials/tx.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contract_templates/partials/tx.handlebars')
-rw-r--r--packages/contract_templates/partials/tx.handlebars8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/contract_templates/partials/tx.handlebars b/packages/contract_templates/partials/tx.handlebars
index feefd3870..f72078a4e 100644
--- a/packages/contract_templates/partials/tx.handlebars
+++ b/packages/contract_templates/partials/tx.handlebars
@@ -14,11 +14,12 @@ public {{this.tsName}} = {
const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}(
{{> params inputs=inputs}}
).data;
- const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
+ const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
...txData,
data: encodedData,
},
+ this._web3Wrapper.getContractDefaults(),
self.{{this.tsName}}.estimateGasAsync.bind(
self,
{{> params inputs=inputs}}
@@ -37,11 +38,12 @@ public {{this.tsName}} = {
const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}(
{{> params inputs=inputs}}
).data;
- const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
+ const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
...txData,
data: encodedData,
- }
+ },
+ this._web3Wrapper.getContractDefaults(),
);
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
return gas;