aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/contract_templates/partials/call.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/contract_templates/partials/call.handlebars')
-rw-r--r--packages/contracts/contract_templates/partials/call.handlebars25
1 files changed, 10 insertions, 15 deletions
diff --git a/packages/contracts/contract_templates/partials/call.handlebars b/packages/contracts/contract_templates/partials/call.handlebars
index 0475136f0..82a45b40e 100644
--- a/packages/contracts/contract_templates/partials/call.handlebars
+++ b/packages/contracts/contract_templates/partials/call.handlebars
@@ -1,15 +1,10 @@
-public {{this.name}} = {
- async callAsync(
- {{> typed_params inputs=inputs}}
- defaultBlock?: Web3.BlockParam,
- ): Promise<{{> return_type outputs=outputs}}> {
- const self = this as {{contractName}}Contract;
- const result = await promisify<{{> return_type outputs=outputs}}>(
- self._web3ContractInstance.{{this.name}}.call,
- self._web3ContractInstance,
- )(
- {{> params inputs=inputs}}
- );
- return result;
- },
-};
+public async {{this.name}}(
+{{> typed_params inputs=inputs}}
+ defaultBlock?: Web3.BlockParam,
+): Promise<{{> return_type outputs=outputs}}> {
+ const self = this as {{contractName}}Contract;
+ const result = await self._web3ContractInstance.{{this.name}}.call(
+ {{> params inputs=inputs}}
+ );
+ return result;
+}