-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
ERC1155 #1728
Comments
This is the EIP, for reference: https://eips.ethereum.org/EIPS/eip-1155 It looks quite interesting and there's a lot of activity in the discussion, it may make a lot of sense to include something like this in OpenZeppelin. @WhiteRaBot17 are you planning on using this standard? Could you share a bit more about your project? Thank you very much for this suggestion! |
@nventuro I am experimenting with ERC721 contracts for game assets. The ERC1155 is similar to the ERC721 standard but it has a bit more functionality by introducing the double mapping. While ERC721 is capable of serving the purpose, the ERC1155 gives the ability to do batch transfers. So we can create multiple items, and transfer multiple items or multiple quantities of the items. I know that Unity has added Enjin mintable items to their assets in their software, and this should open up a "multiverse" where games can utilize assets from other games and incorporate them into their own games. This is an area I am experimenting in among other things. The only reason why I am a bit hesitant to start using ERC1155 is because I would like to see more adoption, testing, and use of it beyond Enjin. |
Given the level of interest in the ERC we're likely to implement it. |
Yo I'm working on an implementation here that I may try to get merged into OZ: |
Nice @cag! Is this your original work? I see that the repository is licensed under LGPL. Would you be willing to contribute it under MIT license terms? |
Implementation is not really my work; I just did some name changes and comment shuffling to get things more in line with OZ's style. The original is distributed under the Apache 2.0 license. That said, the (incomplete) test cases are my work, and those I am willing to contribute those under MIT license terms when the time comes. It's still a WIP since the standard is not final yet, and because I am developing alongside our contracts in order to ensure that at least that use case is covered. Since that does not address some potentially common other patterns of use of this standard, it shouldn't be considered complete, but it may be a useful starting point for y'all. |
My project involves 100's of ERC20 contracts. My understanding is that this could theoretically replace them all with ONE ERC1155 contract? Plus the benefit of using it for any number of NFTs. If that's the case then yes. I would use this for my project. |
Yes this is possible, all the functions have an So erc-20 style Erc-20 is a much simpler API design but for implementations that need to mix multiple types like you need it may be a better choice to use erc-1155; This was its reason for being created essentially as modern games need this (which is our use case at enjin). |
We have merged ERC1155 from #1803 into a feature branch: |
Hello everyone, is there anyway to use ERC1155 using npm? Or only by pulling code from |
@princesinha19 I believe the only way is downloading the branch for now. I've been experiment with the code and the only way I was able to do it was by checking it out manually. |
BTW, I believe the code needs to be refreshed, the other contracts are already using solidity 0.6, but the ERC1155 implementation is still on 0.5, I had to adjust it manually myself. Not sure if the OZ developers have already done this in their own branches , but if have an updated code in my workspace, I can PR if you want. |
@wmitsuda Thanks for the suggestion. I think OZ has already upgraded the contract to solidity version 0.6. |
Pending tasks are now tracked in #2230 |
ERC1155 was released in 3.1. |
ERC1155 new contract for NFT/FT's can we get this in Zeppelin?
The text was updated successfully, but these errors were encountered: