pub struct BurningConfig {
pub blackhole_addr: Option<HashBytes>,
pub fee_burn_num: u32,
pub fee_burn_denom: NonZeroU32,
}Expand description
Value flow burning config.
Fields§
§blackhole_addr: Option<HashBytes>Address of the masterchain account which will burn all inbound message balance.
fee_burn_num: u32Numerator of the potion of burned fees.
fee_burn_denom: NonZeroU32Denominator of the potion of burned fees.
Implementations§
Source§impl BurningConfig
impl BurningConfig
Sourcepub fn compute_burned_fees(&self, tokens: Tokens) -> Result<Tokens, Error>
pub fn compute_burned_fees(&self, tokens: Tokens) -> Result<Tokens, Error>
Computes how much fees to burn.
NOTE: For a well-formed BurningConfig it never fails
and returns a value not greater than tokens.
Trait Implementations§
Source§impl Clone for BurningConfig
impl Clone for BurningConfig
Source§fn clone(&self) -> BurningConfig
fn clone(&self) -> BurningConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BurningConfig
impl Debug for BurningConfig
Source§impl Default for BurningConfig
impl Default for BurningConfig
Source§impl<'de> Deserialize<'de> for BurningConfig
impl<'de> Deserialize<'de> for BurningConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'tlb> Load<'tlb> for BurningConfig
impl<'tlb> Load<'tlb> for BurningConfig
Source§impl PartialEq for BurningConfig
impl PartialEq for BurningConfig
Source§impl Serialize for BurningConfig
impl Serialize for BurningConfig
Source§impl Store for BurningConfig
impl Store for BurningConfig
Source§fn store_into(
&self,
__builder: &mut CellBuilder,
__context: &dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, __builder: &mut CellBuilder, __context: &dyn CellContext, ) -> Result<(), Error>
Tries to store itself into the cell builder.
impl Eq for BurningConfig
impl StructuralPartialEq for BurningConfig
Auto Trait Implementations§
impl Freeze for BurningConfig
impl RefUnwindSafe for BurningConfig
impl Send for BurningConfig
impl Sync for BurningConfig
impl Unpin for BurningConfig
impl UnwindSafe for BurningConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self to key and returns true if they are equal.