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

feat: ProtocolHandler self management functions #1641

Open
wants to merge 3 commits into
base: protocol-handler
Choose a base branch
from

Conversation

obatirou
Copy link
Collaborator

What is the new behavior?

  • Add the self management function for the ProtocolHandler
  • Introduces cairo-coverage for snfoundry and assert_macros
// Self management
* fn change_operator(new_address_operator: ContractAddress) SECURITY_COUNCIL
* fn change_security_council(new_security_council_address: ContractAddress) SECURITY_COUNCIL
* fn add_guardian(new_guardians_address: ContractAddress) SECURITY_COUNCIL
* fn remove_guardian(guardian_to_remove_address: ContractAddress) SECURITY_COUNCIL
* fn change_gas_price_admin(new_gas_price_admin: ContractAddres) SECURITY_COUNCIL

pub operator: ContractAddress,
pub guardians: Map<ContractAddress, bool>,
pub guardians: Vec<ContractAddress>,
Copy link
Collaborator Author

@obatirou obatirou Nov 26, 2024

Choose a reason for hiding this comment

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

Maybe add documentation on the behavior of Vec with the remove and add ?
Should this storage variable be kept ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand your comment

Copy link
Collaborator Author

@obatirou obatirou Nov 27, 2024

Choose a reason for hiding this comment

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

This is related to the discussion about storage vec not being able to remove an element. The length will not change when a guardian is removed.

@obatirou obatirou marked this pull request as ready for review November 26, 2024 16:27
@obatirou obatirou requested a review from enitrat November 26, 2024 16:28
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.

2 participants