Skip to content

Latest commit

 

History

History
192 lines (85 loc) · 5.38 KB

onchain_config.md

File metadata and controls

192 lines (85 loc) · 5.38 KB

Module 0x3::onchain_config

Resource OnchainConfig

OnchainConfig is framework configurations stored on chain.

struct OnchainConfig has key

Resource ConfigUpdateCap

ConfigUpdateCap is the capability for admin operations, such as update onchain configurations.

struct ConfigUpdateCap has store, key

Constants

const ErrorNotAdmin: u64 = 1;

Function genesis_init

public(friend) fun genesis_init(genesis_account: &signer, sequencer: address, rooch_dao: address)

Function admin

public fun admin(): address

Function ensure_admin

public fun ensure_admin(account: &signer)

Function sequencer

public fun sequencer(): address

Function rooch_dao

public fun rooch_dao(): address

Function update_framework_version

public(friend) fun update_framework_version()

Function framework_version

public fun framework_version(): u64

Function onchain_config

Function add_to_publishing_allowlist

When module_publishing_allowlist_feature is enabled, only packed_id in allowlist can be published. Add package_id to publishing allowlist.

public entry fun add_to_publishing_allowlist(account: &signer, package_id: address)

Function remove_from_publishing_allowlist

Remove package_id from publishing allowlist.

public entry fun remove_from_publishing_allowlist(account: &signer, package_id: address)

Function change_feature_flags

Enable or disable features. You can find all feature flags in moveos_std::features.

public entry fun change_feature_flags(account: &signer, enable: vector<u64>, disable: vector<u64>)