Skip to content

Commit

Permalink
Update based on review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bitzoic committed Oct 3, 2023
1 parent b179008 commit 9f1287e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions libs/token/src/metadata.sw
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ impl StorageKey<StorageMetadata> {
///
/// # Arugments
///
/// * `asset`: [AssetId] - The asset for the metadata is to be stored.
/// * `key`: [String] - The key for the metadata is to be stored.
/// * `metadata`: [Metadata] - The metadata which is to be stored.
/// * `asset`: [AssetId] - The asset for the metadata to be stored.
/// * `key`: [String] - The key for the metadata to be stored.
/// * `metadata`: [Metadata] - The metadata which to be stored.
///
/// # Number of Storage Accesses
///
Expand Down Expand Up @@ -82,8 +82,8 @@ impl StorageKey<StorageMetadata> {
///
/// # Arugments
///
/// * `asset`: [AssetId] - The asset for the metadata is to be queried.
/// * `key`: [String] - The key for the metadata is to be queried.
/// * `asset`: [AssetId] - The asset for the metadata to be queried.
/// * `key`: [String] - The key for the metadata to be queried.
///
/// # Returns
///
Expand Down Expand Up @@ -137,9 +137,9 @@ impl StorageKey<StorageMetadata> {
/// # Arguments
///
/// * `metadata_key`: [StorageKey<StorageMetadata>] - The storage location for metadata.
/// * `asset`: [AssetId] - The asset for the metadata is to be stored.
/// * `key`: [String] - The key for the metadata is to be stored.
/// * `metadata`: [Metadata] - The metadata which is to be stored.
/// * `asset`: [AssetId] - The asset for the metadata to be stored.
/// * `key`: [String] - The key for the metadata to be stored.
/// * `metadata`: [Metadata] - The metadata which to be stored.
///
/// # Number of Storage Accesses
///
Expand Down Expand Up @@ -349,16 +349,16 @@ impl Metadata {
/// # Examples
///
/// ```sway
/// use std::string::String;
/// use std::{constants::ZERO_B256, string::String};
/// use token::src_7::*;
/// use src_7::{SRC7, Metadata};
///
/// fn foo(contract_id: ContractId, asset: AssetId, key: String) {
/// let metadata_abi = abi(SRC7, contract_id);
/// let metadata = metadata_abi.metadata(asset, key);
///
/// let int = metadata.unwrap().as_b256();
/// assert(int != 0);
/// let val = metadata.unwrap().as_b256();
/// assert(val != ZERO_B256);
/// }
/// ```
pub fn as_b256(self) -> Option<b256> {
Expand Down

0 comments on commit 9f1287e

Please sign in to comment.