Closed VexyCats closed 3 years ago
thanks for your issue, this first token support release and this is supporting only ZRC2. now it is still in developing.
This version of NFT has critical bugs, ZIlPay wallet will not support. ZilPay wallet will support it when bug will be fix
What critical bugs? Care to elaborate?
When adding tokens to the new design, I was tempted to insert an NFT address. Of course it doesn't work - says a bad contract address.
So lets get NFTs working on the zilpay wallet.
I've included the smart contract code at the bottom, for ZRC-1 so you can see what is an NFT.
Heres the basics:
To display the NFT in zilpay - zilpay should:
Take the contract address and fetch the state.
Search the state for 3 things: token_owners (array), token_uris (array), total supply (uint256). And the contract init values (name, symbol, owner of contract).
Search for the current users address within the token_owners array to see which tokens they own. A. Optional: Don't search the array but instead allow the user to input the token id of the token that they own. B. (Best option) Expose a method on Zilpay that can be called to add a token to their list of owned tokens. The dapp can then provide the information needed and the token automatically appears in their wallet if they own it
Query the token_uri array for the URL for that token. Then fetch the JSON from that URL and display the "image" field in the wallet.
Then a user can see their NFTs and can also transfer their NFTs by calling the transfer method in the contract code below.
ZRC-1 used by Mintable and suggested ZRC-1 standard: