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

admin: protocol handler implementation [4] #1515

Open
3 of 5 tasks
Tracked by #1470
obatirou opened this issue Oct 21, 2024 · 1 comment · May be fixed by #1640
Open
3 of 5 tasks
Tracked by #1470

admin: protocol handler implementation [4] #1515

obatirou opened this issue Oct 21, 2024 · 1 comment · May be fixed by #1640
Assignees

Comments

@obatirou
Copy link
Collaborator

obatirou commented Oct 21, 2024

See conception document
kakarot-governance.pdf

Implement the protocol handler which will be the owner of the kakarot contract.
This will be a cairo1 contract.
It needs to use access controls depending of the functions called on the kakarot contract and match the Kakarot interfaces.

The roles:

  • security council
  • guardians
  • operator
  • gas price admin
// Contants
soft_pause_expiration = 12 hours
hard_pause_expiration = 7 days

// Storage
struct Storage {
	kakarot_core: ContractAddress
	security_council: ContractAddress
	operator: ContractAddress
	gas_price_admin: ContractAddress
	guardians: Vec<ContractAddress>
	protocol_frozen_until: felt252
}

// Authorized operator selectors are set in construcor

// Admin 
* fn emergency_execution(call: Call) SECURITY_COUNCIL
* fn upgrade(new_class_hash: felt252) OPERATOR
* fn transfer_ownership(new_owner: ContractAddress) SECURITY_COUNCIL
* fn soft_pause() GUARDIAN
* fn hard_pause() SECURITY_COUNCIL
* fn unpause() SECURITY_COUNCIL or delay passed

// Storage modification
// check if the selector is authorized
* fn execute_call(ref self: ContractState, call: Call) OPERATOR

// 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

Tasks

@github-project-automation github-project-automation bot moved this to 🆕 Backlog in Kakarot on Starknet Oct 21, 2024
@obatirou obatirou changed the title admin: protocol handler admin: protocol handler implementation Oct 21, 2024
@obatirou obatirou self-assigned this Oct 21, 2024
@obatirou obatirou mentioned this issue Oct 21, 2024
7 tasks
@obatirou obatirou moved this from 🆕 Backlog to 🏗 In progress in Kakarot on Starknet Oct 24, 2024
@ClementWalter ClementWalter changed the title admin: protocol handler implementation admin: protocol handler implementation [4] Oct 25, 2024
@obatirou obatirou linked a pull request Nov 26, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

2 participants
@obatirou and others