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
Created ERC1155 ownable example/template #2807
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some updates to the interface
i think until #2814 is figured out, we should remove the ERC1155.py interface file. |
@Doc-Pixel sorry for making this suggestion originally, we'll add it later. |
No worries. I removed it from the PR as well. Part of the journey :-) |
Codecov Report
@@ Coverage Diff @@
## master #2807 +/- ##
==========================================
- Coverage 87.52% 87.39% -0.14%
==========================================
Files 94 94
Lines 10007 10080 +73
Branches 2480 2492 +12
==========================================
+ Hits 8759 8809 +50
- Misses 782 803 +21
- Partials 466 468 +2
Continue to review full report at Codecov.
|
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
Updated version to |
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
Think we're at the end of the road now? I'm going to deploy this to polygon testnet and furthee bud my dApp, to testdrive it |
I'm going to merge it, but feel free to update it later with any lessons learned you've gotten from deploying it |
* Created ERC1155 ownable example/template * Applied most of proposed changes * Applied more of the feedback. * ERC165 fix * Applied @view/@pure, updated test to accomodate * Moved tests into the correct folder * added interface ERC1155.py * refactor: clean up built-in interface * rewrote tests to use eth-tester * cleaned up brownie tests in favor of eth-tester * Update examples/tokens/ERC1155ownable.vy Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com> * applied proposed changes in contract and tests * interface fix / callback bytes constant * Ownership test assertion to ZERO_ADDRESS * reworked uri part, simplified tests * Fixed all testscript issues * refactor: apply suggestions from code review * Update examples/tokens/ERC1155ownable.vy Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com> * Update examples/tokens/ERC1155ownable.vy Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com> * applied codebase shrink tips, adjusted tests * cleaning up commented out code * refactor: flip orientation of `balanceOf` * test: update tests for switch of args to `balanceOf` * pull, isort, black, push * Resolved linter issues * Linter fixes for ERC1155 test script * Fixed ownership check in safeTransferFrom * Fixed setURI permissions, updated to docstrings * Minor test update Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
What I did
I created the ERC1155 ownable template.
This template implements ownable, name / symbol / uri to be compatible with NFT exchanges like opensea.io
Full documentation in the vyper file.
How I did it
Used the latest Vyper 0.3.2 [edit: the master-0.3.1 to be precise] and gratefully made use of the new bytes4 and dynarray functionality, kept the ERC1155 documentation and the opensea 1155 standard handy
How to verify it
Full brownie test is included with this PR. test coverage 100%.
Please run and verify
Commit message
Please review, test and hopefully accept the ERC1155 ownable contract
Description for the changelog
New example ERC1155 ownable contract + test.
Cute Animal Picture
Happy Easter :-)