-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Add NEP245 Multi Token Metadata Extension #92
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
base: main
Are you sure you want to change the base?
Conversation
e82e1b3
to
b3f86b2
Compare
I haven't found borsh implementation for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the minor test issue, the interface looks alright. No implementation seems to be available.
1303b21
to
5c1c5d3
Compare
@BonelessImpl I give up, I have no idea what to do with schemas (look at the failing build log). I've spent some time adding JsonSchema/trying to derive |
nit: perhaps implementation of borsh de-serialization should be moved to borsh-utils |
cc01fb1
to
f04a2f4
Compare
f04a2f4
to
e688c94
Compare
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThe changes introduce a new Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Contract
participant MetadataStore
Caller->>Contract: mt_metadata_contract()
Contract-->>Caller: MTContractMetadata
Caller->>Contract: mt_metadata_token_all(token_ids)
Contract->>MetadataStore: Fetch base & token metadata for token_ids
MetadataStore-->>Contract: Vec<Option<MTTokenMetadataAll>>
Contract-->>Caller: Vec<Option<MTTokenMetadataAll>>
Caller->>Contract: mt_tokens_base_metadata_all(from_index, limit)
Contract->>MetadataStore: Paginate base metadata
MetadataStore-->>Contract: Vec<MTBaseTokenMetadata>
Contract-->>Caller: Vec<MTBaseTokenMetadata>
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Overiew
This PR introduces interface required to implement NEP245 metadata extension
Token
struct extensionIn the specification it's stated:
Which I haven't done on purpose.
Technically, it can be implemented using rust compile features to enable/disable code in case of implementing an extension.
But that's actually a breaking change with the code that has already implemented "core" standard.
On the other hand, having a
token_id
is sufficient to get relatedtoken_metadata
andbase_metadata_id
(which formsMTTokenMetadataAll
combined together) by callingmt_metadata_token_all
.Summary by CodeRabbit
New Features
Chores