diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-06 23:37:42 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-02-07 09:27:47 +0800 |
commit | eea8b15180d3e6616a908a8eb4c537df7d87a6ab (patch) | |
tree | b257751abc8cb16f84133493b043616c7d801fa8 /packages/contracts/contract_templates/partials/call.handlebars | |
parent | 600a2b40af0430d4037f86f6ffe21d6edf3fb166 (diff) | |
download | dexon-0x-contracts-eea8b15180d3e6616a908a8eb4c537df7d87a6ab.tar dexon-0x-contracts-eea8b15180d3e6616a908a8eb4c537df7d87a6ab.tar.gz dexon-0x-contracts-eea8b15180d3e6616a908a8eb4c537df7d87a6ab.tar.bz2 dexon-0x-contracts-eea8b15180d3e6616a908a8eb4c537df7d87a6ab.tar.lz dexon-0x-contracts-eea8b15180d3e6616a908a8eb4c537df7d87a6ab.tar.xz dexon-0x-contracts-eea8b15180d3e6616a908a8eb4c537df7d87a6ab.tar.zst dexon-0x-contracts-eea8b15180d3e6616a908a8eb4c537df7d87a6ab.zip |
Change contract templates
Diffstat (limited to 'packages/contracts/contract_templates/partials/call.handlebars')
-rw-r--r-- | packages/contracts/contract_templates/partials/call.handlebars | 25 |
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; +} |