aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract_templates/partials
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-05-10 21:02:32 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-05-10 23:47:38 +0800
commit7eb9444458f8c86cbc9c7be47879802c52ece57a (patch)
tree749c90f1bc547dfb7795057bc2b6aadf709b7319 /packages/contract_templates/partials
parentebc296ea3150672c6998fcbdefbbb18433030719 (diff)
downloaddexon-0x-contracts-7eb9444458f8c86cbc9c7be47879802c52ece57a.tar.gz
dexon-0x-contracts-7eb9444458f8c86cbc9c7be47879802c52ece57a.tar.zst
dexon-0x-contracts-7eb9444458f8c86cbc9c7be47879802c52ece57a.zip
Remove _applyDefaultsToDeployTxDataAsync
Diffstat (limited to 'packages/contract_templates/partials')
-rw-r--r--packages/contract_templates/partials/callAsync.handlebars5
-rw-r--r--packages/contract_templates/partials/tx.handlebars8
2 files changed, 8 insertions, 5 deletions
diff --git a/packages/contract_templates/partials/callAsync.handlebars b/packages/contract_templates/partials/callAsync.handlebars
index 58fb2f09c..904936173 100644
--- a/packages/contract_templates/partials/callAsync.handlebars
+++ b/packages/contract_templates/partials/callAsync.handlebars
@@ -12,10 +12,11 @@ async callAsync(
{{> params inputs=inputs}}
) as ethers.CallDescription;
const encodedData = ethersFunction.data;
- const callDataWithDefaults = await self._applyDefaultsToTxDataAsync(
+ const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
data: encodedData,
- }
+ },
+ this._web3Wrapper.getContractDefaults(),
)
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
let resultArray = ethersFunction.parse(rawCallResult);
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;