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 NFT serialization #20

Merged
merged 25 commits into from
Apr 3, 2024
Merged

Add NFT serialization #20

merged 25 commits into from
Apr 3, 2024

Conversation

sisyphusSmiling
Copy link
Contributor

@sisyphusSmiling sisyphusSmiling commented Mar 18, 2024

Closes: #17
Related: #15
Stacked on #19

Description

This PR introduces a Cadence test framework covering new serialization functionality. Serialization is used on bridging a Cadence-native NFT to EVM, serializing its metadata in conformance with widely used metadata standards (OpenSea's metadata format), and committing the returned data URL JSON string as the tokenURI value in the target ERC721. The same approach is taken to retrieve contract-level metadata, committing the data URL as the contractURI value. In both cases, project-specified URIs defined in CrossVMNFT.EVMBridgedMetadata views are checked first, and serialization is leveraged as a fallback in the event projects did not specify token- or contract-level URIs.

Source contracts are treated as ground truth for NFT metadata, so bridging from native VMs to non-native VMs results in a recommitment of URI values. This means that if metadata will be "synced" to the non-native contract upon bridging between VMs based on state at the time of bridging.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@sisyphusSmiling sisyphusSmiling mentioned this pull request Apr 1, 2024
6 tasks
Copy link
Member

@nvdtf nvdtf left a comment

Choose a reason for hiding this comment

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

LGTM!

@sisyphusSmiling sisyphusSmiling changed the base branch from add-bridge-interface to main April 3, 2024 20:49
@sisyphusSmiling sisyphusSmiling merged commit 1ed2dab into main Apr 3, 2024
2 checks passed
@sisyphusSmiling sisyphusSmiling deleted the add-serialization branch April 26, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Create a serialization mechanism to derive a URI compatible with EVM NFT platforms
6 participants