From 44ab7374da03745548e77f8e1495a5907555bbe4 Mon Sep 17 00:00:00 2001 From: bitzoic Date: Fri, 22 Dec 2023 12:37:56 -0500 Subject: [PATCH 1/3] Add missing standards, organize standards, and update links --- README.md | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2a7b3ac..2d3a42e 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,26 @@ If you don't find what you're looking for, feel free to create an issue and prop ## Standards -- [SRC-20; Token Standard](./standards/src_20/) 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-2; Inline Documentation](./standards/src_2/) defines how to document your Sway files. -- [SRC-3; Mint and Burn](./standards/src_3/) is used to enable mint and burn functionality for Native Assets. -- [SRC-5; Ownership Standard](./standards/src_5/) is used to restrict function calls to admin users in contracts. -- [SRC-7; Arbitrary Asset Metadata Standard](./standards/src_7/) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets). -- [SRC-9; Metadata Keys Standard](./standards/src_9/) is used to store standardized metadata keys for [Native Assets](https://fuellabs.github.io/sway/v0.44.0/book/blockchain-development/native_assets.html) in combination with the SRC-7 standard. +### Native Assets + +- [SRC-20; Token Standard](./standards/src20-token/) 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](./standards/src3-mint-burn/) is used to enable mint and burn functionality for Native Assets. +- [SRC-7; Arbitrary Asset Metadata Standard](./standards/src7-metadata/) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets). +- [SRC-9; Metadata Keys Standard](./standards/src9-metadata-keys/) 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](./standards/src6-vault/) defines the implementation of a standard API for token vaults developed in Sway. + +### Access Control + +- [SRC-5; Ownership Standard](./standards/src5-ownership/) is used to restrict function calls to admin users in contracts. + +### Bridge + +- [SRC-8; Bridged Asset](./standards/src8-bridged-asset/) defines the metadata required for an asset bridged to the Fuel Network. + +### Documentation + +- [SRC-2; Inline Documentation](./standards/src2-inline-docs/) defines how to document your Sway files. + ## Using a standard @@ -57,7 +71,7 @@ use standard::; For example, to import the SRC-20 Token Standard use the following statements in your `Forc.toml` and Sway Smart Contract file respectively: ```rust -src20 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.1.1" } +src20 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.1.0" } ``` ```rust @@ -98,6 +112,20 @@ Example of the SRC-5 implementation where a contract does not have an owner set Example of the SRC-5 implementation where a contract has an owner set at compile time. +#### SRC-6; Vault Standard Examples + +##### [Multi Token Vault](./examples/src6-vault/multi_token_vault/) + +A barebones implementation of the vault standard that supports any number of sub vaults being created for every AssetId. + +##### [Single Token Vault](./examples/src6-vault/single_token_vault/) + +A barebones implemenation of the vault standard demonstrating how to constrict deposits and withdrawals to a single AssetId. + +##### [Single Token Single Sub Vault](./examples/src6-vault/single_token_single_sub_vault/) + +A barebones implementation of the vault standard demonstrating how to constrict deposits and withdrawals to a single AssetId, and to a single Sub vault. + #### SRC-7; Arbitrary Asset Metadata Standard Examples ##### - [Single Native Asset](./examples/src7-metadata/single_asset/src/single_asset.sw) From 1ebf0585070da94c83b1356d29fe9a7e17f25b45 Mon Sep 17 00:00:00 2001 From: bitzoic Date: Fri, 22 Dec 2023 12:53:28 -0500 Subject: [PATCH 2/3] Update based on PR comments --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2d3a42e..90c0782 100644 --- a/README.md +++ b/README.md @@ -116,15 +116,15 @@ Example of the SRC-5 implementation where a contract has an owner set at compile ##### [Multi Token Vault](./examples/src6-vault/multi_token_vault/) -A barebones 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 Token Vault](./examples/src6-vault/single_token_vault/) -A barebones implemenation of the vault standard demonstrating how to constrict deposits and withdrawals to a single AssetId. +A basic implemenation of the vault standard demonstrating how to constrict deposits and withdrawals to a single AssetId. ##### [Single Token Single Sub Vault](./examples/src6-vault/single_token_single_sub_vault/) -A barebones implementation of the vault standard demonstrating how to constrict deposits and withdrawals to a single AssetId, and to a single Sub vault. +A basic implementation of the vault standard demonstrating how to constrict deposits and withdrawals to a single AssetId, and to a single Sub vault. #### SRC-7; Arbitrary Asset Metadata Standard Examples From faf104b06f5a25eb4efe21b8930b3d91222bf06a Mon Sep 17 00:00:00 2001 From: bitzoic Date: Wed, 27 Dec 2023 10:57:34 -0500 Subject: [PATCH 3/3] Update based on PR comments --- README.md | 4 ++-- standards/src6-vault/README.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 90c0782..a512b4f 100644 --- a/README.md +++ b/README.md @@ -120,11 +120,11 @@ A basic implementation of the vault standard that supports any number of sub vau ##### [Single Token Vault](./examples/src6-vault/single_token_vault/) -A basic implemenation of the vault standard demonstrating how to constrict 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 Token Single Sub Vault](./examples/src6-vault/single_token_single_sub_vault/) -A basic implementation of the vault standard demonstrating how to constrict 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 diff --git a/standards/src6-vault/README.md b/standards/src6-vault/README.md index a16d137..8a2c1fb 100644 --- a/standards/src6-vault/README.md +++ b/standards/src6-vault/README.md @@ -174,12 +174,12 @@ abi SRC6 { ## [Multi Token Vault](../../examples/src6-vault/multi_token_vault/) -A barebones 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 Token Vault](../../examples/src6-vault/single_token_vault/) -A barebones implemenation of the vault standard demonstrating how to constrict 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 Token Single Sub Vault](../../examples/src6-vault/single_token_single_sub_vault/) -A barebones implementation of the vault standard demonstrating how to constrict deposits and withdrawals to a single AssetId, and to a single Sub vault. \ No newline at end of file +A basic implementation of the vault standard demonstrating how to restrict deposits and withdrawals to a single AssetId, and to a single Sub vault. \ No newline at end of file