Closed hunzai closed 1 year ago
@hunzai I will start work on this when the previous issue solved.
@hunzai sir, should I start working on this issue ? or should I wait till you merged the previous task ?
@Shan-barcha the PR is merged.
@hunzai sir, wallet.getAssets(); gives us assects from the wallet, I don't have any collections to fetch. if you have any test collections please send them to me.
please guide me a little bit more about this.
@Shan-barcha I will create some test collections.
In the next, PR you can work on the followings
See example below.
sir, I haven't received test collections!
@Shan-barcha send me your pre-prod wallet address.
@Shan-barcha rename /wallet page to /nfts and implement code in that page
addr_test1qp666nn4pmlv70ylpdd4chxz5qm7v39t67skg3e40gn7dtcq7aj2ytz4msx0y4gerdvvcr8vgxazhxsr8zwtu4h62sssa2gty0
prepod wallet adddress.
@Shan-barcha sent NFTs , let me know. There are three different policies these should be enough for testing
sir made some changes please take a look.
I am unable to display images by policyId .
@Shan-barcha what is the json response you are getting when you fetch asset from wallet? Does it contain image url ?
You can get floor price using
https://server.jpgstoreapis.com/collection/0bada513e47a999e756233c3213be4eed17361149db55d425f697dcd/floor
where
https://server.jpgstoreapis.com/collection/
Add an to the backend and get by implementing a method e.g. floorPrice(policyId) , let me know if u need help
sir, i didn't get any image URL in the JSON response.
@Shan-barcha for now use a fake image
work on floor mentioned above
sir as I mentioned above there is no image URL in the JSON response. for now, I just use the same image for all NFTs .
integrate https://blockfrost.io/ and use https://blockfrost.dev/docs/sdks-js
{
"asset": "3bcc312ebe7cd9281ab3e3d641bf70f207012e539b0e6e7c3f1560d73242696c6c35363034",
"policy_id": "3bcc312ebe7cd9281ab3e3d641bf70f207012e539b0e6e7c3f1560d7",
"asset_name": "3242696c6c35363034",
"fingerprint": "asset1fpma0dczekxdjm3pw33jr6uh6qldxt5jt6vkhg",
"quantity": "1",
"initial_mint_tx_hash": "c2eee460ad5d32c42ec90c883f216d888b5069712f49c8bef932743666917c07",
"mint_or_burn_count": 1,
"onchain_metadata": {
"image": "ipfs://QmZiMc14ekVLgh9a9riMRUk3Lakz8cuufWBTJTV7uAhnbK",
"Base": "Base 4",
"Eyes": "Left",
"Hair": "Wild",
"Head": "Eyes Color",
"Mask": "Nothing",
"Name": ".2 Bill #5604",
"Nose": "Nothing",
"Suit": "Torso",
"Asset": "2Bill5604",
"Blood": "Nothing",
"Horns": "Nothing",
"Label": "WTF",
"Mouth": "Girl Red",
"Spear": "Spear 3",
"Stamp": "Zimbabwe",
"files": [
{
"src": "ipfs://QmZiMc14ekVLgh9a9riMRUk3Lakz8cuufWBTJTV7uAhnbK",
"name": "2Bill5604",
"mediaType": "image/jpeg"
}
],
"Number": "5604",
"Phrase": "12",
"Series": "$0.2 Bills",
"Contour": "Doodles",
"Drawing": "ADA",
"Eye Pop": "Nothing",
"Glasses": "Nothing",
"Website": "https://www.oldmoney.io",
"Forehead": "Nothing",
"mediaType": "image/jpeg",
"Collection": "Old Money",
"Laser Eyes": "Nothing",
"Degradation": "Fold 3",
"Note Number": "18",
"Stamp Color": "Green",
"Plate Number": "33",
"Serial Number": "Z12671602",
"Burns and Tape": "Tape 1"
},
"metadata": null
}
replace ipfs://
with https://ipfs.io/
in ipfs/QmQqzMTavQgT4f4T5v6PWBp7XNKtoPmC9jvn12WPT3gkSE
sir now everything works now but the image is not showing could you please check...
sir should i use tag instead of nextjs image tag
it works when I use the simple img tag.
sir update the pull request please have a look.
Each NFT has a policyId (each collection has same policyID) for example https://www.jpg.store/collection/theapesociety has many NFTs/Assets with same policy id.
In simple words, the name of collection is mapped to a unique policyId.
Feature To Implement As a multiple NFTs owner, I want to display NFTs on a web page by policyId.
Examples I have two collections
When I connect to the page then I see two cards with summary of each collection. Each card contains,