mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 10:27:59 +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:
@@ -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