-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [v0.23.0] ### Added - [#259](#259) Adds a new upgradability library, including associated tests and documentation. - [#265](#265) Adds the `SetMetadataEvent` and emits `SetMetadataEvent` when the `_set_metadata()` function is called. - [#270](#270) Adds `OrdEq` functionality to Signed Integers. - [#272](#272) Adds the `TryFrom` implementation from signed integers to unsigned integers. ### Changed - [#265](#265) Enables the metadata events now that the Rust SDK supports wrapped heap types. - [#269](#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](#276) Prepares for v0.23.0 release. - [#278](#278) Deprecates the Fixed Point number library. ### Fixed - [#258](#258) Fixes incorrect instructions on how to run tests in README and docs hub. - [#262](#262) Fixes incorrect ordering comparison for IFP64, IFP128 and IFP256. - [#263](#263) Fixes `I256`'s returned bits. - [#263](#263) Fixes `I128` and `I256`'s zero or "indent" value. - [#268](#268) Fixes subtraction involving negative numbers for `I8`, `I16`, `I32`, `I64`, `I128`, and `I256`. - [#272](#272) Fixes `From` implementations for Signed Integers with `TryFrom`. - [#273](#273) Fixes negative from implementations for Signed Integers. - [#274](#274) Fixes the `swap_configurables()` function to correctly handle the case where the bytecode is too large to fit in the buffer. - [#275](#275) Fixes an infinite loop in the Bytecode root library's `_compute_bytecode_root()` function. #### Breaking - [#263](#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: ```sway let my_i8 = i8::zero(); let twos_complement = my_i8.twos_complement(); ``` After: ```sway let my_i8 = i8::zero(); let wrapping_neg = my_i8.wrapping_neg(); ``` - [#272](#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: ```sway let my_i8: I8 = I8::from(1u8); ``` After: ```sway let my_i8: I8 = I8::try_from(1u8).unwrap(); ``` - [#273](#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: ```sway let my_negative_i8: I8 = I8::neg_from(1u8); ``` After: ```sway let my_negative_i8: I8 = I8::neg_try_from(1u8).unwrap(); ``` - [#278](#278) Deprecates the Fixed Point number library. The Fixed Point number library is no longer available. --------- Co-authored-by: K1-R1 <[email protected]> Co-authored-by: SwayStar123 <[email protected]>
- Loading branch information
1 parent
172adbb
commit 9987d8a
Showing
241 changed files
with
3,662 additions
and
6,057 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @FuelLabs/application-dev | ||
* @FuelLabs/swayex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## [v0.23.0] | ||
|
||
### Added | ||
|
||
- [#259](https://github.com/FuelLabs/sway-libs/pull/259) Adds a new upgradability library, including associated tests and documentation. | ||
- [#265](https://github.com/FuelLabs/sway-libs/pull/265) Adds the `SetMetadataEvent` and emits `SetMetadataEvent` when the `_set_metadata()` function is called. | ||
- [#270](https://github.com/FuelLabs/sway-libs/pull/270) Adds `OrdEq` functionality to Signed Integers. | ||
- [#272](https://github.com/FuelLabs/sway-libs/pull/272) Adds the `TryFrom` implementation from signed integers to unsigned integers. | ||
|
||
### Changed | ||
|
||
- [#265](https://github.com/FuelLabs/sway-libs/pull/265) Enables the metadata events now that the Rust SDK supports wrapped heap types. | ||
- [#269](https://github.com/FuelLabs/sway-libs/pull/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](https://github.com/FuelLabs/sway-libs/pull/276) Prepares for v0.23.0 release. | ||
- [#278](https://github.com/FuelLabs/sway-libs/pull/278) Deprecates the Fixed Point number library. | ||
|
||
### Fixed | ||
|
||
- [#258](https://github.com/FuelLabs/sway-libs/pull/258) Fixes incorrect instructions on how to run tests in README and docs hub. | ||
- [#262](https://github.com/FuelLabs/sway-libs/pull/262) Fixes incorrect ordering comparison for IFP64, IFP128 and IFP256. | ||
- [#263](https://github.com/FuelLabs/sway-libs/pull/263) Fixes `I256`'s returned bits. | ||
- [#263](https://github.com/FuelLabs/sway-libs/pull/263) Fixes `I128` and `I256`'s zero or "indent" value. | ||
- [#268](https://github.com/FuelLabs/sway-libs/pull/268) Fixes subtraction involving negative numbers for `I8`, `I16`, `I32`, `I64`, `I128`, and `I256`. | ||
- [#272](https://github.com/FuelLabs/sway-libs/pull/272) Fixes `From` implementations for Signed Integers with `TryFrom`. | ||
- [#273](https://github.com/FuelLabs/sway-libs/pull/273) Fixes negative from implementations for Signed Integers. | ||
- [#274](https://github.com/FuelLabs/sway-libs/pull/274) Fixes the `swap_configurables()` function to correctly handle the case where the bytecode is too large to fit in the buffer. | ||
- [#275](https://github.com/FuelLabs/sway-libs/pull/275) Fixes an infinite loop in the Bytecode root library's `_compute_bytecode_root()` function. | ||
|
||
#### Breaking | ||
|
||
- [#263](https://github.com/FuelLabs/sway-libs/pull/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: | ||
|
||
```sway | ||
let my_i8 = i8::zero(); | ||
let twos_complement = my_i8.twos_complement(); | ||
``` | ||
|
||
After: | ||
|
||
```sway | ||
let my_i8 = i8::zero(); | ||
let wrapping_neg = my_i8.wrapping_neg(); | ||
``` | ||
|
||
- [#272](https://github.com/FuelLabs/sway-libs/pull/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: | ||
|
||
```sway | ||
let my_i8: I8 = I8::from(1u8); | ||
``` | ||
|
||
After: | ||
|
||
```sway | ||
let my_i8: I8 = I8::try_from(1u8).unwrap(); | ||
``` | ||
|
||
- [#273](https://github.com/FuelLabs/sway-libs/pull/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: | ||
|
||
```sway | ||
let my_negative_i8: I8 = I8::neg_from(1u8); | ||
``` | ||
|
||
After: | ||
|
||
```sway | ||
let my_negative_i8: I8 = I8::neg_try_from(1u8).unwrap(); | ||
``` | ||
|
||
- [#278](https://github.com/FuelLabs/sway-libs/pull/278) Deprecates the Fixed Point number library. The Fixed Point number library is no longer available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[package] | ||
name = "sway-libs" | ||
version = "0.22.0" | ||
version = "0.23.0" | ||
edition = "2021" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,4 +207,6 @@ Enqueuing | |
Dequeuing | ||
StorageMetadata | ||
functionly | ||
verifiably | ||
verifiably | ||
upgradable | ||
upgradability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.