aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/contract_templates/partials/call.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'packages/0x.js/contract_templates/partials/call.handlebars')
-rw-r--r--packages/0x.js/contract_templates/partials/call.handlebars15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/0x.js/contract_templates/partials/call.handlebars b/packages/0x.js/contract_templates/partials/call.handlebars
new file mode 100644
index 000000000..0475136f0
--- /dev/null
+++ b/packages/0x.js/contract_templates/partials/call.handlebars
@@ -0,0 +1,15 @@
+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;
+ },
+};