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
impl<T: Environment> Decode for RentStatus<T> where
T::Balance: Decode,
T::Balance: Decode,
T::Balance: Decode,
T::Balance: Decode,
Option<T::Balance>: Decode,
Option<T::Balance>: Decode,
T::Balance: Decode,
T::Balance: Decode,
T::Balance: Decode,
T::Balance: Decode,
Option<T::Balance>: Decode,
Option<T::Balance>: Decode,
impl<T: Environment> Decode for RentStatus<T> where
T::Balance: Decode,
T::Balance: Decode,
T::Balance: Decode,
T::Balance: Decode,
Option<T::Balance>: Decode,
Option<T::Balance>: Decode,
T::Balance: Decode,
T::Balance: Decode,
T::Balance: Decode,
T::Balance: Decode,
Option<T::Balance>: Decode,
Option<T::Balance>: Decode,
Auto Trait Implementations
impl<T> RefUnwindSafe for RentStatus<T> where
<T as Environment>::Balance: RefUnwindSafe,
impl<T> Send for RentStatus<T> where
<T as Environment>::Balance: Send,
impl<T> Sync for RentStatus<T> where
<T as Environment>::Balance: Sync,
impl<T> Unpin for RentStatus<T> where
<T as Environment>::Balance: Unpin,
impl<T> UnwindSafe for RentStatus<T> where
<T as Environment>::Balance: UnwindSafe,