Skip to content

Releases: FuelLabs/fuels-rs

v0.76.0

20 Oct 11:12
f2afc5f

Choose a tag to compare

What's Changed

  • chore: remove patch branch from e2e Cargo.toml by @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

  1. Receipts in Failure and Success states of transactions are now wrapped in an Arc
  2. TxStatus::take_receipts_checked and TxStatus::take_receipts now return Arc<Vec<Receipt>>
  3. ReceiptParser::extract_contract_call_data and ReceiptParser::extract_script_data now return Option<Bytes>, where Bytes is an optimized type from fuel-types v0.65.0

New Contributors

Full Changelog: v0.75.1...v0.76.0

v0.75.1

08 Oct 10:45
001466b

Choose a tag to compare

What's Changed

  • Version bump to v0.75.1 due to fuel-abi-types dependency update by @zees-dev in #1692

Full Changelog: v0.75.0...v0.75.1

v0.75.0

18 Sep 22:44
48f3c43

Choose a tag to compare

What's Changed

  • Update fuel-abi-types to 0.13.0 by @tritao in #1674
  • Fix force_transfer_to_contract to 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

12 Jun 10:36
76f2a2b

Choose a tag to compare

What's Changed

Full Changelog: v0.73.0...v0.74.0

v0.73.0

14 May 10:43
1bb6b69

Choose a tag to compare

Summary

In this release, we:

  • Added support for the new abi errors. See the RFC for more information.

Breaking

Chores

Migration Notes

1656 - Bump fuel-core to 0.43.2

1651 - Add support for abi errors

  • LogFormatter constructors 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::new now 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

23 Apr 22:26
dbc896f

Choose a tag to compare

Summary

In this release, we:

  • Added two need functions in the Provider to access preconfirmations send_transaction_and_await_status and subscribe_transaction_status
  • Bumped fuel-core to 0.43.1
  • Added support for simulating calls at specific block height

Breaking

Features

Chores

Migration Notes

1630 - Bump rust to 1.85.0 and edition to 2024

  • bumped rust version to 1.85.0 and edition to 2024

v0.71.0

13 Mar 16:10
9db786c

Choose a tag to compare

Summary

In this release, we:

  • Added a fallback for querying balances when indexation is not supported
  • Added max fee estimation tolerance to ScriptCallHandler's convert_into_loader to 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 expiration transaction 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_gas and total_fee used.
  • Unified all the existing wallets in the SDK into a single wallet type holding a signer.

Breaking

Features

Fixes

Chores

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_from method from CallHandlers
  • CallResponse refactored and added tx_status: Success field
  • Method get_response accepts TxStatus instead of Vec<Receipts>
  • Method new is removed form CallResponse
  • GasValidation trait is removed from transaction builders
  • Accounts transfer method returns Result<TxResponse>
  • Accounts force_transfer_to_contract method returns Result<TxResponse>
  • Accounts withdraw_to_base_layer method returns Result<WithdrawToBaseResponse>
  • Executable<Loader>'s upload_blob returns Result<Option<TxResponse>>
  • Contract's deploy and deploy_if_not_exists return Result<DeployResponse> and Response<Option<DeployResponse>> respectively
  • TransactionCost's field gas_used renamed to script_gas

v0.70.4

05 Mar 11:45
63496ae

Choose a tag to compare

Summary

In this release, we:

  • Backported the fallback to single large request of balances in the case of disabled indexation

v0.70.3

04 Mar 12:26
1014517

Choose a tag to compare

Features

  • #1613 - backport switch blob ID calculation from data offset to configurable offset, by @Salka1988

v0.70.2

03 Mar 13:18
c653b45

Choose a tag to compare

Features

  • #1613 - backport switch blob ID calculation from data offset to configurable offset, by @Salka1988