Releases: FuelLabs/fuels-rs
v0.76.0
What's Changed
- chore: remove patch branch from e2e
Cargo.tomlby @ironcev in #1693 - Bump rust to 1.90 by @zees-dev in #1694
- chore(deps): bump fuel-core and fuel-vm deps, add owner TxPolicy by @rymnc in #1697
- chore(version): bump version to 0.76.0 and make test clearer by @rymnc in #1698
New transaction policy "Owner"
This allows you to set the owner of the transaction as described in FuelLabs/fuel-specs#618
Breaking changes
- Receipts in
FailureandSuccessstates of transactions are now wrapped in anArc TxStatus::take_receipts_checkedandTxStatus::take_receiptsnow returnArc<Vec<Receipt>>ReceiptParser::extract_contract_call_dataandReceiptParser::extract_script_datanow returnOption<Bytes>, whereBytesis an optimized type fromfuel-typesv0.65.0
New Contributors
Full Changelog: v0.75.1...v0.76.0
v0.75.1
v0.75.0
What's Changed
- Update
fuel-abi-typesto 0.13.0 by @tritao in #1674 - Fix
force_transfer_to_contractto work properly with non-based assets by @xgreenx in #1678 - Bump fuel-abi-types to 0.15.0 by @tritao in #1679
- feat: bump fuel-core to 0.46 by @luizstacio in #1682
- Additional functionality to allow custom sync calls for contracts and scripts by @xgreenx in #1683
- feat: expose offsets_with_data on configurables by @luizstacio in #1685
- chore: add method to get fn selector by @rymnc in #1686
- chore(release): prepare for release 0.75.0 by @rymnc in #1688
New Contributors
Full Changelog: v0.74.0...v0.75.0
v0.74.0
v0.73.0
Summary
In this release, we:
- Added support for the new abi errors. See the RFC for more information.
Breaking
-
Chores
- #1656 - bump fuel-core to 0.43.2, by @kayagokalp
Chores
- #1657 - bump version to
0.73.0, by @kayagokalp
Migration Notes
1656 - Bump fuel-core to 0.43.2
1651 - Add support for abi errors
-
LogFormatterconstructors renamed// old let fmt = LogFormatter::new::<MyLog>(); // new // for ordinary logs let fmt = LogFormatter::new_log::<MyLog>(); // for enums tagged with #[error_type] let fmt_err = LogFormatter::new_error::<MyError>();
-
LogDecoder::newnow needs the error-code map from the ABI// old let decoder = LogDecoder::new(formatters); // new use std::collections::HashMap; use fuels::core::codec::{ErrorDetails, LogDecoder}; let formatters = /* HashMap<LogId, LogFormatter> */; let error_codes: HashMap<u64, ErrorDetails> = /* generated by Abigen or hand-built */; let decoder = LogDecoder::new(formatters, error_codes);
v0.72.0
Summary
In this release, we:
- Added two need functions in the
Providerto access preconfirmationssend_transaction_and_await_statusandsubscribe_transaction_status - Bumped
fuel-coreto0.43.1 - Added support for simulating calls at specific block height
Breaking
- Chores
- #1630 - bump
rustto1.85.0and edition to2024, by @hal3e - #1652 - bump fuel core to 0 43 1, by @segfault-magnet
- #1630 - bump
Features
-
#1644 - add support for preconfirmations, by @AurelienFT
Chores
-
#1638 - update public key recovery example in docs, by @bitzoic
-
#1646 - fix some remaining todos regarding transaction fees, by @hal3e
-
#1653 - bump versions, by @segfault-magnet
Migration Notes
1630 - Bump rust to 1.85.0 and edition to 2024
- bumped
rustversion to1.85.0and edition to2024
v0.71.0
Summary
In this release, we:
- Added a fallback for querying balances when indexation is not supported
- Added max fee estimation tolerance to
ScriptCallHandler'sconvert_into_loaderto reduce the occurrence of invalid max fees. - Added support for AWS Key Management Service (KMS)
- Added support for Google Key Management Service (KMS)
- Added the
expirationtransaction policy. Now the user can limit until which block height the transaction is valid. - Bumped minimum fuel core version to
0.41.7 - Expose the tx status from succeeded translations in higher level APIs. The tx status holds the
total_gasandtotal_feeused. - Unified all the existing wallets in the SDK into a single wallet type holding a signer.
Breaking
-
Features
-
Chores
- #1600 - bump
fuel-core-*versions, by @segfault-magnet - #1620 - wallet refactoring, by @segfault-magnet
- #1600 - bump
Features
-
#1593 - switch blob ID calculation from data offset to configurable offset, by @Salka1988
-
#1602 - changelog generator for LTS releases, by @segfault-magnet
-
#1599 - add support for AWS KMS, by @Salka1988
-
#1607 - add
with_inputsandwith_outputsto contractCallHandler, by @hal3e -
#1612 - add support for GOOGLE KMS, by @Salka1988
Fixes
-
#1590 - script/predicate blob upload now uses the default max fee estimation tolerance, by @segfault-magnet
-
#1586 - message with data exluded in
adjust_for_fee, by @hal3e -
#1616 - fallback to single large request if no indexation available, by @segfault-magnet
Chores
-
#1605 - remove
script_needs_custom_decoder_loggingsway project, by @hal3e -
#1621 - add set provider method, by @segfault-magnet
Migration Notes
1600 - Bump fuel-core-* versions
Minimum fuel-core-* versions bumped to 0.41.7
1620 - Wallet refactoring
ImpersonatedAccount is removed
To achieve the same functionality instantiate a `FakeSigner:
let impersonator = Wallet::new(FakeSigner::new(address), provider.clone());AwsKmsSigner and GoogleKmsSigner moved
under fuels::accounts::signers::kms::aws and fuels::accounts::signers::kms::google, respectfully.
KmsWallet removed
use an ordinary Wallet now with a kms signer (aws or google)
WalletUnlocked and Wallet substituted by Wallet<Unlocked<S = PrivateKeySigner>> or Wallet<Locked>
The provider is now mandatory for Wallet::new.
Common operations in the new API:
Creating a random wallet:
a) Two step (useful when you haven't started the node but need the address)
// Create a random private key signer
let signer = PrivateKeySigner::random(&mut rng);
let coins = setup_single_asset_coins(signer.address(), asset_id, 1, DEFAULT_COIN_AMOUNT);
let provider = setup_test_provider(coins.clone(), vec![], None, None).await?;
let wallet = Wallet::new(signer, provider);b) One step (when you already have a provider)
let wallet = Wallet::random(&mut rng, provider.clone());Locking a wallet
let locked_wallet = wallet.lock();Creating a locked wallet
let wallet = Wallet::new_locked(addr, provider.clone());Wallets no longer sign
You use one of the signers for that. Or, if your wallet is unlocked, get its signer by calling wallet.signer().
ViewOnlyAccount no longer requires core::fmt::Debug and core::clone::Clone as supertraits.
Wallet no longer handles encrypting keys for disk storage
Use the fuels::accounts::Keystore for that (feature-gated under accounts-keystore)
AWS/Google kms feature flags changed
They're now accounts-signer-aws-kms and accounts-signer-google-kms.
1574 - Use total_gas and total_fee from tx status
- Removed
get_response_frommethod fromCallHandlers CallResponserefactored and addedtx_status: Successfield- Method
get_responseacceptsTxStatusinstead ofVec<Receipts> - Method
newis removed formCallResponse GasValidationtrait is removed from transaction buildersAccountstransfermethod returnsResult<TxResponse>Accountsforce_transfer_to_contractmethod returnsResult<TxResponse>Accountswithdraw_to_base_layermethod returnsResult<WithdrawToBaseResponse>Executable<Loader>'supload_blobreturnsResult<Option<TxResponse>>- Contract's
deployanddeploy_if_not_existsreturnResult<DeployResponse>andResponse<Option<DeployResponse>>respectively TransactionCost's fieldgas_usedrenamed toscript_gas
v0.70.4
Summary
In this release, we:
- Backported the fallback to single large request of balances in the case of disabled indexation