[][src]Struct pallet_contracts::Config

pub struct Config<T: Trait> {
    pub schedule: Schedule,
    pub existential_deposit: BalanceOf<T>,
    pub tombstone_deposit: BalanceOf<T>,
    pub max_depth: u32,
    pub max_value_size: u32,
}

In-memory cache of configuration values.

We assume that these values can't be changed in the course of transaction execution.

Fields

schedule: Scheduleexistential_deposit: BalanceOf<T>tombstone_deposit: BalanceOf<T>max_depth: u32max_value_size: u32

Implementations

impl<T: Trait> Config<T>[src]

pub fn subsistence_threshold(&self) -> BalanceOf<T>[src]

Subsistence threshold is the extension of the minimum balance (aka existential deposit) by the tombstone deposit, required for leaving a tombstone.

Rent or any contract initiated balance transfer mechanism cannot make the balance lower than the subsistence threshold in order to guarantee that a tombstone is created.

The only way to completely kill a contract without a tombstone is calling seal_terminate.

pub fn subsistence_threshold_uncached() -> BalanceOf<T>[src]

The same as subsistence_threshold but without the need for a preloaded instance.

This is for cases where this value is needed in rent calculation rather than during contract execution.

Auto Trait Implementations

impl<T> RefUnwindSafe for Config<T> where
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: RefUnwindSafe,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>, 

impl<T> Send for Config<T> where
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Send,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>, 

impl<T> Sync for Config<T> where
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Sync,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>, 

impl<T> Unpin for Config<T> where
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: Unpin,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>, 

impl<T> UnwindSafe for Config<T> where
    <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance: UnwindSafe,
    <T as Trait>::Currency: Currency<<T as Trait>::AccountId>, 

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IsType<T> for T[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,