Skip to content

Instantly share code, notes, and snippets.

@kermankohli
Created October 28, 2018 07:03
Show Gist options
  • Save kermankohli/47bfb07f30d2e292b59546b09d4667f1 to your computer and use it in GitHub Desktop.
Save kermankohli/47bfb07f30d2e292b59546b09d4667f1 to your computer and use it in GitHub Desktop.
Partials - call
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