A Fallback or Receive function on a Contract.

interface WrappedFallback(overrides?): Promise<ContractTransactionResponse>

Call the fallback method.

Parameters

ParameterTypeDescription
overrides?Omit<TransactionRequest, "to">The transaction overrides.

Returns

Promise<ContractTransactionResponse>

A promise resolving to the transaction response.

Source

contract/types.ts:266

Methods

estimateGas()

estimateGas(overrides?): Promise<bigint>

Estimate the gas to send a transaction to the contract fallback.

For non-receive fallback, data may be overridden.

Parameters

ParameterTypeDescription
overrides?Omit<TransactionRequest, "to">The transaction overrides.

Returns

Promise<bigint>

A promise resolving to the estimated gas.

Source

contract/types.ts:306


populateTransaction()

populateTransaction(overrides?): Promise<ContractTransaction>

Returns a populated transaction that can be used to perform the fallback method.

For non-receive fallback, data may be overridden.

Parameters

ParameterTypeDescription
overrides?Omit<TransactionRequest, "to">The transaction overrides.

Returns

Promise<ContractTransaction>

A promise resolving to the populated transaction.

Source

contract/types.ts:276


send()

send(overrides?): Promise<ContractTransactionResponse>

Send a transaction to the contract fallback.

For non-receive fallback, data may be overridden.

Parameters

ParameterTypeDescription
overrides?Omit<TransactionRequest, "to">The transaction overrides.

Returns

Promise<ContractTransactionResponse>

A promise resolving to the transaction response.

Source

contract/types.ts:296


staticCall()

staticCall(overrides?): Promise<string>

Call the contract fallback and return the result.

For non-receive fallback, data may be overridden.

Parameters

ParameterTypeDescription
overrides?Omit<TransactionRequest, "to">The transaction overrides.

Returns

Promise<string>

A promise resolving to the result of the call.

Source

contract/types.ts:286