From 348f7175df4c012b23c86cdb18aab79025ca1f18 Mon Sep 17 00:00:00 2001 From: Cameron Carstens Date: Fri, 31 May 2024 10:00:09 +0800 Subject: [PATCH] Release v0.5.0 (#101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: fix typos in README (#86) * change vault_sub_id back to sub_id * docs: improve SRC-20 (#88) * docs: improve SRC-3 (#85) * Update to latest Sway Transform abusive usage of configurables into constants to support latest version of Sway that uses encoded configurables. * Update README.md * SRC-14 Simple Proxy Standard * Apply suggestions from code review Co-authored-by: Cameron Carstens * Set standard target address storage location * Apply suggestions from code review Co-authored-by: SwayStar123 <46050679+SwayStar123@users.noreply.github.com> * Update SRCs/src-14.md Co-authored-by: Cameron Carstens * Correct typo * Apply suggestions from code review Co-authored-by: João Matos * Add link to UUPS * Update to forc v0.60.0 (#96) * Update to forc v0.60.0 * Run formatter * address PR comments * Update CI * Delete docs.yml and gh-pages.yml * Update pull request template to include checklist (#93) * Fix README for release --------- Co-authored-by: Paul Razvan Berg Co-authored-by: SwayStar123 Co-authored-by: Paul Razvan Berg Co-authored-by: SwayStar123 <46050679+SwayStar123@users.noreply.github.com> Co-authored-by: IGI-111 Co-authored-by: João Matos Co-authored-by: K1-R1 <77465250+K1-R1@users.noreply.github.com> --- .github/PULL_REQUEST_TEMPLATE.md | 11 +++ .github/workflows/ci.yaml | 6 +- README.md | 24 +++--- SRCs/src-10.md | 4 +- SRCs/src-14.md | 80 +++++++++++++++++++ SRCs/src-2.md | 2 +- SRCs/src-20.md | 12 +-- SRCs/src-3.md | 18 ++--- SRCs/src-8.md | 18 ++--- SRCs/src-9.md | 2 +- examples/Forc.toml | 2 + .../hardcoded-information/src/main.sw | 65 ++++++++------- .../variable-information/src/main.sw | 56 +++++++------ .../src/with_configurables.sw | 15 +--- .../src/without_configurables.sw | 7 +- examples/src14-simple-proxy/minimal/Forc.toml | 8 ++ .../src14-simple-proxy/minimal/src/minimal.sw | 26 ++++++ examples/src14-simple-proxy/owned/Forc.toml | 8 ++ .../src14-simple-proxy/owned/src/owned.sw | 49 ++++++++++++ .../src/initialized_example.sw | 7 +- .../single_asset_single_sub_vault/src/main.sw | 3 +- standards/src/src12.sw | 3 +- standards/src/src14.sw | 28 +++++++ standards/src/src3.sw | 18 ++--- standards/src/standards.sw | 1 + 25 files changed, 334 insertions(+), 139 deletions(-) create mode 100644 SRCs/src-14.md create mode 100644 examples/src14-simple-proxy/minimal/Forc.toml create mode 100644 examples/src14-simple-proxy/minimal/src/minimal.sw create mode 100644 examples/src14-simple-proxy/owned/Forc.toml create mode 100644 examples/src14-simple-proxy/owned/src/owned.sw create mode 100644 standards/src/src14.sw diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ed5927c3..5b25f97c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -24,3 +24,14 @@ The following changes have been made: Closes #\ + +## Checklist + +- [ ] I have linked to any relevant issues. +- [ ] I have commented my code, particularly in hard-to-understand areas. +- [ ] 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) +- [ ] I have added tests that prove my fix is effective or that my feature works. +- [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. +- [ ] 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). +- [ ] I have requested a review from the relevant team or maintainers. diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ea85bbe6..08621d4a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,9 +15,9 @@ concurrency: env: CARGO_TERM_COLOR: always REGISTRY: ghcr.io - RUST_VERSION: 1.75.0 - FORC_VERSION: 0.56.0 - CORE_VERSION: 0.24.2 + RUST_VERSION: 1.77.0 + FORC_VERSION: 0.60.0 + CORE_VERSION: 0.26.0 PATH_TO_SCRIPTS: .github/scripts jobs: diff --git a/README.md b/README.md index 0e5ea80d..1b62f122 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ - - + + @@ -22,9 +22,9 @@ ## Overview -The purpose of this repository is to contain standards for the Sway Language which users can import and use. +The purpose of this repository is to contain standards for the Sway Language which users can import and use. -Standards in this repository may be in various stages of development. Use of draft standards and feedback on the proposed standards is encouraged. To use a draft, search for a standard using the appropriate GitHub label and implement the standard abi into your contract. +Standards in this repository may be in various stages of development. Use of draft standards and feedback on the proposed standards is encouraged. To use a draft, search for a standard using the appropriate GitHub label and implement the standard abi into your contract. If you don't find what you're looking for, feel free to create an issue and propose a new standard! @@ -36,7 +36,7 @@ If you don't find what you're looking for, feel free to create an issue and prop ### Native Assets - [SRC-20; Native Asset Standard](./SRCs/src-20.md) defines the implementation of a standard API for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets) using the Sway Language. -- [SRC-3; Mint and Burn](./SRCs/src-3.md) is used to enable mint and burn functionality for Native Assets. +- [SRC-3; Mint and Burn](./SRCs/src-3.md) is used to enable mint and burn functionality for fungible assets. - [SRC-7; Arbitrary Asset Metadata Standard](./SRCs/src-7.md) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets). - [SRC-9; Metadata Keys Standard](./SRCs/src-9.md) is used to store standardized metadata keys for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets) in combination with the SRC-7 standard. - [SRC-6; Vault Standard](./SRCs/src-6.md) defines the implementation of a standard API for asset vaults developed in Sway. @@ -66,7 +66,7 @@ To import a standard the following should be added to the project's `Forc.toml` standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.5.0" } ``` -> **NOTE:** +> **NOTE:** > Be sure to set the tag to the latest release. You may then import your desired standard in your Sway Smart Contract as so: @@ -87,7 +87,7 @@ Minimal example implementations for every standard can be found in the [`example #### SRC-20; Native Asset Standard Examples -##### - [Single Native Assset](./examples/src20-native-asset/single_asset/src/single_asset.sw) +##### - [Single Native Asset](./examples/src20-native-asset/single_asset/src/single_asset.sw) Example of the SRC-20 implementation where a contract contains a single asset with one `SubId`. This implementation is recommended for users that intend to deploy a single asset with their contract. @@ -119,15 +119,15 @@ Example of the SRC-5 implementation where a contract has an owner set at compile ##### [Multi Asset Vault](./examples/src6-vault/multi_asset_vault/) -A basic implementation of the vault standard that supports any number of sub vaults being created for every AssetId. +A basic implementation of the vault standard that supports any number of sub vaults being created for every `AssetId`. ##### [Single Asset Vault](./examples/src6-vault/single_asset_vault/) -A basic implementation of the vault standard demonstrating how to restrict deposits and withdrawals to a single AssetId. +A basic implementation of the vault standard demonstrating how to restrict deposits and withdrawals to a single `AssetId`. ##### [Single Asset Single Sub Vault](./examples/src6-vault/single_asset_single_sub_vault/) -A basic implementation of the vault standard demonstrating how to restrict deposits and withdrawals to a single AssetId, and to a single Sub vault. +A basic implementation of the vault standard demonstrating how to restrict deposits and withdrawals to a single `AssetId`, and to a single Sub vault. #### SRC-7; Arbitrary Asset Metadata Standard Examples @@ -147,10 +147,10 @@ Example of the SRC-12 implementation where contract deployments contain configur ##### [Without Configurables](./examples/src12-contract-factory/without_configurables/src/without_configurables.sw) -Example of the SRC-12 implementation where all contract deployments are identitcal and thus have the same bytecode and root. +Example of the SRC-12 implementation where all contract deployments are identical and thus have the same bytecode and root. > **Note** -> All standards currently use `forc v0.56.0`. +> All standards currently use `forc v0.60.0`.