-
Notifications
You must be signed in to change notification settings - Fork 355
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
Migrate AccessControl to component #770
Migrate AccessControl to component #770
Conversation
…ccess-control-to-component
…ccess-control-to-component
Co-authored-by: Andrew Fleming <[email protected]>
…ordelo/cairo-contracts into feat/migrate-ownable-to-components
Co-authored-by: Andrew Fleming <[email protected]>
…eat/migrate-ownable-to-components
…ordelo/cairo-contracts into feat/migrate-ownable-to-components
…ccess-control-to-component
…ccess-control-to-component
…ccess-control-to-component
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.
Looking good, Eric! I left some comments and suggestions, and we need to update the Access API and doc pages
+HasComponent<TContractState>, | ||
+SRC5::HasComponent<TContractState>, | ||
+Drop<TContractState> |
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.
👍
let mut contract = self.get_contract_mut(); | ||
let mut src5_component = SRC5::HasComponent::< | ||
TContractState | ||
>::get_component_mut(ref contract); |
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 don't think we should do this right now, but I wonder if we can abstract this process out a bit in the future
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.
Cairo team said they were working on improving this, so probably worth waiting a bit anyway, but I agree.
…eat/migrate-access-control-to-component
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! Let's remember to update the AccessControl code examples in the ERC20 migration
Fixes #769
PR Checklist