Minimum balance (#3519)

This commit is contained in:
Sergei Pepyakin
2019-09-01 02:19:31 +02:00
committed by Gavin Wood
parent feecfc856d
commit 63c15c9803
3 changed files with 83 additions and 0 deletions
@@ -611,6 +611,16 @@ define_env!(Env, <E: Ext>,
Ok(())
},
// Stores the minimum balance (a.k.a. existential deposit) into the scratch buffer.
//
// The data is encoded as T::Balance. The current contents of the scratch buffer are
// overwritten.
ext_minimum_balance(ctx) => {
ctx.scratch_buf.clear();
ctx.ext.minimum_balance().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.
//