-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: ERC1155 URIStorage Extension #431
Conversation
✅ Deploy Preview for contracts-stylus ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
sol!( | ||
#[sol(rpc)] | ||
contract Erc1155 { |
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.
Only the subset of functions actually used in tests is sufficient to be defined here, but I noticed that some other contract examples have the full set even though that's not necessary.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
TBH I am not a fan of having so many examples... |
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.
Good job @0xNeshi, left major comments after first review.
} | ||
|
||
#[public] | ||
#[inherit(Erc1155, Erc1155MetadataUri)] |
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.
IMHO you do not need to inherit Erc1155MetadataUri
as you overwrote uri
.
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.
@qalisander @bidzyyys does it make sense to do impl IErc1155MetadataUri for Erc1155UriStorage
? 🤔
It does technically extend (and overwrite) its uri
function
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.
I do not think so
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.
p.s. @0xNeshi also we don't need #[borrow]
for Erc1155MetadataUri
in this case
This concern was addressed in a private group, copy/pasting the explanation for an additional example, just for future reference:
|
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.
Left last comments.
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.
LGTM!
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.
LGTM!
feat: add erc1155-uri-storage docs: add docs test: move erc1155 metadata-related tests to separate dir test: add metadata-uri + uri-storage tests chore: add benches test: add additional unit tests + rename some e2e tests ref: simplify erc1155-metadata-uri example docs: simplify erc1155-metadata-uri example in adoc ref: remove baseUri_ ctor param + add setBaseURI fn to tests + bench ref: remove 'pub' from erc1155 example/../lib.rs docs: update CHANGELOG revert change to e2e script ref: make TOKEN_URI a const in bench ref: remove unnecessary let binding in 'url' docs: moved the added item to the top of the list in CHANGELOG test: remove Erc1155MetadataUri from inherit in example docs: simplify example in adoc remove useless #[borrow] docs: remove borrow attr from metadata_uri in adoc
feat: add erc1155-uri-storage docs: add docs test: move erc1155 metadata-related tests to separate dir test: add metadata-uri + uri-storage tests chore: add benches test: add additional unit tests + rename some e2e tests ref: simplify erc1155-metadata-uri example docs: simplify erc1155-metadata-uri example in adoc ref: remove baseUri_ ctor param + add setBaseURI fn to tests + bench ref: remove 'pub' from erc1155 example/../lib.rs docs: update CHANGELOG revert change to e2e script ref: make TOKEN_URI a const in bench ref: remove unnecessary let binding in 'url' docs: moved the added item to the top of the list in CHANGELOG test: remove Erc1155MetadataUri from inherit in example docs: simplify example in adoc remove useless #[borrow] docs: remove borrow attr from metadata_uri in adoc
feat: add erc1155-uri-storage docs: add docs test: move erc1155 metadata-related tests to separate dir test: add metadata-uri + uri-storage tests chore: add benches test: add additional unit tests + rename some e2e tests ref: simplify erc1155-metadata-uri example docs: simplify erc1155-metadata-uri example in adoc ref: remove baseUri_ ctor param + add setBaseURI fn to tests + bench ref: remove 'pub' from erc1155 example/../lib.rs docs: update CHANGELOG revert change to e2e script ref: make TOKEN_URI a const in bench ref: remove unnecessary let binding in 'url' docs: moved the added item to the top of the list in CHANGELOG test: remove Erc1155MetadataUri from inherit in example docs: simplify example in adoc remove useless #[borrow] docs: remove borrow attr from metadata_uri in adoc
<!-- Thank you for your interest in contributing to OpenZeppelin! Consider opening an issue for discussion prior to submitting a PR. New features will be merged faster if they were first discussed and designed with the team. Describe the changes introduced in this pull request. Include any context necessary for understanding the PR's purpose. --> Since Erc1155-related benches and tests have become huge, decided to split them into separate files/directories. <!-- Fill in with issue number --> Resolves #351 <!-- Before merging the pull request all of the following must be completed. Feel free to submit a PR or Draft PR even if some items are pending. Some of the items may not apply. --> - [x] Tests - [x] Documentation - [x] Changelog --------- Co-authored-by: Alisander Qoshqosh <[email protected]>
<!-- Thank you for your interest in contributing to OpenZeppelin! Consider opening an issue for discussion prior to submitting a PR. New features will be merged faster if they were first discussed and designed with the team. Describe the changes introduced in this pull request. Include any context necessary for understanding the PR's purpose. --> Since Erc1155-related benches and tests have become huge, decided to split them into separate files/directories. <!-- Fill in with issue number --> Resolves #351 \#### PR Checklist <!-- Before merging the pull request all of the following must be completed. Feel free to submit a PR or Draft PR even if some items are pending. Some of the items may not apply. --> - [x] Tests - [x] Documentation - [x] Changelog --------- Co-authored-by: Alisander Qoshqosh <[email protected]>
Since Erc1155-related benches and tests have become huge, decided to split them into separate files/directories.
Resolves #351
PR Checklist