aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/contract_templates/partials/call.mustache
blob: ef4bda72465c4376496c59d61534d84dd0f5d69d (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;
    },
};