mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
runtime: Account nicknames (#3930)
* Add Nicknames module for accounts. * Integrate into node. * Fix build * Update srml/nicks/src/lib.rs Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Bump runtime * Improve weight docs * Docs. * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -40,6 +40,7 @@ grandpa = { package = "srml-grandpa", path = "../../srml/grandpa", default-featu
|
||||
im-online = { package = "srml-im-online", path = "../../srml/im-online", default-features = false }
|
||||
indices = { package = "srml-indices", path = "../../srml/indices", default-features = false }
|
||||
membership = { package = "srml-membership", path = "../../srml/membership", default-features = false }
|
||||
nicks = { package = "srml-nicks", path = "../../srml/nicks", default-features = false }
|
||||
offences = { package = "srml-offences", path = "../../srml/offences", default-features = false }
|
||||
randomness-collective-flip = { package = "srml-randomness-collective-flip", path = "../../srml/randomness-collective-flip", default-features = false }
|
||||
session = { package = "srml-session", path = "../../srml/session", default-features = false, features = ["historical"] }
|
||||
@@ -82,6 +83,7 @@ std = [
|
||||
"im-online/std",
|
||||
"indices/std",
|
||||
"membership/std",
|
||||
"nicks/std",
|
||||
"node-primitives/std",
|
||||
"offchain-primitives/std",
|
||||
"offences/std",
|
||||
|
||||
@@ -83,8 +83,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
// and set impl_version to equal spec_version. If only runtime
|
||||
// implementation changes and behavior does not, then leave spec_version as
|
||||
// is and increment impl_version.
|
||||
spec_version: 185,
|
||||
impl_version: 185,
|
||||
spec_version: 186,
|
||||
impl_version: 186,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
@@ -440,7 +440,7 @@ impl offences::Trait for Runtime {
|
||||
}
|
||||
|
||||
impl authority_discovery::Trait for Runtime {
|
||||
type AuthorityId = BabeId;
|
||||
type AuthorityId = BabeId;
|
||||
}
|
||||
|
||||
impl grandpa::Trait for Runtime {
|
||||
@@ -458,6 +458,22 @@ impl finality_tracker::Trait for Runtime {
|
||||
type ReportLatency = ReportLatency;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
impl system::offchain::CreateTransaction<Runtime, UncheckedExtrinsic> for Runtime {
|
||||
type Public = <Signature as traits::Verify>::Signer;
|
||||
type Signature = Signature;
|
||||
@@ -518,6 +534,7 @@ construct_runtime!(
|
||||
AuthorityDiscovery: authority_discovery::{Module, Call, Config<T>},
|
||||
Offences: offences::{Module, Call, Storage, Event},
|
||||
RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},
|
||||
Nicks: nicks::{Module, Call, Storage, Event<T>},
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user