Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

feat: ProtocolHandler self management functions #1641

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
@Eikix Eikix closed this Jan 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants