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

Add ERC1155 mixin #941

Merged
merged 21 commits into from Mar 22, 2024
Merged

Conversation

andrew-fleming
Copy link
Collaborator

@andrew-fleming andrew-fleming commented Mar 7, 2024

Fixes #933.

PR Checklist

  • Tests
  • Documentation
  • Added entry to CHANGELOG.md
  • Tried the feature on a public network

Copy link
Member

@ericnordelo ericnordelo left a comment

Choose a reason for hiding this comment

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

Small suggestion, besides LGTM!

docs/modules/ROOT/pages/api/erc1155.adoc Outdated Show resolved Hide resolved
Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>
CHANGELOG.md Outdated
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- ERC1155 component and preset (#896)
- Mixin implementations in components (#863)
Copy link
Member

Choose a reason for hiding this comment

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

We need to move this now to the Unreleased section.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I created a separate entry specifically for ERC115 and ERC1155Receiver in Unreleased

Copy link
Member

@ericnordelo ericnordelo left a comment

Choose a reason for hiding this comment

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

We should add a Mixin to the ERC1155ReceiverComponent too to be consistent with ERC721.

Copy link
Member

@ericnordelo ericnordelo left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@martriay martriay left a comment

Choose a reason for hiding this comment

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

looking very good!

@@ -61,7 +62,7 @@ mod ERC1155ReceiverComponent {
+HasComponent<TContractState>,
+SRC5Component::HasComponent<TContractState>,
+Drop<TContractState>
> of IERC1155ReceiverCamel<ComponentState<TContractState>> {
> of interface::IERC1155ReceiverCamel<ComponentState<TContractState>> {
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason to make this explicit here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The mixin requires another import from erc1155::interface. I figured it's better to just use the single interface mod rather than bringing three interfaces into scope. No strong preference though

Copy link
Contributor

Choose a reason for hiding this comment

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

but didn't the previous version imported only the ones it used? I lean towards dropping interface:: from these impl definitions to improve readability

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@andrew-fleming andrew-fleming merged commit e039e86 into OpenZeppelin:main Mar 22, 2024
5 checks passed
@andrew-fleming andrew-fleming deleted the add-erc1155-mixin branch March 22, 2024 17:29
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.

Add ERC1155Mixin impl
3 participants