Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: update metadata field of fungible and non-fungible tokens, and dynamic NFTs #2210

Merged

Conversation

svetoslav-nikol0v
Copy link
Contributor

@svetoslav-nikol0v svetoslav-nikol0v commented Mar 18, 2024

Description:

HIP-646:
Similar to NFT’s on the network, the fungible token implementation is largely functional. There is a need for a token creator to specify additional “metadata” about the token. The data and formatting is explored in HIP-405 but there is no field suitable for storing the link to this metadata.

HIP-765:
Similar to NFTs on the network, the fungible token implementation is mainly functional. There is a need for a token creator to specify additional “metadata” about the token. The data and formatting are explored in HIP-766, but no field is suitable for storing the link to this metadata.

HIP-657:
Dynamic NFTs are a valuable addition to the world of non-fungible tokens because they allow for more interactive and immersive experiences. With the ability to update the metadata of an NFT, developers can create game pieces that gain new equipment and stats, legal agreements that reflect changing parameters, or even NFTs that update their images based on the time of day. Dynamic NFTs also open up the possibility for NFTs to be used in a wider range of industries and applications, such as supply chain tracking, real estate, among others. The potential for dynamic NFTs is numerous, and their introduction will greatly enhance the capabilities of the NFT ecosystem.

Updated protobufs.

Related issue(s):
#1733
#1736
#2188

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 59.61071% with 166 lines in your changes are missing coverage. Please review.

Project coverage is 74.46%. Comparing base (5c428d4) to head (f6cc669).
Report is 59 commits behind head on main.

❗ Current head f6cc669 differs from pull request most recent head 31f4612. Consider uploading reports for the commit 31f4612 to get more accurate results

Files Patch % Lines
src/token/TokenNftsUpdateTransaction.js 52.74% 112 Missing ⚠️
src/token/TokenInfo.js 11.53% 23 Missing ⚠️
src/token/TokenUpdateTransaction.js 76.92% 18 Missing ⚠️
src/token/TokenCreateTransaction.js 81.15% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2210      +/-   ##
==========================================
- Coverage   76.49%   74.46%   -2.03%     
==========================================
  Files         304      267      -37     
  Lines       75800    67166    -8634     
==========================================
- Hits        57986    50018    -7968     
+ Misses      17814    17148     -666     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
@svetoslav-nikol0v svetoslav-nikol0v force-pushed the 1733-add-hip-657-mutable-metadata-fields-for-dynamic-nfts branch from 19a0d2c to c86665c Compare April 18, 2024 06:21
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
@svetoslav-nikol0v svetoslav-nikol0v changed the title feature: mutable metadata fields for dynamic NFTs feature: update metadata field of fungible and non-fungible tokens, and dynamic NFTs Apr 18, 2024
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
examples/update-nfts-metadata.js Outdated Show resolved Hide resolved
examples/update-nfts-metadata.js Outdated Show resolved Hide resolved
examples/update-nfts-metadata.js Outdated Show resolved Hide resolved
examples/update-nfts-metadata.js Outdated Show resolved Hide resolved
examples/update-fungible-token-metadata-with-admin-key.js Outdated Show resolved Hide resolved
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
@svetoslav-nikol0v svetoslav-nikol0v force-pushed the 1733-add-hip-657-mutable-metadata-fields-for-dynamic-nfts branch from 5d00b72 to a18b596 Compare April 23, 2024 07:11
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
…-dynamic-nfts

Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
petreze
petreze previously approved these changes Apr 24, 2024
Copy link
Contributor

@petreze petreze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
Copy link

sonarcloud bot commented Apr 24, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
46.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@agadzhalov agadzhalov self-requested a review April 24, 2024 15:38
@svetoslav-nikol0v svetoslav-nikol0v merged commit 5fffabe into main Apr 24, 2024
8 of 9 checks passed
@svetoslav-nikol0v svetoslav-nikol0v deleted the 1733-add-hip-657-mutable-metadata-fields-for-dynamic-nfts branch April 24, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants