Skip to content

Releases: FuelLabs/fuels-rs

v0.18.0

15 Jul 18:33
4c6b94d
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.17.0...v0.18.0

Breaking changes

ParamType moved to fuels-type

No changes in the API or the behavior related to ParamType, but if you were importing ParamType from fuels-core, now you have to import it from fuels-types.

Main test suite moved to fuels

The main test suite (a.k.a harness.rs) was moved from fuels-abigen-macro to fuels, the root crate.

New features

New SDK book out

The SDK book underwent a major re-organization and re-write; check it out at https://fuellabs.github.io/fuels-rs/latest/.

v0.17.0

07 Jul 17:30
b585976
Compare
Choose a tag to compare

What's Changed

  • refactor: change the launch functions and wallet setup by @hal3e in #422
  • doc: update launch functions reference after refactor by @hal3e in #424
  • docs: typos and small improvements by @thdaraujo in #423
  • ci: gh checkout v2 -> v3 by @thdaraujo in #426
  • fix setup_test_provider not working with Config::local_node by @Salka1988 in #425
  • refactor: tests return Result<> when applicable by @hal3e in #427
  • fix: make generated module public by @digorithm in #433
  • Multi-call by @MujkicA in #399
  • Improve devx by providing shortcuts to decode bytes into contract types. by @segfault-magnet in #431
  • refactor: use InstantiationError as a variant of Error by @vnepveu in #443
  • fix: cargo build with --no-default-features flag by @Salka1988 in #440
  • chore: use concurrency to cancel previous CI runs by @AlicanC in #445
  • refactor!: move the Error type inside fuels-types workspace by @vnepveu in #444
  • feat: add manual initial storage slots by @MujkicA in #441
  • feat: transaction target block height by @segfault-magnet in #428
  • feat: add initial storage automatically by @Salka1988 in #442
  • fix: abigen enum with string or array by @MujkicA in #447

New Contributors

Full Changelog: v0.16.1...v0.17.0

v0.16.1

21 Jun 16:58
4d9cdaf
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.16.0...v0.16.1

v0.16.0

20 Jun 19:45
2a5be52
Compare
Choose a tag to compare

What's Changed

  • feat!: actually forward gas on contract call by @MujkicA in #386
  • feat: introduce the option of using fuel-core binary instead of fuel-core library by @Salka1988 in #355
  • Enum tokenization fix by @segfault-magnet in #397
  • docs: split book into latest and master by @vnepveu in #403
  • add abigen to fuels Cargo.Toml by @Salka1988 in #393
  • docs: migrate all examples by @vnepveu in #398
  • refactor: rename result variables to response by @thdaraujo in #400
  • Encoding of an enum with all unit variants (#390) by @segfault-magnet in #409
  • add upgrade fuel-core and fuel-gql-client to 0.9 by @Salka1988 in #412
  • feat: return error on empty function or argument name by @hal3e in #404
  • release: bump versions to 0.16.0 by @digorithm in #413

Breaking Changes

No more functions or arguments without name

Introduced in #404, we no longer support functions or arguments without explicit name.

fuels-abigen-macro import no longer needed

Introduced in #393, you no longer need to import fuels-abigen-macro, it all comes bundled in fuels. This means that all you need in your Cargo.toml is fuels:

[dependencies]
fuels = "0.16"

And, in your Rust code:

use fuels::prelude::{
    abigen, ...
};

// or

use fuels::prelude::*;

New features

fuel-core binary by default

Instead of using the fuel-core library by default when you use the SDK, your SDK code now will run against an instance of fuel-core, the binary. All you have to do is set up your environment:

export FUEL_CORE_BIN = " fuel-core"
export FUEL_CORE_CONFIG = " /config.json"

However, you can still test against the fuel-core library by passing the flag:--features=fuel-core-lib.

New Contributors

Full Changelog: v0.15.3...v0.16.0

v0.15.3

15 Jun 19:25
1e2223d
Compare
Choose a tag to compare

What's Changed

Breaking Changes

No breaking changes in this release.

New features

Nested enums and Sway's Option<T> support

You can now make use of Sway's Option<T> in the SDK since an Option<T> is a nested enum itself. So, now, something like this, in Sway, is possible and supported by the SDK:

contract;

use std::{
    address::Address,
    constants::NATIVE_ASSET_ID,
    identity::Identity,
    option::Option,
};

abi MyContract {
    fn test_ouput() -> Option<Identity>;
}

impl MyContract for Contract {
    fn test_ouput() -> Option<Identity> {
        Option::Some(Identity::Address(~Address::from(NATIVE_ASSET_ID)))
    }
}

The new ContractCallHandler

It is possible now to interact with a contract method call's built transaction before running it. Instead of:

// ...
let response = contract_instance.initialize_counter(42).call().await.unwrap();

You can:

// ...
let call_handler = contract_instance.initialize_counter(42);

let script = Script::from_call(&call_handler.contract_call).await;

// interact with script.tx ...

let receipts = script.call(client).await.unwrap();

let response = call_handler.build_response(receipts).unwrap();

Note that the first option stills works; we're just giving you a more granular option. This is useful when you want to inspect the Transaction or modify it before sending it.

New Contributors

Full Changelog: v0.15.2...v0.15.3

v0.15.2

09 Jun 21:57
e334724
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.15.1...v0.15.2

v0.15.1

07 Jun 20:05
940554f
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.15.0...v0.15.1

v0.15.0

07 Jun 18:58
e830786
Compare
Choose a tag to compare

What's Changed

  • Improve setup instructions. by @adlerjohn in #336
  • Add ,ignore to rust blocks. by @adlerjohn in #339
  • Add link to harness test in docs. by @adlerjohn in #340
  • Create examples/ directory and include examples in docs by @Br1ght0ne in #202
  • feat: log receipts when contract call panics or reverts by @vnepveu in #324
  • Disable feature unification in CI builds by @Voxelot in #335
  • docs: document get_spendable_coins functions by @vnepveu in #349
  • feat: setup multiple assets by @vnepveu in #347
  • docs(examples): add instantiate_client example by @Br1ght0ne in #291
  • feat: add context to InvalidData error by @hal3e in #357
  • Add support for custom types in arrays and tuples by @digorithm in #356
  • fix(examples): add Config from fuel-core to prelude by @Br1ght0ne in #363
  • add script_runner method in fuels-test-helpers by @Salka1988 in #325
  • Add support for Sway-native types wrapped in custom types by @digorithm in #366
  • v0.15.0 release by @digorithm in #367

New Contributors

Full Changelog: v0.14.1...v0.15.0

v0.14.1

27 May 00:28
6d6fe60
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.14.0...v0.14.1

v0.14.0

26 May 22:55
9bc541b
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.13.0...v0.14.0