Skip to main content
A Contract method can be called directly, or used in various ways.

Extended by

Type parameters

Call the contract method with arguments.

Parameters

Returns

Promise<D> A promise resolving to the result of the call.

Source

contract/types.ts:137

Properties

Methods

estimateGas()

Estimate the gas to send the contract method with args.

Parameters

Returns

Promise<bigint> A promise resolving to the estimated gas.

Source

contract/types.ts:190

getFragment()

Returns the fragment constrained by args. This can be used to resolve ambiguous method names.

Parameters

Returns

FunctionFragment The constrained fragment.

Source

contract/types.ts:155

populateTransaction()

Returns a populated transaction that can be used to perform the contract method with args.

Parameters

Returns

Promise<ContractTransaction> A promise resolving to the populated transaction.

Source

contract/types.ts:163

send()

Send a transaction for the contract method with args.

Parameters

Returns

Promise<ContractTransactionResponse> A promise resolving to the transaction response.

Source

contract/types.ts:182

staticCall()

Call the contract method with args and return the value. If the return value is a single type, it will be dereferenced and returned directly, otherwise the full Result will be returned.

Parameters

Returns

Promise<R> A promise resolving to the result of the static call.

Source

contract/types.ts:174

staticCallResult()

Call the contract method with args and return the Result without any dereferencing.

Parameters

Returns

Promise<Result> A promise resolving to the Result of the static call.

Source

contract/types.ts:198