Struct ink_env::RentStatus[][src]

pub struct RentStatus<T: Environment> {
    pub max_deposit: T::Balance,
    pub current_deposit: T::Balance,
    pub custom_refcount_deposit: Option<T::Balance>,
    pub max_rent: T::Balance,
    pub current_rent: T::Balance,
    pub custom_refcount_rent: Option<T::Balance>,
    pub _reserved: Option<()>,
}
Expand description

Information about the required deposit and resulting rent.

The easiest way to guarantee that a contract stays alive is to assert that max_rent == 0 at the end of a contract’s execution.

Note

The current_* fields do not consider changes to the code’s refcount made during the currently running call.

Fields

max_deposit: T::Balance

Required deposit assuming that this contract is the only user of its code.

current_deposit: T::Balance

Required deposit assuming the code’s current refcount.

custom_refcount_deposit: Option<T::Balance>

Required deposit assuming the specified refcount (None if 0 is supplied).

max_rent: T::Balance

Rent that is paid assuming that the contract is the only user of its code.

current_rent: T::Balance

Rent that is paid given the code’s current refcount.

custom_refcount_rent: Option<T::Balance>

Rent that is paid assuming the specified refcount (None if 0 is supplied).

_reserved: Option<()>

Reserved for backwards compatible changes to this data structure.

Trait Implementations

Attempt to deserialise the value from input.

Attempt to skip the encoded value from input. Read more

Returns the fixed encoded size of the type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Decode Self and consume all of the given input data. Read more

Decode Self and consume all of the given input data. Read more

Decode Self with the given maximum recursion depth. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

Convert from a value of T into an equivalent instance of Self. Read more

Consume self to return an equivalent value of T. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Consume self to return an equivalent value of T.