Exactly what I was looking for. The fact that you sensed a problem that exists and came up with a solution and then shared to the outside world, its just too generous. Many Thanks.
Honestly, you're a really good dev, I've been searching for ways, to uniquely upload uri metadata for erc1155, you just solved my issues in a few minutes. keep it up bro
Hi Avour I am struggling with some of the basic concepts with in this video. I was wondering if I could ask you a few questions regarding some of the aspects covered in this video?
Hi Artur, I am getting warning by using change uri function: Warning: This declaration shadows an existing declaration. When I ignore the warning and deploy the smart contract, the metadata is not visible on NFTs. Can you please help?
The only thing I could currently ask for is verifying support for ERC165 and testing for it. Otherwise, love your videos, they're concise and very helpful
Hey Artur I'm really grateful for your content, I'm working on my own erc1155 token to use with an NFT collection I'm working on and I'm stuck in exactly on the URI metadata mine doesn't have the default because when copied the code from Openzeppelin I had left the URI blank since I didn't know what to put in their.....how do I fix it
If my token id is 0 how am i supposed to fill 64 zeroes in the {id} ? when i try to do like you explained i get 0.json which doesn't work with ERC1155 because the file name needs to be padded with zeroes
Incredible Video. Thanks for sharing. One thing that is confusing is how would you create a smart contract that does not allow users to mint from a set of pre-loaded NFT's but rather mint their own nfts/tokens. Do you just remove everything from the constructor and in ERC155 you put no string? So in the constructor you just have.... ERC1155 " ". Like you just have quotes with an empty string? In other words nothing goes in the quotes? Instead users can just use the mint function and setToken Uri to create their own NFT's? Would love to see a video on creating these contracts without minting a set of pre-set nfts/tokens but rather just allowing the user to mint their own nft's and set their own meta data.
Great video Artur. How would one update 100x setTokenUri efficiently? When I tested this, I called it in a for loop and Metamask would prompt me to sign every iteration individually. :(
Hello friend, how are you? great your video! one question, can I put the private BaseUri? I don't want them to see my NFT before minting, is that valid?
Hi Artur, thanks for this tutorial. Will this IPFS link work straight forward as entered in the .sol or we have to connect through API? I tried using the same link as you have done but, I'm seeing any images populated in the NFT it's blank and sometimes, only the first NFT is minted with images and meta tags and the rest are blank. Any thoughts?
Just one question ! I'd like my GameItems to be upgradable, and for this I need a way to make distinction between the different "instances" of the same tokenID... I've been working on it for hours but I can't got it to work =( Would be a very advanced and useful tutorial... don't you think ? :D
@@ArturChmaro That's a real shame, and sounds almost like a deal breaker for any rpg like game :/ Also I don't really understand how the network could transfer one address's token to another address without being able to have a reference to this token ! Or is it like a "fake transfer" and the method actually just decrease the balance of the sender and increase the balance of the receiver for this tokenID ? Would make sense... I suppose the only workaround for my upgrade system then would be to have separate tokenID for the different levels of weapons and burn the token to mint the upgraded one... But in the front end (unity) it seems difficult to know which token replaced which one (in inventory for instance...) Have you thought about this sort of mechanism yourself ?
@@DustVoltrage If you want to have upgrades per item I think what you really have to do is mint "Firesword" with amount of 1 and just transfer it to the player. Then player can update Firesword#1 to "Firesword Enhanced #1". However if you want to mint Firesword#2 that has amount of 200 then you can just track ownerships of that very specific item. If you upgrade that item then all the holders would have updated version.
@@ArturChmaro But this would be hell to create the item database this way. What about = - having a struct for my weapon "class" that i can declare as the owner, i would create as many as i want - then user would pass a specific weapon to the mint function - mint function would create automatically a new tokenID so each weapon minted has its own tokeniD What do you think ? I would still need each token to keep the struct associated with the token though
I have one question, i am minting 2000 nft using ERC1155 but in batch of 500, what if one of the batch get failed to mint, does that mint all 500 nfts from 501 to 1000 will fail to mint of only few will mint and i will get error for remaining nfts that failed? do let me know the answer .
@@ArturChmaro can you please provide any reference link where this is mentioned that it will fail whole batch? it will be very helpful to explain to my team.
I think frozen is just extra feature offered by OpenSea. After clicking it they are putting meta data to IPFS and just marking collection as frozen on their side.
Hey Artur do you think it is worth adding an error check to this code for the case of someone calling the uri function for a tokenID that has not yet had a tokenURI set for it.
Hi Habib I am struggling with some of the basic concepts with in this video. I was wondering if I could ask you a few questions regarding some of the aspects covered in this video? You seem to have a very good understanding of it
For anyone who is currious why is there Unnamed collection - hash. You need to add few variables " // Contract name string public name; // Contract symbol string public symbol; " into your .sol file and set them up in the constructor.
IS THERE A NEED TO SPECIFY THE NAME AND SYMBOL IF The ERC1155 standard interface has a URI (Uniform Resource Identifier) that can point to a file where you can specify all the characteristics of the token (name, symbol, description, size, color or whatever you want) ?
I see multiple solutions here: 1. Customize contract so it tracks token ids owned by certain ppl. 2. Store that data centralized way 3. Fetch all events emitted from contract and parse them
Exactly what I was looking for. The fact that you sensed a problem that exists and came up with a solution and then shared to the outside world, its just too generous. Many Thanks.
Glad it helped you Farhan!
agree, very useful. Thanks. There's no Opensea 1155 tutorial which doesn't help.
Honestly, you're a really good dev, I've been searching for ways, to uniquely upload uri metadata for erc1155, you just solved my issues in a few minutes. keep it up bro
Glad I could help!
Hi Avour I am struggling with some of the basic concepts with in this video. I was wondering if I could ask you a few questions regarding some of the aspects covered in this video?
@@layermaker3139 sure mate, what's the issue
Thanks for solving my hundred questions in 18 minutes, nice tutorial :)
My pleasure 😊
this is awesome! thank you so much for making this video :) so many videos on ERC721 but hard to find any dev-related ones for 1155. thanks again!
Glad you enjoyed it!
Hi Artur,
I am getting warning by using change uri function: Warning: This declaration shadows an existing declaration.
When I ignore the warning and deploy the smart contract, the metadata is not visible on NFTs. Can you please help?
That was SO HELPFUL !
Thanks a lot man, very clear and useful =)
You're welcome!
Did you forget to pad the setTokenURI because ERC1155 standard says it must be 64 characters? Can you show how you would implement that. Thanks.
thank you for the clarity of this presentation
Welcome!
Thank you bro, i was loking for this and it helped me a lot
Glad to hear it
The only thing I could currently ask for is verifying support for ERC165 and testing for it. Otherwise, love your videos, they're concise and very helpful
Thanks for the info! I will try to cover that in future vids.
Hey Artur I'm really grateful for your content, I'm working on my own erc1155 token to use with an NFT collection I'm working on and I'm stuck in exactly on the URI metadata mine doesn't have the default because when copied the code from Openzeppelin I had left the URI blank since I didn't know what to put in their.....how do I fix it
If my token id is 0 how am i supposed to fill 64 zeroes in the {id} ? when i try to do like you explained i get 0.json which doesn't work with ERC1155 because the file name needs to be padded with zeroes
we it has to be padded with zeros? Works for me without zeros
This was very helpful. Could you please tell me in which site you uploaded you images?
nft.storage :)
Incredible Video. Thanks for sharing. One thing that is confusing is how would you create a smart contract that does not allow users to mint from a set of pre-loaded NFT's but rather mint their own nfts/tokens. Do you just remove everything from the constructor and in ERC155 you put no string? So in the constructor you just have.... ERC1155 " ". Like you just have quotes with an empty string? In other words nothing goes in the quotes? Instead users can just use the mint function and setToken Uri to create their own NFT's? Would love to see a video on creating these contracts without minting a set of pre-set nfts/tokens but rather just allowing the user to mint their own nft's and set their own meta data.
Great video Artur. How would one update 100x setTokenUri efficiently? When I tested this, I called it in a for loop and Metamask would prompt me to sign every iteration individually. :(
You would need to have a batchSetUri function public in your smart contract
Hello friend, how are you? great your video! one question, can I put the private BaseUri? I don't want them to see my NFT before minting, is that valid?
You can control which URI is returned. Just introduce internal state in the contract and depending on it's value return different (or none) URI
@@ArturChmaro interesting friend... I understand, thank you very much
Hi Artur, thanks for this tutorial. Will this IPFS link work straight forward as entered in the .sol or we have to connect through API? I tried using the same link as you have done but, I'm seeing any images populated in the NFT it's blank and sometimes, only the first NFT is minted with images and meta tags and the rest are blank. Any thoughts?
I've just uploaded couple images for demonstration. If you want to upload more pictures you have to use service like Piniata or nft.storage
one question, have you tried to deploy the ERD1155 contract on BSC nft marketplace?
is the contract same as when you deploy on opensea ?
Yes :)
is there a reason why you deleted the string abi encode ? How to display on opensea with the current code? Thx
Awesome video -- very clear explanation!
Glad it was helpful!
Good video and Thank you...
Thanks for watching!
Excellent content Artur. For some reason I am not able to join your Discord, msg says "Unable to accept invite" ?
Cool, thanks!
Welcome!
thanks for the video
You're welcome
Just one question !
I'd like my GameItems to be upgradable, and for this I need a way to make distinction between the different "instances" of the same tokenID...
I've been working on it for hours but I can't got it to work =(
Would be a very advanced and useful tutorial... don't you think ? :D
Not possible ... you cannot distinct between multiple instances of the same token id. Just mint another token with same metadata
@@ArturChmaro That's a real shame, and sounds almost like a deal breaker for any rpg like game :/
Also I don't really understand how the network could transfer one address's token to another address without being able to have a reference to this token !
Or is it like a "fake transfer" and the method actually just decrease the balance of the sender and increase the balance of the receiver for this tokenID ? Would make sense...
I suppose the only workaround for my upgrade system then would be to have separate tokenID for the different levels of weapons and burn the token to mint the upgraded one...
But in the front end (unity) it seems difficult to know which token replaced which one (in inventory for instance...)
Have you thought about this sort of mechanism yourself ?
@@DustVoltrage If you want to have upgrades per item I think what you really have to do is mint "Firesword" with amount of 1 and just transfer it to the player. Then player can update Firesword#1 to "Firesword Enhanced #1".
However if you want to mint Firesword#2 that has amount of 200 then you can just track ownerships of that very specific item. If you upgrade that item then all the holders would have updated version.
@@ArturChmaro But this would be hell to create the item database this way.
What about =
- having a struct for my weapon "class" that i can declare as the owner, i would create as many as i want
- then user would pass a specific weapon to the mint function
- mint function would create automatically a new tokenID so each weapon minted has its own tokeniD
What do you think ? I would still need each token to keep the struct associated with the token though
Great video! I think batching setTokenUri to set multiple URIs for different tokens can save some fees.
That's right, batch functions always make sense to save money on fees
But for 3D model how to use the metadata standard ? Shall we replace image url with model url ?
You have animation_url attribute, there you can provide link to your glb. Otherwise you can just add customized attribute and that's it
I have one question, i am minting 2000 nft using ERC1155 but in batch of 500, what if one of the batch get failed to mint, does that mint all 500 nfts from 501 to 1000 will fail to mint of only few will mint and i will get error for remaining nfts that failed? do let me know the answer .
Whole batch will fail
@@ArturChmaro thank you so much
@@ArturChmaro can you please provide any reference link where this is mentioned that it will fail whole batch? it will be very helpful to explain to my team.
@@mayurpatel6657 you can check it yourself on the testnet ;)
after this it will show Metadata: Frozen on opensea ?
I think frozen is just extra feature offered by OpenSea. After clicking it they are putting meta data to IPFS and just marking collection as frozen on their side.
Awesome tutorial
Glad you liked it
does this apply with erc721?
Thanks a lot, Artur
Your welcome! :)
Hey Artur do you think it is worth adding an error check to this code for the case of someone calling the uri function for a tokenID that has not yet had a tokenURI set for it.
Sure, that would be good idea to add safe check for that :)
Hi Habib I am struggling with some of the basic concepts with in this video. I was wondering if I could ask you a few questions regarding some of the aspects covered in this video? You seem to have a very good understanding of it
@@layermaker3139 yeah sure
@@HabibLawal Thank you Habib do you have a email i could send you some questions to?
@@layermaker3139 I'm assuming he meant you can ask here
Very nice. Thanks
I am curious to be your student please support us with such.great knowledge
If NFT builds on Opensea smart contract, is it possible to deploy it's own contact smart
Not sure I got you right, but you may mint on OpenSea contracts or just go with your own.
For anyone who is currious why is there Unnamed collection - hash. You need to add few variables
"
// Contract name
string public name;
// Contract symbol
string public symbol;
"
into your .sol file and set them up in the constructor.
Thanks for adding this up! :) I should have been told about it in the video
IS THERE A NEED TO SPECIFY THE NAME AND SYMBOL IF The ERC1155 standard interface has a URI (Uniform Resource Identifier) that can point to a file where you can specify all the characteristics of the token (name, symbol, description, size, color or whatever you want) ?
Hey this is not working for me, Means Metadata is not showing on Opensea
issue solved thnx
I get metadata unavailable with this solution..
🛠 Web3 Starter for JS Devs (email course): bit.ly/web3starter
How can i create multiple nft in one contract ?
just expose mint function ;)
@@ArturChmaro but how :D because there should be rare properties common properties like that so if you record another video this will be perfect :D
I am running the exact code
How to get all tokens of owner?
I see multiple solutions here:
1. Customize contract so it tracks token ids owned by certain ppl.
2. Store that data centralized way
3. Fetch all events emitted from contract and parse them
@@ArturChmaro Do you have an example on option 1?
Loving the crypto insight, I just made my own video, share the love ;)/
I'll check it out!
@@ArturChmaro any comments would be great