Privileged

Defines C++ Privileged API.

Classes

Type Name
struct eosio::blockchain_parameters
struct eosio::kv_parameters

Functions

Functions Documentation

function set_blockchain_parameters

void eosio::set_blockchain_parameters(
    const eosio::blockchain_parameters & params
)

Set the blockchain parameters

Parameters:

  • params - New blockchain parameters to set

function get_blockchain_parameters

void eosio::get_blockchain_parameters(
    eosio::blockchain_parameters & params
)

Retrieve the blolckchain parameters

Parameters:

  • params - It will be replaced with the retrieved blockchain params

function set_kv_parameters

void eosio::set_kv_parameters(
    const eosio::kv_parameters & params
)

Set the kv parameters

Parameters:

  • params - New kv parameters to set

function get_resource_limits

void eosio::get_resource_limits(
    name account,
    int64_t & ram_bytes,
    int64_t & net_weight,
    int64_t & cpu_weight
)

Get the resource limits of an account

Parameters:

  • account - name of the account whose resource limit to get
  • ram_bytes - output to hold retrieved ram limit in absolute bytes
  • net_weight - output to hold net limit
  • cpu_weight - output to hold cpu limit

function set_resource_limits

void eosio::set_resource_limits(
    name account,
    int64_t ram_bytes,
    int64_t net_weight,
    int64_t cpu_weight
)

Set the resource limits of an account

Parameters:

  • account - name of the account whose resource limit to be set
  • ram_bytes - ram limit in absolute bytes
  • net_weight - fractionally proportionate net limit of available resources based on (weight / total_weight_of_all_accounts)
  • cpu_weight - fractionally proportionate cpu limit of available resources based on (weight / total_weight_of_all_accounts)

function set_proposed_producers

std::optional<uint64_t> eosio::set_proposed_producers(
    const std::vector< producer_key > & prods
)

Proposes a schedule change using the legacy producer key format

Note:

Once the block that contains the proposal becomes irreversible, the schedule is promoted to "pending" automatically. Once the block that promotes the schedule is irreversible, the schedule will become "active"

Parameters:

  • producers - vector of producer keys

Returns:

an optional value of the version of the new proposed schedule if successful

function set_proposed_producers

std::optional<uint64_t> eosio::set_proposed_producers(
    const std::vector< producer_authority > & prods
)

Proposes a schedule change using the more flexible key format

Note:

Once the block that contains the proposal becomes irreversible, the schedule is promoted to "pending" automatically. Once the block that promotes the schedule is irreversible, the schedule will become "active"

Parameters:

  • producers - vector of producer authorities

Returns:

an optional value of the version of the new proposed schedule if successful

function is_privileged

bool eosio::is_privileged(
    name account
)

Check if an account is privileged

Parameters:

  • account - name of the account to be checked

Returns:

true if the account is privileged

Returns:

false if the account is not privileged

function set_privileged

void eosio::set_privileged(
    name account,
    bool is_priv
)

Set the privileged status of an account

Parameters:

  • account - name of the account whose privileged account to be set
  • is_priv - privileged status

function preactivate_feature

void eosio::preactivate_feature(
    const checksum256 & feature_digest
)

Pre-activate protocol feature

Parameters:

  • feature_digest - digest of the protocol feature to pre-activate