public {{languageSpecificName}} = {
    async sendTransactionAsync(
    {{> typed_params inputs=inputs}}
    txData?: Partial<TxData> | undefined,
    ): Promise<string> {
        const self = this as any as {{contractName}}Contract;
        const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]);
        const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
            {
                to: self.address,
                ...txData,
                data: encodedData,
            },
            self._web3Wrapper.getContractDefaults(),
            self.{{languageSpecificName}}.estimateGasAsync.bind(
                self,
                {{> params inputs=inputs}}
            ),
        );
        if (txDataWithDefaults.from !== undefined) {
            txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase();
        }
        try {
            return await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
        } catch (err) {
            // Try to decode ganache transaction revert Errors.
            BaseContract._throwIfThrownErrorIsRevertError(err);
            throw err;
        }
        const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
        return txHash;
    },
    awaitTransactionSuccessAsync(
    {{> typed_params inputs=inputs}}
        txData?: Partial<TxData>,
        pollingIntervalMs?: number,
        timeoutMs?: number,
    ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
    {{#each inputs}}
    {{#assertionType name type}}{{/assertionType}}
    {{/each}}
    const self = this as any as {{contractName}}Contract;
    {{#if inputs}}
    const txHashPromise = self.{{languageSpecificName}}.sendTransactionAsync({{> normalized_params input=inputs}}, txData);
    {{else}}
    const txHashPromise = self.{{languageSpecificName}}.sendTransactionAsync(txData);
    {{/if}}
    return new PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>(
        txHashPromise,
        (async (): Promise<TransactionReceiptWithDecodedLogs> => {
            // When the transaction hash resolves, wait for it to be mined.
            return self._web3Wrapper.awaitTransactionSuccessAsync(
                await txHashPromise,
                pollingIntervalMs,
                timeoutMs,
            );
        })(),
    );
    },
    async estimateGasAsync(
    {{> typed_params inputs=inputs}}
        txData?: Partial<TxData> | undefined,
    ): Promise<number> {
        const self = this as any as {{contractName}}Contract;
        const encodedData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> params inputs=inputs}}]);
        const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
            {
                to: self.address,
                ...txData,
                data: encodedData,
            },
            self._web3Wrapper.getContractDefaults(),
        );
        if (txDataWithDefaults.from !== undefined) {
            txDataWithDefaults.from = txDataWithDefaults.from.toLowerCase();
        }
        try {
            return await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
        } catch (err) {
            // Try to decode ganache transaction revert Errors.
            BaseContract._throwIfThrownErrorIsRevertError(err);
            throw err;
        }
        const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
        return gas;
    },
    {{> callAsync}}
};
