Skip to content

Releases: FuelLabs/sway-libs

v0.24.0

02 Sep 03:14
e19f96f
Compare
Choose a tag to compare

What's Changed

Added v0.24.0

  • #293 Adds the BytecodeRoot and ContractConfigurables types to the Bytecode Library.
  • #286 Adds the _metadata() function to the Asset Library.

Changed v0.24.0

  • #286 Updates the repository to Sway-Standards v0.6.0 and implements the new SRC-20 and SRC-7 logging specifications.
  • #286 _set_metadata(), _set_name() and _set_symbol() now revert if the metadata is an empty string.
  • #286 _set_metadata() now reverts if the metadata is empty bytes.
  • #286 _mint() and _burn() now revert if the amount argument is zero.
  • #289 Bumps Sway-Libs to forc v0.63.3, fuel-core v0.34.0, and fuels v0.66.2.
  • #290 Update the Upgradeability library to use a specific storage slot for owner functionality.
  • #291 Prepares for the v0.24.0 release.

Breaking v0.24.0

  • #290 The _proxy_owner(), only_proxy_owner() and _set_proxy_owner() functions no longer take storage.proxy_owner as a parameter. Instead they directly read and write to the storage slot 0xbb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea754 which is sha256("storage_SRC14_1").

Before:

fn foo() {
    let stored_proxy_owner = _proxy_owner(storage.proxy_owner);
    only_proxy_owner(storage.proxy_owner);
    _set_proxy_owner(new_proxy_owner, storage.proxy_owner);
}

After:

fn foo() {
    let stored_proxy_owner = _proxy_owner();
    only_proxy_owner();
    _set_proxy_owner(new_proxy_owner);
}

Full Changelog: v0.23.0...v0.24.0

v0.23.1

06 Aug 16:44
50be622
Compare
Choose a tag to compare

What's Changed

Changed v0.23.1

  • #281 Prepares for v0.23.1 release.
  • #281 Updates repository to use sway-standards v0.5.2.

Full Changelog: v0.23.0...v0.23.1

v0.23.0

02 Aug 06:49
9987d8a
Compare
Choose a tag to compare

What's Changed

Breaking

  • #263 Removes the TwosComplement trait in favor of WrappingNeg.

The following demonstrates the breaking change. While this example code uses the I8 type, the same logic may be applied to the I16, I32, I64, I128, and I256 types.

Before:

let my_i8 = i8::zero();
let twos_complement = my_i8.twos_complement();

After:

let my_i8 = i8::zero();
let wrapping_neg = my_i8.wrapping_neg();
  • #272 The From implementation for all signed integers to their respective unsigned integer has been removed. The TryFrom implementation has been added in its place.

Before:

let my_i8: I8 = I8::from(1u8);

After:

let my_i8: I8 = I8::try_from(1u8).unwrap();
  • #273 The neg_from implementation for all signed integers has been removed. The neg_try_from() implementation has been added in its place.

The following demonstrates the breaking change. While this example code uses the I8 type, the same logic may be applied to the I16, I32, I64, I128, and I256 types.

Before:

let my_negative_i8: I8 = I8::neg_from(1u8);

After:

let my_negative_i8: I8 = I8::neg_try_from(1u8).unwrap();
  • #278 Deprecates the Fixed Point number library. The Fixed Point number library is no longer available.

Added

  • #259 Adds a new upgradability library, including associated tests and documentation.
  • #265 Adds the SetMetadataEvent and emits SetMetadataEvent when the _set_metadata() function is called.
  • #270 Adds OrdEq functionality to Signed Integers.
  • #272 Adds the TryFrom implementation from signed integers to unsigned integers.

Changed

  • #265 Enables the metadata events now that the Rust SDK supports wrapped heap types.
  • #269 Hashes the string "admin" and with the bits of an Identity when creating a storage slot to storage an admin in the Admin Library.
  • #276 Prepares for v0.23.0 release.
  • #278 Deprecates the Fixed Point number library.

Fixed

  • #258 Fixes incorrect instructions on how to run tests in README and docs hub.
  • #262 Fixes incorrect ordering comparison for IFP64, IFP128 and IFP256.
  • #263 Fixes I256's returned bits.
  • #263 Fixes I128 and I256's zero or "indent" value.
  • #268 Fixes subtraction involving negative numbers for I8, I16, I32, I64, I128, and I256.
  • #272 Fixes From implementations for Signed Integers with TryFrom.
  • #273 Fixes negative from implementations for Signed Integers.
  • #274 Fixes the swap_configurables() function to correctly handle the case where the bytecode is too large to fit in the buffer.
  • #275 Fixes an infinite loop in the Bytecode root library's _compute_bytecode_root() function.

Full Changelog: v0.22.0...v0.23.0

v0.22.0

07 Jun 06:07
172adbb
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.21.0...v0.22.0

v0.21.0

30 Apr 08:59
6a227ed
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.20.1...v0.21.0

v0.20.1

17 Apr 01:03
34a2d5a
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.20.0...v0.20.1

v0.20.0

16 Apr 01:07
57dbed5
Compare
Choose a tag to compare

What's Changed

Breaking Changes

  • All libraries are now imported using a single import:
sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.20.0" }

From there you may import your specific library:

use sway_libs::asset::base::*;
  • The asset::mint import is now asset::supply

New Contributors

Full Changelog: v0.19.0...v0.20.0

v0.19.0

14 Feb 04:53
dcbbec0
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.18.0...v0.19.0

v0.18.0

23 Jan 04:53
8d196e9
Compare
Choose a tag to compare

What's Changed

  • Bump Sway-Libs to forc v0.49.1 by @bitzoic in #209
  • Formalize Asset and Coin Terminology in Sway Libraries by @bitzoic in #208

Full Changelog: v0.17.2...v0.18.0

beta-5

25 Jan 13:46
8d196e9
Compare
Choose a tag to compare

What's Changed

  • Bump Sway-Libs to forc v0.49.1 by @bitzoic in #209
  • Formalize Asset and Coin Terminology in Sway Libraries by @bitzoic in #208

Full Changelog: v0.17.2...beta-5