Trait GlobalParamKey

Source
pub trait GlobalParamKey {
    const ID: usize;
    const KEY: &'static [u8];
    const SPACE: Space = Space::Native;
    const ADDRESS: Address = STORAGE_INTEREST_STAKING_CONTRACT_ADDRESS;
    const STORAGE_KEY: StorageKeyWithSpace<'static> = _;

    // Provided methods
    fn init_vm_value() -> U256 { ... }
    fn from_vm_value(val: U256) -> U256 { ... }
    fn into_vm_value(val: U256) -> U256 { ... }
}

Required Associated Constants§

Source

const ID: usize

Source

const KEY: &'static [u8]

Provided Associated Constants§

Source

const SPACE: Space = Space::Native

Source

const ADDRESS: Address = STORAGE_INTEREST_STAKING_CONTRACT_ADDRESS

Source

const STORAGE_KEY: StorageKeyWithSpace<'static> = _

Provided Methods§

Source

fn init_vm_value() -> U256

How to initialize such a variable in the executor

Source

fn from_vm_value(val: U256) -> U256

How to convert such a variable from the executor representing to the db representing

Source

fn into_vm_value(val: U256) -> U256

How to convert such a variable from the db representing to the executor representing

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl GlobalParamKey for AccumulateInterestRate

Source§

const ID: usize = 1usize

Source§

const KEY: &'static [u8] = b"accumulate_interest_rate"

Source§

impl GlobalParamKey for BaseFeeProp

Source§

const ID: usize = 13usize

Source§

const KEY: &'static [u8] = b"base_fee_prop"

Source§

impl GlobalParamKey for ConvertedStoragePoints

Source§

const ID: usize = 7usize

Source§

const KEY: &'static [u8] = b"converted_storage_points_key"

Source§

impl GlobalParamKey for DistributablePoSInterest

Source§

const ID: usize = 9usize

Source§

const KEY: &'static [u8] = b"distributable_pos_interest"

Source§

impl GlobalParamKey for InterestRate

Source§

const ID: usize = 0usize

Source§

const KEY: &'static [u8] = b"interest_rate"

Source§

impl GlobalParamKey for LastDistributeBlock

Source§

const ID: usize = 10usize

Source§

const KEY: &'static [u8] = b"last_distribute_block"

Source§

impl GlobalParamKey for PowBaseReward

Source§

const ADDRESS: Address = PARAMS_CONTROL_CONTRACT_ADDRESS

Source§

const ID: usize = 11usize

Source§

const KEY: &'static [u8] = b"pow_base_reward"

Source§

impl GlobalParamKey for TotalBurnt1559

Source§

const ID: usize = 12usize

Source§

const KEY: &'static [u8] = b"total_burnt_tokens_by_cip1559"

Source§

impl GlobalParamKey for TotalEvmToken

Source§

const ID: usize = 5usize

Source§

const KEY: &'static [u8] = b"total_evm_tokens"

Source§

impl GlobalParamKey for TotalIssued

Source§

const ID: usize = 2usize

Source§

const KEY: &'static [u8] = b"total_issued_tokens"

Source§

impl GlobalParamKey for TotalPosStaking

Source§

const ID: usize = 8usize

Source§

const KEY: &'static [u8] = b"total_pos_staking_tokens"

Source§

impl GlobalParamKey for TotalStaking

Source§

const ID: usize = 3usize

Source§

const KEY: &'static [u8] = b"total_staking_tokens"

Source§

impl GlobalParamKey for TotalStorage

Source§

const ID: usize = 4usize

Source§

const KEY: &'static [u8] = b"total_storage_tokens"

Source§

impl GlobalParamKey for UsedStoragePoints

Source§

const ID: usize = 6usize

Source§

const KEY: &'static [u8] = b"used_storage_points"