Class: BatchCall
contract.BatchCall
A batch of function calls to be sent as a single transaction through a wallet.
Hierarchy
-
BaseContractInteraction
↳
BatchCall
Constructors
constructor
• new BatchCall(wallet
, calls
): BatchCall
Parameters
Name | Type |
---|---|
wallet | Wallet |
calls | FunctionCall [] |
Returns
Overrides
BaseContractInteraction.constructor
Properties
calls
• Protected
calls: FunctionCall
[]
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 batch, 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
prove
▸ prove(options?
): Promise
<ProvenTx
>
Proves a transaction execution request and returns a tx object ready to be sent.
Parameters
Name | Type | Description |
---|---|---|
options | SendMethodOptions | optional arguments to be used in the creation of the transaction |
Returns
Promise
<ProvenTx
>
The resulting transaction
Inherited from
BaseContractInteraction.prove
proveInternal
▸ proveInternal(options?
): Promise
<TxProvingResult
>
Creates a transaction execution request, simulates and proves it. Differs from .prove in that its result does not include the wallet nor the composed tx object, but only the proving result. This object can then be used to either create a ProvenTx ready to be sent, or directly send the transaction.
Parameters
Name | Type | Description |
---|---|---|
options | SendMethodOptions | optional arguments to be used in the creation of the transaction |
Returns
Promise
<TxProvingResult
>
The proving result.
Inherited from
BaseContractInteraction.proveInternal
send
▸ send(options?
): SentTx
Sends a transaction to the contract function with the specified options. This function throws an error if called on an unconstrained function. It creates and signs the transaction if necessary, and returns a SentTx instance, which can be used to track the transaction status, receipt, and events.
Parameters
Name | Type | Description |
---|---|---|
options | SendMethodOptions | An optional object containing 'from' property representing the AztecAddress of the sender. If not provided, the default address is used. |
Returns
A SentTx instance for tracking the transaction status and information.
Inherited from
BaseContractInteraction.send
simulate
▸ simulate(options?
): Promise
<any
>
Simulate a transaction and get its return values Differs from prove in a few important ways:
- It returns the values of the function execution
- It supports
unconstrained
,private
andpublic
functions
Parameters
Name | Type | Description |
---|---|---|
options | SimulateMethodOptions | An optional object containing additional configuration for the transaction. |
Returns
Promise
<any
>
The result of the transaction as returned by the contract function.