From c53ef03cb120640abc8a130b0ad95583a3581756 Mon Sep 17 00:00:00 2001 From: Cameron Carstens Date: Mon, 28 Oct 2024 19:16:59 +0700 Subject: [PATCH] Rename SRC-7 to Onchain Native Asset Metadata Standard (#157) * Update SRC-7 to Onchain Native Asset Metadata Standard * Add onchain to spellcheck * Update CHANGELOG --- CHANGELOG.md | 1 + README.md | 2 +- docs/spell-check-custom-words.txt | 2 ++ docs/src/SUMMARY.md | 2 +- docs/src/index.md | 2 +- docs/src/src-7-asset-metadata.md | 10 +++++----- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b4cf94..e3c1b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Description of the upcoming release here. ### Changed - [#154](https://github.com/FuelLabs/sway-standards/pull/154) Updates the examples in the standards specififcations to use the offical abi name. +- [#157](https://github.com/FuelLabs/sway-standards/pull/157) Updates the name of the SRC-7 standard to "Onchain Native Asset Metadata Standard". ### Fixed diff --git a/README.md b/README.md index 3d91784..457cd19 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ If you don't find what you're looking for, feel free to create an issue and prop - [SRC-20; Native Asset Standard](https://docs.fuel.network/docs/sway-standards/src-20-native-asset/) 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](https://docs.fuel.network/docs/sway-standards/src-3-minting-and-burning/) is used to enable mint and burn functionality for fungible assets. -- [SRC-7; Arbitrary Asset Metadata Standard](https://docs.fuel.network/docs/sway-standards/src-7-asset-metadata/) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets). +- [SRC-7; Onchain Asset Metadata Standard](https://docs.fuel.network/docs/sway-standards/src-7-asset-metadata/) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets). - [SRC-9; Metadata Keys Standard](https://docs.fuel.network/docs/sway-standards/src-9-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](https://docs.fuel.network/docs/sway-standards/src-6-vault/) defines the implementation of a standard API for asset vaults developed in Sway. - [SRC-13; Soulbound Address](https://docs.fuel.network/docs/sway-standards/src-13-soulbound-address/) provides a predicate interface to lock [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets) as soulbound. diff --git a/docs/spell-check-custom-words.txt b/docs/spell-check-custom-words.txt index 65384a7..592616b 100644 --- a/docs/spell-check-custom-words.txt +++ b/docs/spell-check-custom-words.txt @@ -266,3 +266,5 @@ SetNameEvent SetSymbolEvent SetDecimalsEvent UpdateTotalSupplyEvent +Onchain +onchain diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index da0c2b7..caa2f15 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -6,7 +6,7 @@ - [SRC-3: Minting and Burning](./src-3-minting-and-burning.md) - [SRC-5: Ownership](./src-5-ownership.md) - [SRC-6: Vault](./src-6-vault.md) -- [SRC-7: Asset Metadata](./src-7-asset-metadata.md) +- [SRC-7: Onchain Asset Metadata](./src-7-asset-metadata.md) - [SRC-8: Bridged Asset](./src-8-bridged-asset.md) - [SRC-9: Metadata Keys](./src-9-metadata-keys.md) - [SRC-10: Native Bridge](./src-10-native-bridge.md) diff --git a/docs/src/index.md b/docs/src/index.md index e7d7b5b..770dbfd 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -38,7 +38,7 @@ use standards::src20::SRC20; - [SRC-20; Native Asset Standard](./src-20-native-asset.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](./src-3-minting-and-burning.md) is used to enable mint and burn functionality for fungible assets. -- [SRC-7; Arbitrary Asset Metadata Standard](./src-7-asset-metadata.md) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets). +- [SRC-7; Onchain Asset Metadata Standard](./src-7-asset-metadata.md) is used to store metadata for [Native Assets](https://docs.fuel.network/docs/sway/blockchain-development/native_assets). - [SRC-9; Metadata Keys Standard](./src-9-metadata-keys.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](./src-6-vault.md) defines the implementation of a standard API for asset vaults developed in Sway. - [SRC-13; Soulbound Address](./src-13-soulbound-address.md) defines the implementation of a soulbound address. diff --git a/docs/src/src-7-asset-metadata.md b/docs/src/src-7-asset-metadata.md index 3f3ae24..b19e7c5 100644 --- a/docs/src/src-7-asset-metadata.md +++ b/docs/src/src-7-asset-metadata.md @@ -1,10 +1,10 @@ -# SRC-7: Arbitrary Native Asset Metadata +# SRC-7: Onchain Native Asset Metadata -The following standard attempts to define the retrieval of on-chain arbitrary metadata for any [Native Asset](https://docs.fuel.network/docs/sway/blockchain-development/native_assets). Any contract that implements the SRC-7 standard MUST implement the [SRC-20](./src-20-native-asset.md) standard. +The following standard attempts to define the retrieval of on-chain arbitrary metadata for any [Native Asset](https://docs.fuel.network/docs/sway/blockchain-development/native_assets). This standard should be used if a stateful approach is needed. Any contract that implements the SRC-7 standard MUST implement the [SRC-20](./src-20-native-asset.md) standard. ## Motivation -The SRC-7 standard seeks to enable data-rich assets on the Fuel Network while maintaining compatibility between multiple assets minted by the same contract. The standard ensures type safety with the use of an `enum` and an `Option`. All metadata queries are done through a single function to facilitate cross-contract calls. +The SRC-7 standard seeks to enable stateful data-rich assets on the Fuel Network while maintaining compatibility between multiple assets minted by the same contract. The standard ensures type safety with the use of an `enum` and an `Option`. All metadata queries are done through a single function to facilitate cross-contract calls. ## Prior Art @@ -57,7 +57,7 @@ The `SetMetadataEvent` MUST be emitted when the metadata of an asset has updated There SHALL be the following fields in the `SetMetadataEvent` struct: -* `asset`: The `asset` field SHALL be used for the corresponding `AssetId` of the asset has been updated. +* `asset`: The `asset` field SHALL be used for the corresponding `AssetId` for the asset that has been updated. * `metadata`: The `metadata` field SHALL be used for the corresponding `Option` which represents the metadata of the asset. * `key`: The `key` field SHALL be used for the corresponding `String` which represents the key used for storing the metadata. * `sender`: The `sender` field SHALL be used for the corresponding `Identity` which made the function call that has updated the metadata of the asset. @@ -75,7 +75,7 @@ pub struct SetMetadataEvent { ## Rationale -The SRC-7 standard should allow for data-rich assets to interact with one another in a safe manner. +The SRC-7 standard should allow for stateful data-rich assets to interact with one another in a safe manner. ## Backwards Compatibility