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

@sisyphusSmiling sisyphusSmiling force-pushed the add-bridge-interface branch 2 times, most recently from 4755a6c to 516ecc6 Compare March 18, 2024 22:21
@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 marked this pull request as ready for review March 20, 2024 18:03
@sisyphusSmiling sisyphusSmiling requested a review from a team as a code owner March 20, 2024 18:03
@sisyphusSmiling sisyphusSmiling mentioned this pull request Mar 27, 2024
6 tasks
@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