-
Notifications
You must be signed in to change notification settings - Fork 2
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 certificates are not visible in Explorer or Wallet #47
Comments
From Jacob: I know why |
@encody Maybe https://docs.near.org/docs/tutorials/contracts/nfts/events will help. |
@encody I must have done c21628c#diff-2a7c850f07d7c32c9b9fc46f98c990db85465fbfbf71d17931951f59a3c9c108R65 wrong because after rebuild and redeploy and new mint, https://explorer.testnet.near.org/transactions/DDdGymM7EDRUkAaNECzDbYU1sLqtfoS2gtRfY8AzNZiU still doesn't show |
@encody Actually (as we guessed since you showed a screenshot proving that your testnet wallet does have some collectibles, so this has worked before), probably we can delete this whole branch. None of that new code should have been necessary. I see I just haven't figured out why that event hasn't been getting emitted. |
I just did a fresh pull & build. It seems to work fine as-is: https://explorer.testnet.near.org/transactions/7a3BdXMGFprAG5n4rLVFvB6BEpu1VmUFQ9PYxffd83Sx#4TEh2bs4PBAF9fChgNSufwNPRgWtfgTmHJn2PUPTn7tW Events: EVENT_JSON:{"standard":"x-nearedu-cert","version":"1.0.0","event":"cert_issue","data":"{\"Issue\":{\"recipient_id\":\"hatchet.testnet\",\"token_id\":\"103216412112497cb6c193152a27c49a\",\"memo\":null}}"}
EVENT_JSON:{"standard":"nep171","version":"1.0.0","event":"nft_mint","data":[{"owner_id":"hatchet.testnet","token_ids":["103216412112497cb6c193152a27c49a"]}]} |
@encody Ok. Since I still don't see it at https://wallet.testnet.near.org/profile/hatchet.testnet I'm guessing I never was supposed to be able to see it there. It seems like only you (when logged in) can see it. That kind of makes sense to me, because I don't think our protocol should allow people to forcefully spam other people's wallets. But I remember conversations about this. I wonder if Wallet "fixed" this (ie. maybe Wallet in the past displayed all of an account's NFTs by default but no longer does). If yes, I wonder if there is a way for an owner of a wallet to manually choose which NFTs to display publicly. But that's just a side question and not a blocker here. I will also try minting one to my own account now and see whether it works. Steps:
Why do you think the images are broken in these 2 views? What does the "icon" field at https://explorer.testnet.near.org/transactions/3NM7EjhiJzZReKBZoCsnAMVnydkHiPfqo46kHNb46VDi do? I tried to set the N logo as the icon. And we do see an N logo (in the first screenshot, to the left of NEAR University Certificate). So does that mean the icon is working? But both screenshots have broken images too. Where are those supposed to have been defined? |
UPDATE about |
@encody |
@ryancwalsh The broken images appear to be where the wallet would put additional metadata specified in the icon: string|null, // Data URL
base_uri: string|null, // Centralized gateway known to have reliable access to decentralized storage assets referenced by `reference` or `media` URLs
reference: string|null, // URL to a JSON file with more info
reference_hash: string|null, // Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included. Here is an example of what that metadata might look like:
{
"spec": "nft-1.0.0",
"name": "deadmau5",
"symbol": "dm5",
"icon": "data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAJCT/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAEQAAAAEAEAEAEAAAAQAQAQAQAAAAEREREQAAAAAAEAAAAAAAAAAQAAAAAAAAABEQAAEQAAAAEAEAEAEAAAAQAQAQAQAAAAEREREQAAAAAAAAEAAAAAAAAAAQAAAAAAAAERAAAAAAAAEAEAAAAAAAAQAQAAAAAAAAEQAADnnwAA228AANtvAADgHwAA+/8AAPv/AAD48wAA+20AAPttAAD8AwAA/+8AAP/vAAD/jwAA/28AAP9vAAD/nwAA",
"base_uri": "https://arweave.net",
"reference": null,
"reference_hash": null
}
{
"token_id": "241272",
"owner_id": "jeph.near",
"approved_account_ids": {},
"metadata": {
"title": null,
"description": null,
"media": null,
"media_hash": null,
"copies": 100,
"issued_at": null,
"expires_at": null,
"starts_at": null,
"updated_at": null,
"extra": "music",
"reference": "nb0-oBR379DzoFYeYv-LesjVNmrVlDs5IqQ8hfDfnMU",
"reference_hash": null
},
"royalty": {
"split_between": {
"portugaltheman.near": {
"numerator": 3750
},
"deadmau5.near": {
"numerator": 3750
},
"woodencyclops.near": {
"numerator": 500
},
"smearballs.near": {
"numerator": 2000
}
},
"percentage": {
"numerator": 1000
}
},
"split_owners": null,
"minter": "mau5trap.near",
"loan": null,
"composeable_stats": {
"local_depth": 0,
"cross_contract_children": 0
},
"origin_key": null
} The {
"category": "music",
"description": "Single by deadmau5 x Portugal. The Man\n@deadmau5 @portugaltheman\n \nArtwork by Smearballs x Wooden Cyclops\n@smearballs @woodencyclops \n \n1 million units minted on the NEAR protocol, with additional utility and integrations in the metaverse.",
"copies": 1,
"media_hash": "iZ_zHjbOs8rqAQDHYVE2moonW80ydYwkx7VBNzHdS5A",
"lock": null,
"visibility": "safe",
"youtube_url": null,
"animation_url": "https://arweave.net/uirST9TAzYywSKj6nuvV9Ki_4LBxuzBko9xH8OAalnI",
"animation_hash": "uirST9TAzYywSKj6nuvV9Ki_4LBxuzBko9xH8OAalnI",
"document": null,
"document_hash": null,
"royalty": {
"smearballs.near": 2000,
"woodencyclops.near": 500,
"portugaltheman.near": 3750,
"deadmau5.near": 3750
},
"royalty_perc": 0.1,
"split_revenue": {
"smearballs.near": 2000,
"woodencyclops.near": 500,
"portugaltheman.near": 3750,
"deadmau5.near": 3750
},
"tags": [],
"media": "https://arweave.net/iZ_zHjbOs8rqAQDHYVE2moonW80ydYwkx7VBNzHdS5A",
"extra": [
{
"trait_type": "website",
"value": "https://deadmau5.com"
}
],
"title": "this is fine",
"store": "deadmau5.mintbase1.near",
"external_url": "https://deadmau5.com",
"type": "NEP171"
} of which However, that's just the first NFT I bothered to look up. My guess is that we can just use the built-in |
@encody Ok, I can try using the Here were my other questions from above:
|
@encody The And https://wallet.testnet.near.org/?tab=collectibles shows the old one still as broken but the new one with the N logo: |
I think that the contract was being built using an old version of the
Currently the contract implementation does not provide any way to alter the metadata after deployment. I can add that functionality (or maybe only the option to modify certain fields, such as |
Great. Can you please do that? Because we're nearly ready to deploy to mainnet and get this going, finally. E.g. maybe @petarvujovic98 and I could be ready as soon as tomorrow or the next day. I think we probably want to leave everything (rather than just I think it will be a very interesting learning experience for me (and maybe others) to see how you do it. Thanks. |
Very cool. Thanks!
|
Possibly. This could be accomplished in a few ways:
Assuming you still have a full-access key on that account, simply running another deploy contract transaction will overwrite the contract. State will be preserved, so Rasha will still have her certificate, assuming that the storage keys are unaltered. |
@encody Cool, thank you so much! Yeah I don't think there will be a reason for us ever to delete the private key to this account, so it sounds like we're set. And the other options were good to hear about too for other projects. |
I minted a NCD cert for Rasha. I don't see it at https://explorer.near.org/accounts/rashaabdulrazzak.near or https://wallet.near.org/profile/rashaabdulrazzak.near .
But then again on testnet I did https://explorer.testnet.near.org/transactions/95XiTn7uEatwXU3D7Q2SrfTGbJYQ23UzMU69f1G1PW9E but don't see it in https://explorer.testnet.near.org/accounts/hatchet.testnet
How do NEAR NFTs work? Where should we be able to see them?
E.g. I think the NFT at least exists because https://certificates.near.university/account/rashaabdulrazzak.near shows it (the image is just broken because of a bug with canvas that I'll need to figure out due to Render using a different version of something).
The text was updated successfully, but these errors were encountered: