fuels-rs

Fuel Network Rust SDK

APACHE-2.0 License

Downloads
1.9M
Stars
44.7K
Committers
30

Bot releases are hidden (Show)

fuels-rs - v0.65.1 Latest Release

Published by digorithm 3 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.65.0...v0.65.1

fuels-rs - v0.65.0

Published by digorithm 3 months ago

What's Changed

Breaking changes

  • FuelCallResponse renamed to CallResponse
  • ContractCallHandler removed in favour of CallHandler
  • ScriptCallHandler removed in favour of CallHandler
  • method_hash removed in favour of CallHandler::new_contract_call
  • We've added the field static_gas_price to NodeConfig

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.64.0...v0.65.0

fuels-rs - v0.64.0

Published by digorithm 4 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.63.1...v0.64.0

fuels-rs - v0.63.1

Published by digorithm 4 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.63.0...v0.63.1

fuels-rs - v0.63.0

Published by digorithm 5 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.62.0...v0.63.0

fuels-rs - v0.62.0

Published by segfault-magnet 5 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.61.0...v0.62.0

fuels-rs - v0.61.0

Published by digorithm 5 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.60.0...v0.61.0

fuels-rs - v0.60.0

Published by digorithm 5 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.59.0...v0.60.0

fuels-rs - v0.59.0

Published by digorithm 6 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.58.0...v0.59.0

fuels-rs - v0.58.0

Published by digorithm 6 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.57.0...v0.58.0

Breaking changes

This release makes the experimental encoding default and adds the legacy_encoding flag to use the old one.

fuels-rs - v0.57.0

Published by digorithm 6 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.56.0...v0.57.0

fuels-rs - v0.55.1

Published by digorithm 7 months ago

Hotfix for the v0.55.0.

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.55.0...v0.55.1

fuels-rs - v0.56.0

Published by digorithm 7 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.55.0...v0.56.0

Removed unused response method

We've removed response method from ScriptCallHandler, ContractCallHandler and MultiContractCallHandler.

Fix encoding capacity overflow bug

  • Configurables structs must be instantiated through a ::new(encoder_config) or ::default() method.
  • Configurables::with_some_string_config(some_string) methods now return a Result<Configurables> instead of Configurables.
  • Predicates::encode_data now returns a Result<UnresolvedBytes> instead of UnresolvedBytes.
  • PredicateEncoder structs must be instantiated through a ::new(encoder_config) or ::default() method.

New decode_as_debug_str for the `ABIDecoder

You can now decode straight into a debug string:

let debug_output =  ABIDecoder::default().decode_as_debug_str(&param_type, &[0, 0, 0, 0, 0, 0, 0, 123])?;

This was done so users could use ParamTypes at runtime to debug logs or return receipts. In addition, users are able to go directly from ProgramABI and some data to decoded debug.

BREAKING CHANGE: EnumVariants are now imported through param_types::EnumVariants

Support for fuel-core 0.23.0

  • 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.
fuels-rs - v0.55.0

Published by digorithm 9 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.54.0...v0.55.0

Breaking changes

Removed NetworkInfo

  • Removed NetworkInfo and all related functions/methods
  • Renamed DryRunner trait and added trait methods
  • Removed ScritpTransactionBuilder::new and CreateTransactionBuilder::new
  • Removed Provider::new

Use submit_and_await_commit API

send_transaction_and_await_commit function now returns a TxStatus instead of TxId.

Signing and the Signer trait

  • Removed sign_message and sign_transaction from the Signer trait
  • Added sign and address methods to the Signer trait
  • Signer trait moved do fuels::core::traits:::Signer
  • Message, PublicKey, SecretKey and Signature moved to fuels::crypto::
  • Replaced Transaction's check_without_signatures with check
  • Renamed Accounts add_witnessses to add_witnesses
  • Removed Clone for TransactionBuilders

Conversion from Address/ContractId types to Identity

It's not a breaking change, just a new cool UX feature. Convert from Address/Bech32Address/ContractId/Bech32ContractId to Identity easily.

fuels-rs - v0.54.0

Published by digorithm 10 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.53.0...v0.54.0

fuels-rs - v0.53.0

Published by digorithm 11 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.52.0...v0.53.0

Breaking changes

  • U256 is not supported anymore. If used in sway, the SDK will return a runtime error.
fuels-rs - v0.52.0

Published by digorithm 11 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.51.0...v0.52.0

Breaking changes

  • ScriptTransactionBuilder and CreateTransactionBuilder do not have with_maturity and with_gas_price, (with_gas_limit). They are set through the with_tx_policies method;
  • Maturity is not set to 0 by default - instead, we use an Option<u64> and None if it was not set. This saves bytes as it is not serialized if None;
  • WitnessLimit is set to the size of all witnesses in the builder. If the user uses append_witnesses after finalizing the transaction, a new error will be returned that helps the user set the witness limit manually.
fuels-rs - v0.51.0

Published by digorithm 11 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.50.1...v0.51.0

Breaking changes

TxParameters are replaced with TxPolicies

The TxParameters, which were previously used to define transaction parameters, have been replaced with TxPolicies. This change signifies a shift in how transactions are specified and managed.

GasPrice and Maturity fields are optional

In the new system, the GasPrice and Maturity fields are no longer mandatory. This offers more flexibility in transaction creation, allowing these fields to be specified only when needed.

TxPolicies introduced new fields:

WitnessLimit

The WitnessLimit field in TxPolicies sets a limit on the maximum size of witnesses in bytes, introducing a new constraint on transaction witnesses.

MaxFee

The MaxFee field specifies the upper limit for the transaction fee that a user is willing to pay, providing a clear boundary for transaction costs.

ScriptGasLimit only limits script execution

Previously, ScriptGasLimit also limited the predicate execution time, but this is no longer the case. It's now solely used for limiting script execution. The MaxFee policy has been introduced to handle transaction cost limitations, and the GasLimit field has been removed from the Create transaction.

New WitnessLimit impacts max_gas and max_fee calculation

The introduction of WitnessLimit affects the calculation of max_gas and max_fee, particularly in Create transactions where it's the sole factor influencing these values.

Minimal gas charges for transaction ID calculation

Even the minimal gas charge now includes the cost of calculating the transaction ID, adding an additional fee component to every transaction.

Setting the GasPrice policy is mandatory for each transaction

Every transaction now requires a GasPrice policy to be set, making it a mandatory element in transaction creation.

Changes in GasLimit and MAX_GAS_PER_TX rules

With the removal of the GasLimit field from the Create transaction, the max_gas for any transaction must now be less than or equal to MAX_GAS_PER_TX. Transactions that do not adhere to this rule will fail.

Transaction rejection conditions

Transactions will be rejected if max_fee exceeds the specified policies.max_fee, or if witnessses_size is greater than the policies.witness_limit.

get_message_proof now uses Nonce

The function get_message_proof has shifted from using the message_id to now utilizing Nonce, altering its operational mechanism.

Predicates no longer use ChainId for address calculation

In predicates, the ChainId is no longer used for calculating addresses, indicating a change in the method of address derivation.

manual_blocks_enabled replaced with debug

In the local chain configuration, manual_blocks_enabled has been superseded by the debug option, reflecting a change in configuration parameters.

fee_checked_from_tx utilizes FeeParameters

The process of fee checking from transactions (fee_checked_from_tx) now employs FeeParameters, indicating a shift in the fee verification approach.

Refactoring of fuel_tx::ConsensusParameters

The fuel_tx::ConsensusParameters have undergone refactoring, which has implications for their usage and implementation.

Necessity of BuildableTransaction trait in transaction builder

When building a transaction with a transaction builder, the BuildableTransacion trait needs to be in scope, highlighting a requirement in the transaction construction process.

Default enabling of utxo_validation and manual_blocks

For test providers, utxo_validation and manual_blocks are now enabled by default, simplifying the setup process for testing environments.

Changes in node configuration: Replacing local_node with default

The node configuration no longer includes local_node. Instead, default is used (e.g., let node_config = Config::default();), reflecting a change in the configuration approach.

TransactionType no longer implements Transaction. Users need to match and extract the inner tx.

fuels-rs - v0.50.1

Published by digorithm 12 months ago

What's Changed

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.50.0...v0.50.1

fuels-rs - v0.50.0

Published by digorithm 12 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.49.0...v0.50.0

Breaking changes

Result returns

The following functions are now returning a Result object:

  • launch_provider_and_get_wallet()
  • launch_custom_provider_and_get_wallets()
  • setup_test_provider()
  • setup_test_client()