Struct everscale_types::models::config::BlockchainConfig
source · pub struct BlockchainConfig<C: CellFamily> {
pub address: CellHash,
pub params: Dict<C, u32, CellContainer<C>>,
}Expand description
Blockchain config.
Fields§
§address: CellHashConfiguration contract address.
params: Dict<C, u32, CellContainer<C>>Configuration parameters.
Implementations§
source§impl<C> BlockchainConfig<C>where
for<'c> C: DefaultFinalizer + 'c,
impl<C> BlockchainConfig<C>where for<'c> C: DefaultFinalizer + 'c,
sourcepub fn get_elector_address(&self) -> Result<CellHash, Error>
pub fn get_elector_address(&self) -> Result<CellHash, Error>
Returns the elector account address (in masterchain).
Uses ConfigParam1.
sourcepub fn get_minter_address(&self) -> Result<CellHash, Error>
pub fn get_minter_address(&self) -> Result<CellHash, Error>
Returns the minter account address (in masterchain).
Uses ConfigParam2 with a fallback to ConfigParam0 (config).
sourcepub fn get_fee_collector_address(&self) -> Result<CellHash, Error>
pub fn get_fee_collector_address(&self) -> Result<CellHash, Error>
Returns the fee collector account address (in masterchain).
Uses ConfigParam3 with a fallback to ConfigParam1 (elector).
sourcepub fn get_global_version(&self) -> Result<GlobalVersion, Error>
pub fn get_global_version(&self) -> Result<GlobalVersion, Error>
Returns the lowest supported block version and required capabilities.
Uses ConfigParam8.
sourcepub fn get_mandatory_params(&self) -> Result<Dict<C, u32, ()>, Error>
pub fn get_mandatory_params(&self) -> Result<Dict<C, u32, ()>, Error>
Returns a list of params that must be present in config.
Uses ConfigParam9.
sourcepub fn get_critical_params(&self) -> Result<Dict<C, u32, ()>, Error>
pub fn get_critical_params(&self) -> Result<Dict<C, u32, ()>, Error>
Returns a list of params that have a different set of update requirements.
Uses ConfigParam10.
sourcepub fn get_workchains(
&self
) -> Result<Dict<C, i32, WorkchainDescription>, Error>
pub fn get_workchains( &self ) -> Result<Dict<C, i32, WorkchainDescription>, Error>
Returns a dictionary with workchain descriptions.
Uses ConfigParam12.
sourcepub fn get_block_creation_reward(
&self,
masterchain: bool
) -> Result<Tokens, Error>
pub fn get_block_creation_reward( &self, masterchain: bool ) -> Result<Tokens, Error>
Returns a block creation reward for the specified workchain in tokens.
Uses ConfigParam14.
sourcepub fn get_block_creation_rewards(&self) -> Result<BlockCreationRewards, Error>
pub fn get_block_creation_rewards(&self) -> Result<BlockCreationRewards, Error>
Returns a block creation rewards in tokens.
Uses ConfigParam14.
sourcepub fn get_election_timings(&self) -> Result<ElectionTimings, Error>
pub fn get_election_timings(&self) -> Result<ElectionTimings, Error>
Returns election timings.
Uses ConfigParam15.
sourcepub fn get_validator_count_params(&self) -> Result<ValidatorCountParams, Error>
pub fn get_validator_count_params(&self) -> Result<ValidatorCountParams, Error>
Returns possible validator count.
Uses ConfigParam16.
sourcepub fn get_validator_stake_params(&self) -> Result<ValidatorStakeParams, Error>
pub fn get_validator_stake_params(&self) -> Result<ValidatorStakeParams, Error>
Returns validator stake range and factor.
Uses ConfigParam17.
sourcepub fn get_storage_prices(&self) -> Result<Dict<C, u32, StoragePrices>, Error>
pub fn get_storage_prices(&self) -> Result<Dict<C, u32, StoragePrices>, Error>
Returns a list with a history of all storage prices.
Uses ConfigParam18.
sourcepub fn get_gas_prices(&self, masterchain: bool) -> Result<GasLimitsPrices, Error>
pub fn get_gas_prices(&self, masterchain: bool) -> Result<GasLimitsPrices, Error>
Returns gas limits and prices.
Uses ConfigParam20 (for masterchain) or ConfigParam21 (for other workchains).
sourcepub fn get_block_limits(&self, masterchain: bool) -> Result<BlockLimits, Error>
pub fn get_block_limits(&self, masterchain: bool) -> Result<BlockLimits, Error>
Returns block limits.
Uses ConfigParam22 (for masterchain) or ConfigParam23 (for other workchains).
sourcepub fn get_msg_forward_prices(
&self,
masterchain: bool
) -> Result<MsgForwardPrices, Error>
pub fn get_msg_forward_prices( &self, masterchain: bool ) -> Result<MsgForwardPrices, Error>
Returns message forwarding prices.
Uses ConfigParam24 (for masterchain) or ConfigParam25 (for other workchains).
sourcepub fn get_catchain_config(&self) -> Result<CatchainConfig, Error>
pub fn get_catchain_config(&self) -> Result<CatchainConfig, Error>
Returns a catchain config.
Uses ConfigParam28.
sourcepub fn get_consensus_config(&self) -> Result<ConsensusConfig, Error>
pub fn get_consensus_config(&self) -> Result<ConsensusConfig, Error>
Returns a consensus config.
Uses ConfigParam29.
sourcepub fn get_fundamental_addresses(&self) -> Result<Dict<C, CellHash, ()>, Error>
pub fn get_fundamental_addresses(&self) -> Result<Dict<C, CellHash, ()>, Error>
Returns a list of fundamental account addresses (in masterchain).
Uses ConfigParam31.
sourcepub fn contains_prev_validator_set(&self) -> Result<bool, Error>
pub fn contains_prev_validator_set(&self) -> Result<bool, Error>
Returns true if the config contains info about the previous validator set.
Uses ConfigParam32 or ConfigParam33.
sourcepub fn contains_next_validator_set(&self) -> Result<bool, Error>
pub fn contains_next_validator_set(&self) -> Result<bool, Error>
Returns true if the config contains info about the next validator set.
Uses ConfigParam36 or ConfigParam37.
sourcepub fn get_current_validator_set(&self) -> Result<ValidatorSet, Error>
pub fn get_current_validator_set(&self) -> Result<ValidatorSet, Error>
Returns the current validator set.
Uses ConfigParam35 (temp validators) or ConfigParam34 (current validators).
sourcepub fn contains<'a, T: KnownConfigParam<'a, C>>(&'a self) -> Result<bool, Error>
pub fn contains<'a, T: KnownConfigParam<'a, C>>(&'a self) -> Result<bool, Error>
Returns true if the config contains a param for the specified id.
sourcepub fn contains_raw(&self, id: u32) -> Result<bool, Error>
pub fn contains_raw(&self, id: u32) -> Result<bool, Error>
Returns true if the config contains a param for the specified id.