mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
[contracts] Add ext_tombstone_deposit (#4722)
* [contracts] add ext_tombstone_deposit * [contracts] update tombstone_deposit docs
This commit is contained in:
committed by
Sergei Pepyakin
parent
81004eabfd
commit
389b8f1698
@@ -623,6 +623,23 @@ define_env!(Env, <E: Ext>,
|
||||
Ok(())
|
||||
},
|
||||
|
||||
// Stores the tombstone deposit into the scratch buffer.
|
||||
//
|
||||
// The data is encoded as T::Balance. The current contents of the scratch
|
||||
// buffer are overwritten.
|
||||
//
|
||||
// # Note
|
||||
//
|
||||
// The tombstone deposit is on top of the existential deposit. So in order for
|
||||
// a contract to leave a tombstone the balance of the contract must not go
|
||||
// below the sum of existential deposit and the tombstone deposit. The sum
|
||||
// is commonly referred as subsistence threshold in code.
|
||||
ext_tombstone_deposit(ctx) => {
|
||||
ctx.scratch_buf.clear();
|
||||
ctx.ext.tombstone_deposit().encode_to(&mut ctx.scratch_buf);
|
||||
Ok(())
|
||||
},
|
||||
|
||||
// Decodes the given buffer as a `T::Call` and adds it to the list
|
||||
// of to-be-dispatched calls.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user