Split Indices module from Balances (#1404)

* Indices module

* Remove indices stuff from balances

* Rejob node, move Lookup into system.

* Fix up some modules.

* Fix democracy tests

* Fix staking tests

* Fix more tests

* Final test fixes

* Bump runtime versions

* Assets uses compact dispatchers

* Contracts module uses indexed addressing

* Democracy has more compact encoding

* Example now demonstrates compact eencoding

* Sudo uses indexed address

* Upgrade key also uses indexed lookups

* Assets more compact types.

* Fix test

* Rebuild runtime, whitespace

* Remove TOODs

* Remove TODOs

* Add a couple of tests back to balances.

* Update lib.rs

* Update lib.rs
This commit is contained in:
Gav Wood
2019-01-16 15:57:19 +01:00
committed by GitHub
parent 04175ddc83
commit c9f047fe84
44 changed files with 907 additions and 619 deletions
+3 -2
View File
@@ -97,7 +97,7 @@ use account_db::{AccountDb, OverlayAccountDb};
use rstd::prelude::*;
use rstd::marker::PhantomData;
use codec::{Codec, HasCompact};
use runtime_primitives::traits::{Hash, As, SimpleArithmetic};
use runtime_primitives::traits::{Hash, As, SimpleArithmetic, StaticLookup};
use runtime_support::dispatch::Result;
use runtime_support::{Parameter, StorageMap, StorageValue, StorageDoubleMap};
use system::ensure_signed;
@@ -152,7 +152,7 @@ decl_module! {
/// Make a call to a specified account, optionally transferring some balance.
fn call(
origin,
dest: T::AccountId,
dest: <T::Lookup as StaticLookup>::Source,
value: <T::Balance as HasCompact>::Type,
gas_limit: <T::Gas as HasCompact>::Type,
data: Vec<u8>
@@ -160,6 +160,7 @@ decl_module! {
let origin = ensure_signed(origin)?;
let value = value.into();
let gas_limit = gas_limit.into();
let dest = T::Lookup::lookup(dest)?;
// Pay for the gas upfront.
//