Created
October 28, 2018 07:03
-
-
Save kermankohli/47bfb07f30d2e292b59546b09d4667f1 to your computer and use it in GitHub Desktop.
Partials - call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public {{this.name}} = { | |
async callAsync( | |
{{> typed_params inputs=inputs}} | |
defaultBlock?: any, | |
): 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; | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment