v0.39.0
What's Changed
- docs: change docs about vectors by @iqdecay in #895
- feat: support
Bytes
type return from contract by @iqdecay in #868 - feat!: enable payments with predicates by @Salka1988 in #815
- ci: add clippy check without all features by @hal3e in #900
- chore: reorganize harness tests by @hal3e in #897
- refactor!: improve log decoding and simplify
ParamType
by @segfault-magnet in #885 - Delete
provider
from withwith_account
function by @Salka1988 in #906 - refactor!:
fuels
wasm-offending packages/reexports hidden behindstd
flag by @segfault-magnet in #913 - bug: storage slots have to be sorted in a create tx by @segfault-magnet in #911
- chore: remove unused file
cargo
by @hal3e in #917 - Bump versions to 0.39.0 by @digorithm in #920
Full Changelog: v0.38.1...v0.39.0
New features
Bytes
types
The Sway Bytes
type is now supported in the SDK.
Pay for fees using predicate
We've recently introduced the Account
trait, which encapsulates all the behavior you commonly see in a wallet. Predicate
s also implement the Account
trait now. This means you can use a Predicate
the same way you'd use a wallet, when paying for transaction fees. For instance:
// Instead of passing the wallet used to sign the contract's transaction, we can now pass a predicate
let contract_methods = MyContract::new(contract_id, predicate).methods();
let tx_params = TxParameters::new(1000000, 10000, 0);
assert_eq!(predicate.get_asset_balance(&BASE_ASSET_ID).await?, 192);
let response = contract_methods
.initialize_counter(42) // Build the ABI call
.tx_params(tx_params)
.call()
.await?;
Note that this new feature introduces many breaking changes. Read more here: #815.