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

Add IRC27 and IRC30 metadata utilities #1160

Merged
merged 8 commits into from
Sep 7, 2023
Merged

Add IRC27 and IRC30 metadata utilities #1160

merged 8 commits into from
Sep 7, 2023

Conversation

DaughterOfMars
Copy link

Description of change

This PR adds two kinds of NFT Immutable Metadata schemas. These can be created and used directly as a MetadataFeature in the immutable features of an NFT.

Links to any relevant issues

Closes #504

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

I added tests for serialization, and used the metadata in a separate NFT test. However, there is an issue with that test. The input selection returns an Err(InsufficientAmount { found: 302000, required: 490500 }) when it should return UnfulfillableRequirement.

@DaughterOfMars DaughterOfMars linked an issue Sep 6, 2023 that may be closed by this pull request
@Thoralf-M
Copy link
Member

Thoralf-M commented Sep 7, 2023

The test probably fails because the new metadata is smaller and then there is not enough amount for a remainder output and the amount requirement is just checked before. I would just revert the changes in this test.

Would be nice to have the examples make use of the new types, for example in https://github.com/iotaledger/iota-sdk/blob/develop/sdk/examples/how_tos/native_tokens/create.rs#L68 and

.with_immutable_metadata(NFT1_IMMUTABLE_METADATA.as_bytes().to_vec())];

Also bindings are not updated

@DaughterOfMars
Copy link
Author

Created #1169 and #1170 to add bindings

Copy link
Member

@Thoralf-M Thoralf-M left a comment

Choose a reason for hiding this comment

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

Clippy

@DaughterOfMars DaughterOfMars merged commit 97d696a into 1.1 Sep 7, 2023
24 checks passed
@DaughterOfMars DaughterOfMars deleted the feat/irc-utils branch September 7, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide functions to create TIP27 and TIP30 compatible assets
3 participants