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 mixins #863

Merged
merged 107 commits into from Feb 29, 2024
Merged

Add mixins #863

merged 107 commits into from Feb 29, 2024

Conversation

andrew-fleming
Copy link
Collaborator

@andrew-fleming andrew-fleming commented Jan 2, 2024

Fixes #812.

PR Checklist

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

@martriay martriay changed the title Evaluate mixins Add mixins Feb 21, 2024
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.

This is almost ready. I'm very happy with the results 🚀

src/tests/mocks/ownable_mocks.cairo Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/components.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/components.adoc Show resolved Hide resolved
docs/modules/ROOT/pages/components.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/components.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/api/erc721.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/api/account.adoc Outdated Show resolved Hide resolved
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.

Looking good! Left a couple of comments.

src/presets/account.cairo Outdated Show resolved Hide resolved
[.contract-index#ERC20Component-Embeddable-Impls-camelCase]
.Embeddable implementations (camelCase)
--
[.sub-index#ERC20Component-Embeddable-Impls-ERC20CamelOnlyImpl]
Copy link
Member

Choose a reason for hiding this comment

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

Very nice!

Copy link
Contributor

Choose a reason for hiding this comment

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

indeed! this looks great now

@@ -252,7 +268,7 @@ NOTE: Implementing xref:api/introspection.adoc#SRC5Component[SRC5Component] is a
* xref:#IERC721-Transfer[`++Transfer(from, to, token_id)++`]
--

==== Embeddable functions
==== Embeddable Functions
Copy link
Member

Choose a reason for hiding this comment

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

Why this change? I think it should be lowercase, but if we use uppercase, we should update the rest for consistency.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All of the API pages except for ERC721 and ERC20 have Embeddable Functions in title case, so now this heading is at least in a consistent casing. See Access, Account, Introspection, and Security. It's hard to confirm if there are other instances like this haha I can change the embeddable fns back if you prefer lower case

Copy link
Member

Choose a reason for hiding this comment

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

We have "Internal functions" below (in all those cases), so the issue is that we are being inconsistent already. I think we should change "Embeddable Functions" to "Embeddable functions" for consistency with our title casing.

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.

this looks great! i left a couple comments, but i think it's good to go.
very excited about releasing this one

[.contract-index#ERC20Component-Embeddable-Impls-camelCase]
.Embeddable implementations (camelCase)
--
[.sub-index#ERC20Component-Embeddable-Impls-ERC20CamelOnlyImpl]
Copy link
Contributor

Choose a reason for hiding this comment

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

indeed! this looks great now

docs/modules/ROOT/pages/api/access.adoc Show resolved Hide resolved
@@ -1,6 +1,7 @@
:github-icon: pass:[<svg class="icon"><use href="#github-icon"/></svg>]
:snip6: https://github.com/ericnordelo/SNIPs/blob/feat/standard-account/SNIPS/snip-6.md[SNIP-6]
:inner-src5: xref:api/introspection.adoc#ISRC5[SRC5 ID]
:mixin-impl: xref:components.adoc#mixins[Embeddable Mixin Implementation]
Copy link
Contributor

Choose a reason for hiding this comment

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

i wonder if it makes sense to centralize this instead of having it duplicated in each section. we can leave it for later though

docs/modules/ROOT/pages/components.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/components.adoc Outdated Show resolved Hide resolved
andrew-fleming and others added 2 commits February 27, 2024 21:48
Co-authored-by: Martín Triay <martriay@gmail.com>
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!

@martriay martriay merged commit 2e57309 into OpenZeppelin:main Feb 29, 2024
5 checks passed
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.

Evaluate Mixin impls
3 participants