OpenZeppelin / cairo-contracts

OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup
https://docs.openzeppelin.com/contracts-cairo
MIT License
802 stars 323 forks source link

Migrate Account to component #783

Closed ericnordelo closed 8 months ago

ericnordelo commented 9 months ago

Fixes #782

PR Checklist

ericnordelo commented 8 months ago

I added a preset with tests, maybe it is too much for just one PR. Let me know if I should better split it. Documenting the preset in the doc-site API corresponding section is still missing.

ericnordelo commented 8 months ago

Moved the preset changes to #803

andrew-fleming commented 8 months ago

LGTM! I just left a question

We also have to update the API from our "Embeddable Implementations" discussion. Maybe it's best to just slip that in here?

ericnordelo commented 8 months ago

I updated the Account API sections. Let me know your thoughts. When we achieve some consensus around the naming of the section, I will update them all (other existing API pages) before merging the PR.

cc @martriay @andrew-fleming

ericnordelo commented 8 months ago

I did also update the component names to add the Component suffix.

andrew-fleming commented 8 months ago

Very nice! My question was meant just for the account API, but doing them all also works :)

I'm thinking it might be better, in the API, to change EMBEDDABLE CAMELCASE SUPPORT to EMBEDDABLE CAMELCASE IMPLEMENTATIONS to provide more consistency with the naming convention. Wdyt?

Also, we'll have to update the code block under the component title in the API here e.g. Account use openzeppelin::account::Account;

ericnordelo commented 8 months ago

I'm thinking it might be better, in the API, to change EMBEDDABLE CAMELCASE SUPPORT to EMBEDDABLE CAMELCASE IMPLEMENTATIONS to provide more consistency with the naming convention. Wdyt?

I think I lean more towards EMBEDDABLE IMPLEMENTATIONS (CAMELCASE), just because I think it looks better visually, lol, but no strong defense, let me know which one you prefer and I will update accordingly.

andrew-fleming commented 8 months ago

I think I lean more towards EMBEDDABLE IMPLEMENTATIONS (CAMELCASE), just because I think it looks better visually, lol, but no strong defense, let me know which one you prefer and I will update accordingly.

Sounds good to me!