Skip to content

Commit f868bde

Browse files
authored
Update to forc v0.67.0 and prepare v0.25.0 release (#334)
## Type of change <!--Delete points that do not apply--> - Improvement (refactoring, restructuring repository, cleaning tech debt, ...) ## Changes The following changes have been made: - Updates the repository to forc `v0.67.0` - Prepares for the `v0.25.0` release ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers. - [x] I have updated the changelog to reflect the changes on this PR.
1 parent c151254 commit f868bde

File tree

37 files changed

+156
-128
lines changed

37 files changed

+156
-128
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
CARGO_TERM_COLOR: always
1717
REGISTRY: ghcr.io
1818
RUST_VERSION: 1.84.0
19-
FORC_VERSION: 0.66.7
19+
FORC_VERSION: 0.67.0
2020
CORE_VERSION: 0.41.4
2121

2222
jobs:

.github/workflows/gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
env:
1111
RUST_VERSION: 1.84.0
12-
FORC_VERSION: 0.66.7
12+
FORC_VERSION: 0.67.0
1313
CORE_VERSION: 0.41.4
1414

1515
jobs:

CHANGELOG.md

+29-5
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,43 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Added
1111

12+
- Some addition here.
13+
- Some addition here.
14+
15+
### Changed
16+
17+
- Some change here.
18+
- Some change here.
19+
20+
### Fixed
21+
22+
- Some fix here.
23+
- Some fix here.
24+
25+
### Breaking
26+
27+
- Some breaking change here.
28+
- Some breaking change here.
29+
30+
## [Version 0.25.0]
31+
32+
### Added v0.25.0
33+
1234
- [#312](https://github.com/FuelLabs/sway-libs/pull/312) Implements `TotalOrd` trait for `I8`, `I16`, `I32`, `I64`, `I128`, and `I256`.
1335
- [#326](https://github.com/FuelLabs/sway-libs/pull/326) Introduces the Big Integers Library with the `BigUint` type.
1436
- [#329](https://github.com/FuelLabs/sway-libs/pull/329) Introduce the Sparse Merkle Proof Library.
1537
- [#333](https://github.com/FuelLabs/sway-libs/pull/333) Adds `BigInt` inline tests for expected behavior on overflow and unsafe math.
1638

17-
### Changed
39+
### Changed v0.25.0
1840

1941
- [#327](https://github.com/FuelLabs/sway-libs/pull/327) Updates the repository to forc `v0.66.7`, fuel-core `v0.41.4`, and fuels `v0.70.0`.
42+
- [#334](https://github.com/FuelLabs/sway-libs/pull/334) Prepares for the `v0.25.0` release.
2043

21-
### Fixed
44+
### Fixed v0.25.0
2245

23-
- Some fix here 1
24-
- Some fix here 2
46+
- None
2547

26-
### Breaking
48+
### Breaking v0.25.0
2749

2850
- [#329](https://github.com/FuelLabs/sway-libs/pull/329) Breaks imports for the Binary Merkle Library.
2951

@@ -116,6 +138,8 @@ fn foo() -> I8 {
116138
}
117139
```
118140

141+
- [#334](https://github.com/FuelLabs/sway-libs/pull/334) Updates to the forc `v0.67.0` release. Earlier versions are *not* compatible.
142+
119143
## [Version v0.24.2]
120144

121145
### Added v0.24.2

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[package]
22
name = "sway-libs"
3-
version = "0.24.2"
3+
version = "0.25.0"
44
edition = "2021"

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<a href="https://github.com/FuelLabs/sway-libs/actions/workflows/ci.yml" alt="CI">
1010
<img src="https://github.com/FuelLabs/sway-libs/actions/workflows/ci.yml/badge.svg" />
1111
</a>
12-
<a href="https://crates.io/crates/forc/0.66.7" alt="forc">
13-
<img src="https://img.shields.io/badge/forc-v0.66.7-orange" />
12+
<a href="https://crates.io/crates/forc/0.67.0" alt="forc">
13+
<img src="https://img.shields.io/badge/forc-v0.67.0-orange" />
1414
</a>
1515
<a href="./LICENSE" alt="forc">
1616
<img src="https://img.shields.io/github/license/FuelLabs/sway-libs" />
@@ -75,7 +75,7 @@ For implementation details on the libraries please see the [Sway Libs Docs](http
7575
To import a library, the following dependency should be added to the project's `Forc.toml` file under `[dependencies]`.
7676

7777
```rust
78-
sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.24.2" }
78+
sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.25.0" }
7979
```
8080

8181
> **NOTE:**
@@ -97,7 +97,7 @@ For more information about implementation please refer to the [Sway Libs Docs Hu
9797

9898
## Running Tests
9999

100-
There are two sets of tests that should be run: inline tests and sdk-harness tests. Please make sure you are using `forc v0.66.7` and `fuel-core v0.41.4`. You can check what version you are using by running the `fuelup show` command.
100+
There are two sets of tests that should be run: inline tests and sdk-harness tests. Please make sure you are using `forc v0.67.0` and `fuel-core v0.41.4`. You can check what version you are using by running the `fuelup show` command.
101101

102102
Make sure you are in the source directory of this repository `sway-libs/<you are here>`.
103103

@@ -119,7 +119,7 @@ forc test --path tests --release --locked && cargo test --manifest-path tests/Ca
119119
Any instructions related to using a specific library should be found within the README.md of that library.
120120

121121
> **NOTE:**
122-
> All projects currently use `forc v0.66.7`, `fuels-rs v0.70.0` and `fuel-core v0.41.4`.
122+
> All projects currently use `forc v0.67.0`, `fuels-rs v0.70.0` and `fuel-core v0.41.4`.
123123
124124
## Contributing
125125

docs/book/src/getting_started/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
To import any library, the following dependency should be added to the project's `Forc.toml` file under `[dependencies]`.
66

77
```sway
8-
sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.24.2" }
8+
sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.25.0" }
99
```
1010

1111
For reference, here is a complete `Forc.toml` file:
@@ -18,7 +18,7 @@ license = "Apache-2.0"
1818
name = "MyProject"
1919
2020
[dependencies]
21-
sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.24.2" }
21+
sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.25.0" }
2222
```
2323

2424
> **NOTE:** Be sure to set the tag to the latest release.
@@ -38,7 +38,7 @@ use sway_libs::ownership::only_owner;
3838
```
3939

4040
> **NOTE:**
41-
> All projects currently use `forc 0.66.7`, `fuels-rs v0.70.0` and `fuel-core 0.41.4`.
41+
> All projects currently use `forc 0.67.0`, `fuels-rs v0.70.0` and `fuel-core 0.41.4`.
4242
4343
## Using Sway Libs
4444

examples/Forc.lock

+2-7
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ dependencies = [
5959
"sway_libs",
6060
]
6161

62-
[[package]]
63-
name = "core"
64-
source = "path+from-root-DD4F12EBC39CAB5B"
65-
6662
[[package]]
6763
name = "merkle_binary_examples"
6864
source = "member"
@@ -157,13 +153,12 @@ dependencies = [
157153

158154
[[package]]
159155
name = "standards"
160-
source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.6.0#65e09f95ea8b9476b171a66c8a47108f352fa32c"
156+
source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.7.0#7d35df95e0b96dc8ad188ab169fbbeeac896aae8"
161157
dependencies = ["std"]
162158

163159
[[package]]
164160
name = "std"
165-
source = "git+https://github.com/fuellabs/sway?tag=v0.66.7#5ed7cec6dbcd42f0c2f84df8511a4c0007b1902e"
166-
dependencies = ["core"]
161+
source = "git+https://github.com/fuellabs/sway?tag=v0.67.0#d821dcb0c7edb1d6e2a772f5a1ccefe38902eaec"
167162

168163
[[package]]
169164
name = "supply_docs"

examples/admin/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "admin_examples"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../libs" }

examples/asset/base_docs/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "base_docs"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../../libs" }

examples/asset/basic_src20/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "basic_src20"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../../libs" }

examples/asset/basic_src3/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "basic_src3"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../../libs" }

examples/asset/basic_src7/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "basic_src7"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../../libs" }

examples/asset/metadata_docs/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "metadata_docs"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../../libs" }

examples/asset/setting_src20_attributes/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "setting_src20_attributes"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../../libs" }

examples/asset/setting_src7_attributes/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "setting_src7_attributes"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../../libs" }

examples/asset/supply_docs/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "supply_docs"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../../libs" }

examples/ownership/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "ownership_examples"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../libs" }

examples/upgradability/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ license = "Apache-2.0"
55
name = "upgradability_examples"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }
99
sway_libs = { path = "../../libs" }

libs/Forc.lock

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
[[package]]
2-
name = "core"
3-
source = "path+from-root-DD4F12EBC39CAB5B"
4-
51
[[package]]
62
name = "standards"
7-
source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.6.0#65e09f95ea8b9476b171a66c8a47108f352fa32c"
3+
source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.7.0#7d35df95e0b96dc8ad188ab169fbbeeac896aae8"
84
dependencies = ["std"]
95

106
[[package]]
117
name = "std"
12-
source = "git+https://github.com/fuellabs/sway?tag=v0.66.7#5ed7cec6dbcd42f0c2f84df8511a4c0007b1902e"
13-
dependencies = ["core"]
8+
source = "git+https://github.com/fuellabs/sway?tag=v0.67.0#d821dcb0c7edb1d6e2a772f5a1ccefe38902eaec"
149

1510
[[package]]
1611
name = "sway_libs"

libs/Forc.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ license = "Apache-2.0"
55
name = "sway_libs"
66

77
[dependencies]
8-
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.6.0" }
8+
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.7.0" }

libs/src/bigint.sw

+8-6
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl Into<Bytes> for BigUint {
417417
}
418418
}
419419

420-
impl core::ops::Eq for BigUint {
420+
impl PartialEq for BigUint {
421421
fn eq(self, other: Self) -> bool {
422422
if self.limbs.len() != other.limbs.len() {
423423
false
@@ -436,7 +436,9 @@ impl core::ops::Eq for BigUint {
436436
}
437437
}
438438

439-
impl core::ops::Ord for BigUint {
439+
impl Eq for BigUint {}
440+
441+
impl Ord for BigUint {
440442
fn gt(self, other: Self) -> bool {
441443
// Save some gas by assuming anything with more limbs is larger
442444
if self.limbs.len() == other.limbs.len() {
@@ -482,7 +484,7 @@ impl core::ops::Ord for BigUint {
482484
}
483485
}
484486

485-
impl core::ops::OrdEq for BigUint {}
487+
impl OrdEq for BigUint {}
486488

487489
fn add_with_carry_u64(a: u64, b: u64, c: u64) -> (u64, u64) {
488490
let a_u128: U128 = a.into();
@@ -493,7 +495,7 @@ fn add_with_carry_u64(a: u64, b: u64, c: u64) -> (u64, u64) {
493495
sum.into()
494496
}
495497

496-
impl core::ops::Add for BigUint {
498+
impl Add for BigUint {
497499
fn add(self, other: Self) -> Self {
498500
// Determine the length and setup variables
499501
let max_limbs = self.limbs.len().max(other.limbs.len());
@@ -542,7 +544,7 @@ fn mac_with_carry_u64(acc: u64, a: u64, b: u64, c: u64) -> (u64, u64) {
542544
res.into()
543545
}
544546

545-
impl core::ops::Multiply for BigUint {
547+
impl Multiply for BigUint {
546548
fn multiply(self, other: Self) -> Self {
547549
// Determine the length and setup variables
548550
let self_number_of_limbs = self.limbs.len();
@@ -613,7 +615,7 @@ fn sub_with_borrow_u64(a: u64, b: u64, c: u64) -> (u64, u64) {
613615
(diff_lsw, carry)
614616
}
615617

616-
impl core::ops::Subtract for BigUint {
618+
impl Subtract for BigUint {
617619
fn subtract(self, other: Self) -> Self {
618620
// No negative numbers
619621
if self < other {

0 commit comments

Comments
 (0)