Class: ContractFunctionInteraction
contract.ContractFunctionInteraction
This is the class that is returned when calling e.g. contract.methods.myMethod(arg0, arg1)
.
It contains available interactions one can call on a method, including view.
Hierarchy
-
BaseContractInteraction
↳
ContractFunctionInteraction
Constructors
constructor
• new ContractFunctionInteraction(wallet
, contractAddress
, functionDao
, args
): ContractFunctionInteraction
Parameters
Name | Type |
---|---|
wallet | Wallet |
contractAddress | AztecAddress |
functionDao | FunctionAbi |
args | any [] |
Returns
Overrides
BaseContractInteraction.constructor
Properties
args
• Protected
args: any
[]
contractAddress
• Protected
contractAddress: AztecAddress
functionDao
• Protected
functionDao: FunctionAbi
log
• Protected
log: Logger
Inherited from
BaseContractInteraction.log
wallet
• Protected
wallet: Wallet
Inherited from
BaseContractInteraction.wallet
Methods
create
▸ create(opts?
): Promise
<TxExecutionRequest
>
Create a transaction execution request that represents this call, encoded and authenticated by the user's wallet, ready to be simulated.
Parameters
Name | Type | Description |
---|---|---|
opts | SendMethodOptions | An optional object containing additional configuration for the transaction. |
Returns
Promise
<TxExecutionRequest
>
A Promise that resolves to a transaction instance.
Overrides
BaseContractInteraction.create
estimateGas
▸ estimateGas(opts?
): Promise
<Pick
<GasSettings
, "gasLimits"
| "teardownGasLimits"
>>
Estimates gas for a given tx request and returns gas limits for it.
Parameters
Name | Type | Description |
---|---|---|
opts? | Omit <SendMethodOptions , "estimateGas" | "skipPublicSimulation" > | Options. |
Returns
Promise
<Pick
<GasSettings
, "gasLimits"
| "teardownGasLimits"
>>
Gas limits.
Inherited from
BaseContractInteraction.estimateGas
getDefaultFeeOptions
▸ getDefaultFeeOptions(fee
): Promise
<FeeOptions
>
Returns default fee options based on the user opts without running a simulation for gas estimation.
Parameters
Name | Type | Description |
---|---|---|
fee | undefined | UserFeeOptions | User-provided fee options. |
Returns
Promise
<FeeOptions
>
Inherited from
BaseContractInteraction.getDefaultFeeOptions
getFeeOptions
▸ getFeeOptions(request
): Promise
<FeeOptions
>
Return fee options based on the user opts, estimating tx gas if needed.
Parameters
Name | Type | Description |
---|---|---|
request | Omit <ExecutionRequestInit , "fee" > & { fee? : UserFeeOptions } | Request to execute for this interaction. |
Returns
Promise
<FeeOptions
>
Fee options for the actual transaction.
Inherited from
BaseContractInteraction.getFeeOptions