From 270350e69bd7455b7e99f0aae2e29a94d42324bd Mon Sep 17 00:00:00 2001 From: Cameron Carstens Date: Tue, 6 Aug 2024 17:52:12 +0700 Subject: [PATCH] Release v0.5.2 (#127) * Hotfix: Update Cargo.toml to v0.5.1 (#115) * Hotfix: Update Cargo.toml to v0.5.1 * Udpate CHANGELOG * fix vault reads * add changelog * move changelog to new empty changelog * add "unreleased" to changelog heads * remove date * add v0.5.1 * SRC-6 example contract does not update managed assets (#122) * Update SRC-6 example with decrementation of managed assets * Update CHANGELOG * Fix link on CHANGELOG.md * Update CHANGELOG to resolve markdown error with duplicate headers * Write to storage * Use new namespace syntax for storage (#120) * chore: fix compiler warnings * remove for examples * Update changelog * Prepare master for v0.5.2 release (#126) * Prepare for v0.5.2 release * Update CHANGELOG * Update CHANGELOG formatting --------- Co-authored-by: SwayStar123 Co-authored-by: SwayStar123 <46050679+SwayStar123@users.noreply.github.com> Co-authored-by: IGI-111 Co-authored-by: Sophie Co-authored-by: K1-R1 <77465250+K1-R1@users.noreply.github.com> --- .github/workflows/ci.yaml | 4 +- CHANGELOG.md | 51 +++++++++++++++---- Cargo.toml | 2 +- README.md | 8 +-- docs/src/index.md | 4 +- .../src14-simple-proxy/minimal/src/minimal.sw | 4 +- .../src14-simple-proxy/owned/src/owned.sw | 14 ++--- .../src6-vault/multi_asset_vault/src/main.sw | 13 ++++- .../single_asset_single_sub_vault/src/main.sw | 4 ++ .../src6-vault/single_asset_vault/src/main.sw | 13 ++++- standards/src/src10.sw | 7 +++ 11 files changed, 94 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 08621d4..a133f9e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ env: CARGO_TERM_COLOR: always REGISTRY: ghcr.io RUST_VERSION: 1.77.0 - FORC_VERSION: 0.60.0 + FORC_VERSION: 0.61.0 CORE_VERSION: 0.26.0 PATH_TO_SCRIPTS: .github/scripts @@ -61,7 +61,7 @@ jobs: run: forc fmt --path standards --check - name: Build All Standards - run: forc build --path standards + run: forc build --error-on-warnings --path standards - name: Check Sway Formatting Examples run: forc fmt --path examples --check diff --git a/CHANGELOG.md b/CHANGELOG.md index b99f637..a248bf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,30 +5,63 @@ 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/). -## [Version 0.5.1] +## [Unreleased] + +### Added Unreleased + +- Something new here 1 +- Something new here 2 + +### Changed Unreleased + +- Something changed here 1 +- Something changed here 2 + +### Fixed Unreleased + +- Some fix here 1 +- Some fix here 2 + +### Breaking Unreleased -Description of the upcoming release here. +- Some breaking change here 1 +- Some breaking change here 2 + +## [Version 0.5.2] + +### Changed v0.5.2 + +- [#126](https://github.com/FuelLabs/sway-standards/pull/126) Prepares for v0.5.2 release. + +### Fixed v0.5.2 + +- [#121](https://github.com/FuelLabs/sway-standards/pull/121) Fixes the `deposit` function in the SRC-6 standard, uses try_read instead of read in order to allow first time deposits to a vault. +- [#122](https://github.com/FuelLabs/sway-standards/pull/122) Fixes the SRC-6 example contract from a critical bug where the contract can be drained. +- [#124](https://github.com/FuelLabs/sway-standards/pull/124) Fixes compiler warnings for libraries + +## [Version 0.5.1] -### Added +### Added v0.5.1 -- [#107](https://github.com/FuelLabs/sway-standards/pull/107): Adds the `proxy_owner()` function to the SRC-14 standard. -- [#104](https://github.com/FuelLabs/sway-standards/pull/104): Adds the CHANGELOG.md file to Sway-Standards. +- [#107](https://github.com/FuelLabs/sway-standards/pull/107) Adds the `proxy_owner()` function to the SRC-14 standard. +- [#104](https://github.com/FuelLabs/sway-standards/pull/104) Adds the CHANGELOG.md file to Sway-Standards. - [#110](https://github.com/FuelLabs/sway-standards/pull/110) Adds the `proxy_target()` function to the SRC-14 standard. -- [#103](https://github.com/FuelLabs/sway-standards/pull/103): Adds Sway-Standards to the [docs hub](https://docs.fuel.network/docs/sway-standards/). +- [#103](https://github.com/FuelLabs/sway-standards/pull/103) Adds Sway-Standards to the [docs hub](https://docs.fuel.network/docs/sway-standards/). -### Changed +### Changed v0.5.1 - [#103](https://github.com/FuelLabs/sway-standards/pull/103) Removes standards in the `./SRC` folder in favor of `./docs`. - [#106](https://github.com/FuelLabs/sway-standards/pull/106) Updates links from the Sway Book to Docs Hub. +- [#120](https://github.com/FuelLabs/sway-standards/pull/120) Updates repository to forc v0.61.0 and uses new namespace in SRC-14 example. -### Fixed +### Fixed v0.5.1 - [#107](https://github.com/FuelLabs/sway-standards/pull/107) resolves the conflict when SRC-5's `owner()` function is used in both the proxy and target contract in the SRC-14 standard. - [#99](https://github.com/FuelLabs/sway-standards/pull/99) Fixes links and typos in the SRC-14 standard. - [#112](https://github.com/FuelLabs/sway-standards/pull/112) Fixes inline documentation code in the SRC-3 standard. - [#115](https://github.com/FuelLabs/sway-standards/pull/115) Hotfixes the Cargo.toml version to the v0.5.1 release. -#### Breaking +### Breaking v0.5.1 - [#110](https://github.com/FuelLabs/sway-standards/pull/110) Breaks the `SRC14` abi by adding the `proxy_target()` function. This will need to be added to any SRC14 implementation. The new abi is as follows: diff --git a/Cargo.toml b/Cargo.toml index b24d5d6..2891dc9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,4 @@ [package] name = "sway-standards" -version = "0.5.1" +version = "0.5.2" edition = "2021" diff --git a/README.md b/README.md index ff0a73b..ae45a84 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ - - + + @@ -65,7 +65,7 @@ If you don't find what you're looking for, feel free to create an issue and prop To import a standard the following should be added to the project's `Forc.toml` file under `[dependencies]` with the most recent release: ```toml -standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.5.1" } +standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.5.2" } ``` > **NOTE:** @@ -162,7 +162,7 @@ Example of a minimal SRC-14 implementation with no access control. Example of a SRC-14 implementation that also implements [SRC-5](https://docs.fuel.network/docs/sway-standards/src-5-ownership/). > **Note** -> All standards currently use `forc v0.60.0`. +> All standards currently use `forc v0.61.0`.