You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR updates `fuel-core` to `0.23.0` and `fuel-vm` to `0.47.1`.
Added `dry_run_multiple` and `dry_run_no_validation_multiple`. Both
accept a new type called `Transactions`. Example usage:
`Transactions::new().insert(tx).insert(tx2)`
BREAKING CHANGE:
- `TxPolicies` `gas_price` is replaced with `tip`
- `dry_run` now returns `TxStatus` the receipts can be taken with
`tx_status.take_receipts()`
- `checked_dry_run` is deleted
- `TransactionResponse`'s `block_id` is replaced with `block_height`
- `estimate_transaction_cost` has a new argument `block_horizon` used to
estimate the gas price.
Co-authored-by: Ahmed Sagdati <[email protected]>
With the function `estimate_transaction_cost(tolerance: Option<f64>)` provided by `ContractCallHandler` and `ContractMultiCallHandler`, you can get a cost estimation for a specific call. The return type, `TransactionCost`, is a struct that contains relevant information for the estimation:
3
+
With the function `estimate_transaction_cost(tolerance: Option<f64>, block_horizon: Option<u32>)` provided by `ContractCallHandler` and `ContractMultiCallHandler`, you can get a cost estimation for a specific call. The return type, `TransactionCost`, is a struct that contains relevant information for the estimation:
4
4
5
5
```rust,ignore
6
-
TransactionCost {
7
-
min_gas_price: u64,
8
-
min_byte_price: u64,
9
-
gas_price: u64,
10
-
gas_used: u64,
11
-
metered_bytes_size: u64,
12
-
total_fee: f64, // where total_fee is the sum of the gas and byte fees
Copy file name to clipboardExpand all lines: docs/src/calling-contracts/tx-policies.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,13 @@ Transaction policies are defined as follows:
10
10
11
11
Where:
12
12
13
-
1.**Gas Price** - Maximum gas price for transaction.
13
+
1.**Tip** - amount to pay the block producer to prioritize the transaction.
14
14
2.**Witness Limit** - The maximum amount of witness data allowed for the transaction.
15
15
3.**Maturity** - Block until which the transaction cannot be included.
16
16
4.**Max Fee** - The maximum fee payable by this transaction.
17
17
5.**Script Gas Limit** - The maximum amount of gas the transaction may consume for executing its script code.
18
18
19
-
When the **Script Gas Limit** is not set, the Rust SDK will estimate the consumed gas in the background and set it as the limit. Similarly, if no **Gas Price** is defined, the Rust SDK defaults to the network's minimum gas price.
19
+
When the **Script Gas Limit** is not set, the Rust SDK will estimate the consumed gas in the background and set it as the limit.
20
20
21
21
If the **Witness Limit** is not set, the SDK will set it to the size of all witnesses and signatures defined in the transaction builder.
0 commit comments