[contracts] Add ext_tombstone_deposit (#4722)

* [contracts] add ext_tombstone_deposit

* [contracts] update tombstone_deposit docs
This commit is contained in:
Hero Bird
2020-01-23 15:13:49 +01:00
committed by Sergei Pepyakin
parent 81004eabfd
commit 389b8f1698
4 changed files with 92 additions and 0 deletions
+7
View File
@@ -161,6 +161,9 @@ pub trait Ext {
/// Returns the minimum balance that is required for creating an account.
fn minimum_balance(&self) -> BalanceOf<Self::T>;
/// Returns the deposit required to create a tombstone upon contract eviction.
fn tombstone_deposit(&self) -> BalanceOf<Self::T>;
/// Returns a random number for the current block with the given subject.
fn random(&self, subject: &[u8]) -> SeedOf<Self::T>;
@@ -779,6 +782,10 @@ where
self.ctx.config.existential_deposit
}
fn tombstone_deposit(&self) -> BalanceOf<T> {
self.ctx.config.tombstone_deposit
}
fn deposit_event(&mut self, topics: Vec<T::Hash>, data: Vec<u8>) {
self.ctx.deferred.push(DeferredAction::DepositEvent {
topics,