Skip to content
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

Closed
Jwdev-wr opened this issue Apr 24, 2019 · 16 comments
Closed

ERC1155 #1728

Jwdev-wr opened this issue Apr 24, 2019 · 16 comments

Comments

@Jwdev-wr
Copy link

ERC1155 new contract for NFT/FT's can we get this in Zeppelin?

@nventuro
Copy link
Contributor

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!

@Jwdev-wr
Copy link
Author

Jwdev-wr commented May 1, 2019

@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.

@frangio
Copy link
Contributor

frangio commented May 14, 2019

Given the level of interest in the ERC we're likely to implement it.

@cag
Copy link
Contributor

cag commented May 30, 2019

Yo I'm working on an implementation here that I may try to get merged into OZ:

gnosis/conditional-tokens-contracts@5623d3e

@frangio
Copy link
Contributor

frangio commented May 31, 2019

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?

@cag
Copy link
Contributor

cag commented Jun 1, 2019

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.

@cartosys
Copy link

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.

@AC0DEM0NK3Y
Copy link

AC0DEM0NK3Y commented Aug 7, 2019

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 _id var so you can differentiate between different token sets with it.

So erc-20 style balanceOf(address tokenOwner) can instead be called with erc-1155 balanceOf(address _owner, uint256 _id) or balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids).

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).

@frangio
Copy link
Contributor

frangio commented Nov 19, 2019

We have merged ERC1155 from #1803 into a feature branch: feature-erc1155. If you'd like to help us get this published soon try it out and let us know of any issues you find.

@princesinha19
Copy link
Contributor

Hello everyone, is there anyway to use ERC1155 using npm? Or only by pulling code from feature-erc1155 branch I can use.
I think the code is not released till yet.

@wmitsuda
Copy link

wmitsuda commented May 2, 2020

@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.

@wmitsuda
Copy link

wmitsuda commented May 2, 2020

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.

@princesinha19
Copy link
Contributor

@wmitsuda Thanks for the suggestion. I think OZ has already upgraded the contract to solidity version 0.6.
I hope they will release it asap 🙏

@KaiRo-at
Copy link
Contributor

KaiRo-at commented May 3, 2020

Work for Solidity 0.6 was done in #2130 and merged in the branch already, some more work (like for URI support) is still being reviewed. All in all, #2014 is tracking the work that still needs to be done to land this in master and get it into an actual release.

@nventuro
Copy link
Contributor

nventuro commented May 8, 2020

Pending tasks are now tracked in #2230

@frangio
Copy link
Contributor

frangio commented Jul 8, 2020

ERC1155 was released in 3.1.

@frangio frangio closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants