v0.42.0
What's Changed
- refactor!: unify type import path by @iqdecay in #934
- feat!: add predicate configurables by @hal3e in #935
- Add predicate code getter by @MujkicA in #941
- chore: reorganize and bump external dependencies by @hal3e in #943
- chore: update
sway
to0.38.0
andfuel-core
to0.17.11
by @xgreenx in #947 - docs: add section comments for devrel by @sarahschwartz in #946
- chore: bump
syn
to2.0
by @hal3e in #957 - feat: add trimming utilities to
SizedAsciiString
by @iqdecay in #955 - chore: default-features warnings on cargo nightly by @Salka1988 in #963
- chore: make api around Salt consistent by @MujkicA in #964
- bug: reexport lost fuels::tx::Output under fuels::types::output::Output by @segfault-magnet in #961
- feat!: add
u128
support by @hal3e in #972 - feat: add gas estimation to script calls by @MujkicA in #973
- feat(contracts): add tx_id to FuelCallResponse by @Br1ght0ne in #734
- feat:
low level call
support by @Salka1988 in #958 - Extend codeowners list by @digorithm in #979
- refactor!: update
sway
andfuel-core
to0.18.1
by @xgreenx in #950 - Bump versions to 0.42.0 by @digorithm in #983
Full Changelog: v0.41.0...v0.42.0
Breaking changes
Types import path changes
- Use
fuels::types::input::Input
instead offuels::tx::input
- Use
fuels::types::coin::Coin
instead offuels::client::schema::coin::Coin
andfuels::tx::Output::Coin
- Use
fuels::types::AssetId
instead offuels::client::schema::AssetId
andfuels::tx::AssetId
- Use
fuels::tx::UtxoId
instead offuels::client::schema::UtxoId
- Use
fuels::types::coin::CoinStatus
instead offuels::client::schema::coin::CoinStatus
- Use
fuels::types::resource::Resource
instead offuels::client::schema::resource::Resource
- Use
fuels_types::types::Bytes32
instead offuel_tx::Bytes32
Configurables for predicates
abigen!(Predicate(
name = "MyPredicate",
abi = "packages/fuels/tests/predicates/predicate_configurables/out/debug/predicate_configurables-abi.json"
));
let new_struct = StructWithGeneric {
field_1: 32u8,
field_2: 64,
};
let new_enum = EnumWithGeneric::VariantTwo;
let configurables = MyPredicateConfigurables::new()
.set_STRUCT(new_struct.clone())
.set_ENUM(new_enum.clone());
let predicate_data = MyPredicateEncoder::encode_data(8u8, true, new_struct, new_enum);
let mut predicate: Predicate = Predicate::load_from(
"tests/predicates/predicate_configurables/out/debug/predicate_configurables.bin",
)?
.with_data(predicate_data)
.with_configurables(configurable);
fuel-core @ 0.18
changes
Note that some of these changes are subject to subsequent changes in future UX improvements.
- Signing the transaction and predicate id generation requires
ChainId
(ConsensusParameters
). - Now, tokens should be transferred to the contract first, and after you can transfer them via
SMO
or another transfer. So in some tests, we first need to transfer money to the contract. - The
produce_blocks
function is updated and doesn't requireTimeParameters
. - Removed redundant usage of
MessageId
. Now the identifier of the message is aNonce
. - Removed
Output::Message
. Now you don't need to specify it in the outputs. Because of thatSMO
opcode doesn't require a message output index. - The proof API is updated with a new design: FuelLabs/fuel-core#1046. To prove the block at height
X
, you need at least a committedX + 1
block. Predicate::set_provider
now returns aResult
because it can fail if the "new" provider has different consensus parameters than the consensus parameters used previouslyPredicate
can be loaded with a provider usingload_from_with_provider
andfrom_code_and_provider
. Thefrom_code
andload_from
remain and use the defaultConsensusParameters
value.Provider::new
now takes aConsensusParameters
argument, so we can avoid changing the API of downstream clients.setup_test_client
now returnsConsensusParameters
of the client. This was either this orsetup_test_provider
would have to change, and the former is much less used than the latter.