MethodOptions
in package
Configuration options for smart contract method invocation
This class defines transaction parameters and behavior for calling Soroban smart contract methods. It controls transaction fees, timeouts, simulation behavior, and automatic state restoration for archived contract data.
Tags
Table of Contents
Properties
- $fee : int
- $restore : bool
- $simulate : bool
- $timeoutInSeconds : int
Methods
- __construct() : mixed
Properties
$fee
public
int
$fee
= StellarConstants::MIN_BASE_FEE_STROOPS
$restore
public
bool
$restore
= true
$simulate
public
bool
$simulate
= true
$timeoutInSeconds
public
int
$timeoutInSeconds
= NetworkConstants::DEFAULT_SOROBAN_TIMEOUT_SECONDS
Methods
__construct()
public
__construct([int $fee = StellarConstants::MIN_BASE_FEE_STROOPS ][, int $timeoutInSeconds = NetworkConstants::DEFAULT_SOROBAN_TIMEOUT_SECONDS ][, bool $simulate = true ][, bool $restore = true ]) : mixed
Parameters
- $fee : int = StellarConstants::MIN_BASE_FEE_STROOPS
-
The fee to pay for the transaction in Stroops. Must be at least the base fee (100 stroops). Higher fees may be needed for complex operations. Resource fees are added automatically during simulation. Default 100.
- $timeoutInSeconds : int = NetworkConstants::DEFAULT_SOROBAN_TIMEOUT_SECONDS
-
The timebounds which should be set for transactions generated by the contract client. Must be positive. Transactions not included in a ledger within this time will expire and cannot be submitted. Default 300.
- $simulate : bool = true
-
Whether to automatically simulate the transaction when constructing the AssembledTransaction. Set to false if you need to modify the transaction builder before simulation. Default true.
- $restore : bool = true
-
If true, will automatically attempt to restore archived ledger entries that need renewal. Requires source account with private key. Default true.