-
Notifications
You must be signed in to change notification settings - Fork 4
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
NFT original metadata #552
Changes from all commits
b5cc2d4
1158bfb
17df32c
288718f
4814722
d5069d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2689,6 +2689,10 @@ components: | |
type: string | ||
metadata_accessed: | ||
type: string | ||
metadata: | ||
description: | | ||
A metadata document for this NFT instance. | ||
Currently only ERC-721 is supported, where the document is an Asset Metadata from the ERC721 Metadata JSON Schema. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://eips.ethereum.org/EIPS/eip-721 their schema is here. if higher effort, we could import that and say it could be that schema |
||
name: | ||
type: string | ||
description: Identifies the asset which this NFT represents | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1603,6 +1603,7 @@ func (c *StorageClient) RuntimeEVMNFTs(ctx context.Context, limit *uint64, offse | |
&ownerAddrData, | ||
&nft.MetadataUri, | ||
&metadataAccessedN, | ||
&nft.Metadata, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and then this does unmarshal the JSON from the db into Metadata interface{} as like maps and stuff 🤷 and our API layer later re-marshals it 🔁 |
||
&nft.Name, | ||
&nft.Description, | ||
&nft.Image, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE chain.evm_nfts | ||
ADD COLUMN metadata JSONB; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. using a json type to be nice to people who want to do things in the db. but beware there are no indices. downside is that both go and postgresql will parse the JSON code. if they ever have any difference in opinion on what's valid JSON, then someone could break our indexer. |
||
|
||
COMMIT; |
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.
apparently this makes it so that the string is the JSON serialized value. I have no idea how, hypothetically, to tell the db that "the JSON value was a string, here's that string."