NOTE - Make sure to use only DEVNET for the task.
Fork this repo, create a nextjs app. Using @solana/wallet-adapter add a button to the page to enable a user to connect their phantom wallet with the app.
When a user connects their wallet, display the mindIds
of all the spl-tokens currently in the user's wallet by making use of getProgramAccounts method. Also displays the decimals of each token using getParsedAccountInfo.
Add a textbox to the page. When the mintId of a NFT is entered, the attributes
of the NFT should be shown. Explore @metaplex-foundation/js for this.
Eg. for the NFT with mintId - CRHpiQu8AeUC7vvDbj58vRizsv65xbRBkpaJKnVgwF2e
TRAIT TYPE | VALUE |
---|---|
Background | Red |
Fur / Skin | Red / Blue |
Head | Musketeer's Hat |
Mouth | Soda |
Teeth | No Traits |
Clothing | Black T-Shirt |
Eyewear | Shutter Shades |
generation | 1 |
sequence | 236 |
Add two textboxes and a submit button to the page. The textboxes will be used to enter trait_type and value respectively. When the submit button is clicked send a transaction which if approved by user, adds the trait entered to attributes array of the NFT (Assume the user to be the update_authority of the NFT).
- make use of metaplex-foundation/js for uploading metadata file to arweave and updating the onchain uri.