Unverified Commit 093f51b7 authored by Gavin Wood's avatar Gavin Wood Committed by GitHub
Browse files

Enable nicknaming for accounts (#500) (#501)

* Update Substrate and add support for account nicknames

* Bump spec version

* Bump substrate branch

* Make nicks callable.

* Bump Substrate
parent 9ec50f5a
Pipeline #55152 passed with stages
in 16 minutes and 49 seconds
This diff is collapsed.
......@@ -42,6 +42,7 @@ grandpa = { package = "srml-grandpa", git = "https://github.com/paritytech/subst
im-online = { package = "srml-im-online", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
indices = { package = "srml-indices", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
membership = { package = "srml-membership", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
nicks = { package = "srml-nicks", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
offences = { package = "srml-offences", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
randomness-collective-flip = { package = "srml-randomness-collective-flip", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
session = { package = "srml-session", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
......@@ -100,6 +101,7 @@ std = [
"im-online/std",
"indices/std",
"membership/std",
"nicks/std",
"offences/std",
"sr-primitives/std",
"sr-staking-primitives/std",
......
......@@ -99,7 +99,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kusama"),
impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 1,
spec_version: 1005,
spec_version: 1006,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};
......@@ -131,7 +131,7 @@ impl SignedExtension for OnlyStakingAndClaims {
match call {
Call::Staking(_) | Call::Claims(_) | Call::Sudo(_) | Call::Session(_)
| Call::ElectionsPhragmen(_) | Call::TechnicalMembership(_)
| Call::TechnicalCommittee(_)
| Call::TechnicalCommittee(_) | Call::Nicks(_)
=>
Ok(Default::default()),
_ => Err(InvalidTransaction::Custom(ValidityError::NoPermission.into()).into()),
......@@ -529,6 +529,22 @@ impl sudo::Trait for Runtime {
type Proposal = Call;
}
parameter_types! {
pub const ReservationFee: Balance = 1 * DOLLARS;
pub const MinLength: usize = 3;
pub const MaxLength: usize = 16;
}
impl nicks::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type ReservationFee = ReservationFee;
type Slashed = Treasury;
type KillOrigin = collective::EnsureMember<AccountId, CouncilCollective>;
type MinLength = MinLength;
type MaxLength = MaxLength;
}
construct_runtime!(
pub enum Runtime where
Block = Block,
......@@ -577,6 +593,9 @@ construct_runtime!(
// Sudo. Usable initially.
// RELEASE: remove this for release build.
Sudo: sudo,
// Simple nicknames module.
Nicks: nicks::{Module, Call, Storage, Event<T>},
}
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment