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

admin: protocol handler implementation [4] #1515

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

admin: protocol handler implementation [4] #1515

obatirou opened this issue Oct 21, 2024 · 1 comment
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

Preview Give feedback
@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 mentioned this issue Nov 26, 2024
6 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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