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

Port ERC 1155 branch to Solidity 0.6 (and current master) #2130

Merged
merged 4 commits into from
Apr 27, 2020

Conversation

KaiRo-at
Copy link
Contributor

This includes the previous work for #1803 my PR #2029 and also makes all the ERC1155 work compile with Solidity 0.6, rebased against current master.

If it's not the right way to submit a PR against master but I should instead do this in a different way, please let me know.

@nventuro nventuro changed the base branch from master to feature-erc1155 March 25, 2020 22:01
@nventuro nventuro changed the base branch from feature-erc1155 to master March 25, 2020 22:01
@nventuro
Copy link
Contributor

Hm, I tried changing the target branch to feature-erc1155, but that made the PR messier. Could you try rebasing your branch on top of that one, so that we get a clean diff?

Actually, if you could isolate commit 9479518 that'd be even better, to keep the PR focused. Thanks!

@KaiRo-at
Copy link
Contributor Author

Hm, I tried changing the target branch to feature-erc1155, but that made the PR messier. Could you try rebasing your branch on top of that one, so that we get a clean diff?

If the branch was rebased on current master, then this probably would make more sense - unfortunately, without that, I can't even try to run tests on the result...

@nventuro
Copy link
Contributor

I see what you mean, yes. I just merged master on top of the feature branch - you should be able now to extract the commit with the language version port, landing us on a cleaner PR.

Note that the feature branch will be temporarily broken until we port it to 0.6.

@KaiRo-at
Copy link
Contributor Author

KaiRo-at commented Apr 1, 2020

OK, I removed all the pieces related to #1803 / #2029 from this and rebased this on top of the upstream feature-erc1155 branch, so this is only the 0.6 work (and the constructor stuff, but if you want, I can take that out as well and move it into work on #2003 or so.

@KaiRo-at KaiRo-at changed the base branch from master to feature-erc1155 April 1, 2020 14:40
@stale
Copy link

stale bot commented Apr 25, 2020

Hi all!
This Pull Request has not had any recent activity, is it still relevant? If so, what is blocking it? Is there anything we can do to help move it forward?
Thanks!

@stale stale bot added the stale label Apr 25, 2020
@KaiRo-at
Copy link
Contributor Author

AFAIK review is blocking this, hope that will come soon now that 3.0 is out.

@stale stale bot removed the stale label Apr 25, 2020
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fantastic @KaiRo-at. Thank you!

@frangio frangio merged commit 5fd36e7 into OpenZeppelin:feature-erc1155 Apr 27, 2020
@KaiRo-at KaiRo-at mentioned this pull request May 3, 2020
nventuro added a commit that referenced this pull request May 8, 2020
* Initial ERC1155 implementation with some tests (#1803)

* Initial ERC1155 implementation with some tests

* Remove mocked isERC1155TokenReceiver

* Revert reason edit nit

* Remove parameters associated with isERC1155TokenReceiver call

* Add tests for approvals and single transfers

* Add tests for transferring to contracts

* Add tests for batch transfers

* Make expectEvent.inTransaction tests async

* Renamed "owner" to "account" and "holder"

* Document unspecified balanceOfBatch reversion on zero behavior

* Ensure accounts can't set their own operator status

* Specify descriptive messages for underflow errors

* Bring SafeMath.add calls in line with OZ style

* Explicitly prevent _burn on the zero account

* Implement batch minting/burning

* Refactored operator approval check into isApprovedForAll calls

* Renamed ERC1155TokenReceiver to ERC1155Receiver

* Added ERC1155Holder

* Fix lint issues

* Migrate tests to @openzeppelin/test-environment

* Port ERC 1155 branch to Solidity 0.6 (and current master) (#2130)

* port ERC1155 to Solidity 0.6

* make ERC1155 constructor more similar to ERC721 one

* also migrate mock contracts to Solidity 0.6

* mark all non-view functions as virtual

Co-authored-by: Alan Lu <alanlu1023@gmail.com>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: Robert Kaiser <kairo@kairo.at>
nventuro added a commit that referenced this pull request Jun 3, 2020
…2029)

* Initial ERC1155 implementation with some tests (#1803)

* Initial ERC1155 implementation with some tests

* Remove mocked isERC1155TokenReceiver

* Revert reason edit nit

* Remove parameters associated with isERC1155TokenReceiver call

* Add tests for approvals and single transfers

* Add tests for transferring to contracts

* Add tests for batch transfers

* Make expectEvent.inTransaction tests async

* Renamed "owner" to "account" and "holder"

* Document unspecified balanceOfBatch reversion on zero behavior

* Ensure accounts can't set their own operator status

* Specify descriptive messages for underflow errors

* Bring SafeMath.add calls in line with OZ style

* Explicitly prevent _burn on the zero account

* Implement batch minting/burning

* Refactored operator approval check into isApprovedForAll calls

* Renamed ERC1155TokenReceiver to ERC1155Receiver

* Added ERC1155Holder

* Fix lint issues

* Migrate tests to @openzeppelin/test-environment

* port ERC1155 to Solidity 0.6

* make ERC1155 constructor more similar to ERC721 one

* also migrate mock contracts to Solidity 0.6

* mark all non-view functions as virtual

* add simple catch-all implementation for the metadata URI interface

* include an internal function to set the URI so users can implement functionality to switch URIs

* add tests for ERC1155 metadata URI

* fix nits, mostly pointed out by linter

* convert ERC1155 metadata URI work to Solidity 0.6

* mark all non-view functions as virtual

* Port ERC 1155 branch to Solidity 0.6 (and current master) (#2130)

* port ERC1155 to Solidity 0.6

* make ERC1155 constructor more similar to ERC721 one

* also migrate mock contracts to Solidity 0.6

* mark all non-view functions as virtual

* Update contracts/token/ERC1155/IERC1155MetadataURI.sol

Starting on Solidity v0.6.2, interfaces can now inherit. \o/

Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>

* Fix compile errors

* Remove URI event

* Merge MetadataCatchAll into ERC1155

* Improve documentation.

* Simplify tests

* Move tests into ERC1155 tests

* Update documentation

* Bump minimum compiler version for inteface inheritance

* Fix holder tests

* Improve setUri docs

* Fix docs generation

Co-authored-by: Alan Lu <alanlu1023@gmail.com>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
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

Successfully merging this pull request may close these issues.

3 participants