All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- #312 Implements
TotalOrd
trait forI8
,I16
,I32
,I64
,I128
, andI256
. - #326 Introduces the Big Integers Library with the
BigUint
type. - #329 Introduce the Sparse Merkle Proof Library.
- #327 Updates the repository to forc
v0.66.7
, fuel-corev0.41.4
, and fuelsv0.70.0
.
- Some fix here 1
- Some fix here 2
- #329 Breaks imports for the Binary Merkle Library.
Before:
use sway_libs::merkle::binary_poof::*;
After:
use sway_libs::merkle::binary::*;
- #329 Breaks imports for the
LEAF
,NODE
,leaf_digest()
, andnode_disgest()
functions and constants.
Before:
use sway_libs::merkle::binary_proof::{LEAF, NODE, leaf_digest, node_digest};
After:
use sway_libs::merkle::common::{LEAF, NODE, node_digest};
use sway_libs::merkle::binary::{leaf_digest};
- #312 Breaks functionality of
I8
,I16
,I32
,I64
,I128
, andI256
's::min()
and::max()
functions. These functions are now used for comparison for two values of the type and return the higher or lower value respectively. To obtain the minimum and maximum values you must now use the::MIN
and::MAX
assosciated constants.
Before:
fn foo() -> I8 {
let minimum_i8 = I8::min();
let maximum_i8 = I8::max();
}
After:
fn foo() -> I8 {
let minimum_i8 = I8::MIN;
let maximum_i8 = I8::MAX;
}
- #318 Adds further documentation and examples for the
signed_integers
library. - #319 Adds further documentation and examples for the ownership library.
- #322 Adds further documentation and examples for the asset metadata library.
- None
- None
- #309 Adds fallback function test cases to the Reentrancy Guard Library.
- #310 Adds proxy tests cases to the Reentrancy Guard Library.
- #305 Updates to forc
v0.66.2
, fuel-corev0.40.0
, and fuels-rsv0.66.9
. - #306 Updates the SRC-7 naming to Onchain Native Asset Metadata Standard.
- #308 Removes comments on Cross-Contract Reentrancy vulnerability.
- #314 Prepares for the v0.24.1 release.
- #317 Updates the CI rust version to v1.83.0.
- #297 Fixes docs anchor in basic SRC-7 example.
- #298 Fixes the README headers on Upgradability Libraries from an
h2
to anh4
. - #302 Fixes typos in documentation.
- #303 Fixes links in the Upgradability Library documenation.
- #311 Fixes links in README.
- None
- #293 Adds the
BytecodeRoot
andContractConfigurables
types to the Bytecode Library. - #286 Adds the
_metadata()
function to the Asset Library.
- #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 theamount
argument is zero. - #289 Bumps Sway-Libs to forc
v0.63.3
, fuel-corev0.34.0
, and fuelsv0.66.2
. - #290 Update the Upgradeability library to use a specific storage slot for owner functionality.
- #291 Prepares for the
v0.24.0
release.
- #290 The
_proxy_owner()
,only_proxy_owner()
and_set_proxy_owner()
functions no longer takestorage.proxy_owner
as a parameter. Instead they directly read and write to the storage slot0xbb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea754
which issha256("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);
}
- None
- None
- None
- #259 Adds a new upgradability library, including associated tests and documentation.
- #265 Adds the
SetMetadataEvent
and emitsSetMetadataEvent
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.
- #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.
- #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
andI256
's zero or "indent" value. - #268 Fixes subtraction involving negative numbers for
I8
,I16
,I32
,I64
,I128
, andI256
. - #272 Fixes
From
implementations for Signed Integers withTryFrom
. - #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.
- #263 Removes the
TwosComplement
trait in favor ofWrappingNeg
.
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. TheTryFrom
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. Theneg_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.