feat: Add NEP245 Multi Token Metadata Extension#92
Conversation
e82e1b3 to
b3f86b2
Compare
|
I haven't found borsh implementation for |
BonelessImpl
left a comment
There was a problem hiding this comment.
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
Tokenstruct 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_idis sufficient to get relatedtoken_metadataandbase_metadata_id(which formsMTTokenMetadataAllcombined together) by callingmt_metadata_token_all.Summary by CodeRabbit
New Features
Chores