-
Notifications
You must be signed in to change notification settings - Fork 170
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 EVMBridgedMetadata & URI to MetadataViews #203
Conversation
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.
This makes sense to me. Would you want to deploy this upgrade to MetadataViews
before the Crescendo upgrade so people can start adding it immediately, or do we want to deploy this as part of the Crescendo upgrade? If the latter is true, we should base this on the standard-v2
branch
Updating to note I added a @joshuahannan I think deploying the update before Crescendo makes the most sense to allow projects to adopt the view as they see fit before bridging is enabled. There was constructive discussion in the linked discord thread, but I'd hoped for more community feedback before merging this view. I'll raise this PR again in discord to ask folks to share feedback. |
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.
We want to do this upgrade before Cadence 1.0, right? After we merge this, can you make a PR updating the V2 standards to include this and also add an implementation for it in the V2 ExampleNFT? I can do the upgrades on testnet and mainnet
Yeah, we'd want to include this before 1.0. I can follow up with a PR including an implementation. |
oh yeah, and make sure you run |
Related: #129
Description
With EVM on Flow coming in the near future, we'll need to reconcile differences between EVM & Cadence NFT metadata handling expectations and standards.
Motivated by ongoing work while iterating on the VM bridge, this PR puts forth two metadata views for consideration.
The first,
URI
, is a generic struct intended to store a string pointer to some metadata. In many cases, this may just be a JSON blob at a URL or an IPFS pointer. In other cases, this may actually be NFT metadata as a JSON blob itself as in URL-encoded URIs. In the case of ERC721s bridged from EVM, we likely won't have enough context to determine the type of URI this is, thus the generic nature of this view.Here is the
URI
interface:The second,
EVMBridgedMetadata
, contains three fieldsThe fields
name
andsymbol
are included in several ERC standards, notablyERC721
andERC20
. The last field,uri
, allows Cadence projects to define how they would like their token or contract's metadata to be transmitted to an EVM counterpart. In the case of Cadence-native projects, this field could be anyFile
implementing struct, while in the case of bridged assets (e.g. ERC721) theuri
value would likely just be aURI
struct.Without getting into the specifics of bridging assets which is out of scope for this PR, it would be very helpful to get feedback on the views as their presented, if we feel they're worth adding in the MetadataViews contract, and if the community feels anything is missing from these very barebones implementations.
For contributor use:
master
branchFiles changed
in the Github PR explorer