aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/contract_templates/partials/call.handlebars
blob: 0475136f0c7eeece1a457ee203e57be0d64e42bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
    },
};