Releases: FuelLabs/fuels-rs
v0.18.0
What's Changed
- The big Fuel SDK Book re-org by @digorithm in #453
- add check for invalid path by @Salka1988 in #459
- refactor: remove duplicate functions by @Salka1988 in #462
- ci: use forc v0.18 by @vnepveu in #460
- refactor!: move
ParamType
type insidefuels-types
by @vnepveu in #457 - docs: follow-ups from the book re-org by @digorithm in #468
- b256 in a tuple with other custom types breaks
abigen!
by @segfault-magnet in #471 - docs: add section for custom types by @digorithm in #472
- refactor: move tests to
fuels
by @Salka1988 in #455 - Collision with rust bindings if Sway fn is called
new
by @segfault-magnet in #458 - release: 0.18.0 by @digorithm in #476
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
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 withConfig::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 ofError
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 insidefuels-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
What's Changed
- fix: custom types containing reserved keyword by @digorithm in #416
- fix: broken crate publishing CI due to abigen feature flag by @digorithm in #417
- Bump versions to 0.16.1 by @digorithm in #418
Full Changelog: v0.16.0...v0.16.1
v0.16.0
What's Changed
- feat!: actually forward gas on contract call by @MujkicA in #386
- feat: introduce the option of using
fuel-core
binary instead offuel-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 toresponse
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
- @thdaraujo made their first contribution in #400
Full Changelog: v0.15.3...v0.16.0
v0.15.3
What's Changed
- fix: excess newline in test builder by @hal3e in #380
- refactor: rename native -> base asset. by @adlerjohn in #384
- refactor: refactor to enable easier support of multi call by @MujkicA in #364
- feat: extend abi json cli tests to cover expected errors by @hal3e in #373
- fix: enum encoding by @segfault-magnet in #361
- fix: check file type by @matt-user in #385
- fix: fn selector for unwrapped arrays by @Salka1988 in #391
- feat: add support for nested enums by @hal3e in #389
- fix: do not modify custom type names by @digorithm in #392
- fix: do not modify inner enum name in a nested enum by @digorithm in #394
- release: v0.15.3 by @digorithm in #396
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
- @segfault-magnet made their first contribution in #361
- @matt-user made their first contribution in #385
Full Changelog: v0.15.2...v0.15.3
v0.15.2
What's Changed
- refactor: remove redundant
fuels_contract::errors
mod by @vnepveu in #370 - Wasm support by @tjsharp1 in #351
- Add parameterize trait by @tjsharp1 in #372
- feat: implement tuple tokenization in json abi cli by @hal3e in #360
- ci: update forc to 0.15.1 by @digorithm in #374
- Use SLIP-44 coin type in derivation path. by @adlerjohn in #378
- fix: improve fn signature generation for tuples by @digorithm in #379
- Bump versions to 0.15.2 by @digorithm in #381
Full Changelog: v0.15.1...v0.15.2
v0.15.1
What's Changed
- Fix examples cargo TOML by @digorithm in #368
- Bump versions to v0.15.1 by @digorithm in #369
Full Changelog: v0.15.0...v0.15.1
v0.15.0
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
What's Changed
- Fix codeowners file by @adlerjohn in #331
- Fix crypto dep random feature. by @adlerjohn in #330
- Bump to v0.14.1 by @adlerjohn in #332
- Change badges to
fuels
by @adlerjohn in #334
Full Changelog: v0.14.0...v0.14.1
v0.14.0
What's Changed
- Mnemonic and JSON wallets implementation by @digorithm in #289
- Setup multiple test wallets and hide SecretKey by @MujkicA in #293
- Add support for forc 0.13 by @digorithm in #297
- Update
fuel-*
versions by @digorithm in #299 - Re-export fuel_tx in fuels by @Br1ght0ne in #290
- Added
deploy_with_salt
function by @Braqzen in #305 - Clarify appending variable outputs by @ANaphade in #303
- docs: update
fuels-*
version in the book by @vnepveu in #310 - Add deploy for loaded contract by @MujkicA in #309
- add get_transactions to Wallet and Provider by @Salka1988 in #308
- Add logging of all receipts as an option by @Salka1988 in #292
- add customisable node config as parameter by @Salka1988 in #302
- chore: add myself as code owner by @vnepveu in #314
- Remove unused test project by @digorithm in #316
- fix: use
test-helpers
feature inWallet
tests by @Salka1988 in #320 - feat: add a balance API by @vnepveu in #313
- fuel-core 0.8 upgrade (predicates) by @Voxelot in #322
- Cleanup docs. by @adlerjohn in #327
- Add more highlighted languages by @adlerjohn in #328
- release: bump versions to 0.14.0 by @vnepveu in #329
New Contributors
Full Changelog: v0.13.0...v0.14.0