Skip to content

Kernel Configuration Policy

Kernel Configuration Policies are specifically designed to modify the internal state of the kernel. These policies come predefined in the kernel, though they can be updated later.

By default, all Kernel Configuration Policies are initialized with required_role = owner and required_vote_count = 1. The owner can modify these settings later.

Kernel Configuration Policies cannot be created as they represent a fixed set of rules for updating the kernel's internal states. However, existing policies can be updated to create a more modular permission structure and to automate certain processes like UpdateExchangeRate

Below is a comprehensive list of all available Kernel Configuration Policies, along with their descriptions and the corresponding function signatures.

// Role Management
fn grant_role(role_id: String, target: RoleTarget);
fn revoke_role(role_id: String, target: RoleTarget);
 
// Lock Control
fn acquire_lock();
fn release_lock();
fn force_release_lock();
 
// Policy Management
fn upsert_policy(target_policy_id: String, policy: Policy);
fn batch_update_policies(policies: Vec<Policy>);
fn update_policy_change_control(new_control: ChangeControl);
fn cancel_pending_policy(policy_id: String);
fn force_activate_policy(policy_id: String);
 
fn force_complete_pending_action(policy_id: String);
 
 
// Data Storage (metadata)
fn store_data(key:String, value:String);
fn batch_store_data(keys:Vec<String>, values:Vec<String>);