Skip to main content

ParsedConfig

Struct ParsedConfig 

Source
pub struct ParsedConfig {
Show 14 fields pub blackhole_addr: Option<HashBytes>, pub mc_gas_prices: GasLimitsPrices, pub gas_prices: GasLimitsPrices, pub mc_fwd_prices: MsgForwardPrices, pub fwd_prices: MsgForwardPrices, pub size_limits: SizeLimitsConfig, pub storage_prices: Vec<StoragePrices>, pub global_id: i32, pub global: GlobalVersion, pub workchains: HashMap<i32, WorkchainDescription>, pub special_accounts: HashSet<HashBytes>, pub authority_marks: Option<ParsedAuthorityMarksConfig>, pub raw: BlockchainConfig, pub unpacked: UnpackedConfig,
}
Expand description

Fields§

§blackhole_addr: Option<HashBytes>§mc_gas_prices: GasLimitsPrices§gas_prices: GasLimitsPrices§mc_fwd_prices: MsgForwardPrices§fwd_prices: MsgForwardPrices§size_limits: SizeLimitsConfig§storage_prices: Vec<StoragePrices>§global_id: i32§global: GlobalVersion§workchains: HashMap<i32, WorkchainDescription>§special_accounts: HashSet<HashBytes>§authority_marks: Option<ParsedAuthorityMarksConfig>§raw: BlockchainConfig§unpacked: UnpackedConfig

Implementations§

Source§

impl ParsedConfig

Source

pub const DEFAULT_SIZE_LIMITS_CONFIG: SizeLimitsConfig

Source

pub fn parse(config: BlockchainConfig, now: u32) -> Result<Self, Error>

Source

pub fn update_storage_prices(&mut self, now: u32) -> Result<(), Error>

Source

pub fn is_blackhole(&self, addr: &StdAddr) -> bool

Source

pub fn is_special(&self, addr: &StdAddr) -> bool

Source

pub fn fwd_prices(&self, is_masterchain: bool) -> &MsgForwardPrices

Source

pub fn gas_prices(&self, is_masterchain: bool) -> &GasLimitsPrices

Source

pub fn compute_storage_fees( &self, storage_stat: &StorageInfo, now: u32, is_special: bool, is_masterchain: bool, ) -> Tokens

Computes fees of storing storage_stat.used bits and refs since storage_stat.last_paid and up until now.

NOTE: These fees don’t include due_payment.

Source

pub fn compute_gas_params( &self, account_balance: &Tokens, msg_balance_remaining: &Tokens, is_special: bool, is_masterchain: bool, is_tx_ordinary: bool, is_in_msg_external: bool, ) -> GasParams

Computes gas credit and limits bought for the provided balances.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> SafeDelete for T
where T: 'static,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> EquivalentRepr<T> for T