Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixes and replaces nicks with identity
  • Loading branch information
bkchr committed Jan 14, 2020
commit dccb255b315dc4bdc1145d9f8238c447e2930137
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bin/node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ pallet-finality-tracker = { version = "2.0.0", default-features = false, path =
pallet-grandpa = { version = "2.0.0", default-features = false, path = "../../../frame/grandpa" }
pallet-im-online = { version = "2.0.0", default-features = false, path = "../../../frame/im-online" }
pallet-indices = { version = "2.0.0", default-features = false, path = "../../../frame/indices" }
pallet-identity = { version = "2.0.0", default-features = false, path = "../../../frame/identity" }
pallet-membership = { version = "2.0.0", default-features = false, path = "../../../frame/membership" }
pallet-nicks = { version = "2.0.0", default-features = false, path = "../../../frame/nicks" }
pallet-offences = { version = "2.0.0", default-features = false, path = "../../../frame/offences" }
pallet-randomness-collective-flip = { version = "2.0.0", default-features = false, path = "../../../frame/randomness-collective-flip" }
pallet-recovery = { version = "2.0.0", default-features = false, path = "../../../frame/recovery" }
Expand Down Expand Up @@ -93,7 +93,7 @@ std = [
"pallet-indices/std",
"sp-inherents/std",
"pallet-membership/std",
"pallet-nicks/std",
"pallet-identity/std",
"node-primitives/std",
"sp-offchain/std",
"pallet-offences/std",
Expand Down
21 changes: 12 additions & 9 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,19 +488,22 @@ impl pallet_finality_tracker::Trait for Runtime {
}

parameter_types! {
pub const ReservationFee: Balance = 1 * DOLLARS;
pub const MinLength: usize = 3;
pub const MaxLength: usize = 16;
pub const BasicDeposit: Balance = 10 * DOLLARS; // 258 bytes on-chain
pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain
pub const SubAccountDeposit: Balance = 2 * DOLLARS; // 53 bytes on-chain
pub const MaximumSubAccounts: u32 = 100;
}

impl pallet_nicks::Trait for Runtime {
impl pallet_identity::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type ReservationFee = ReservationFee;
type Slashed = Treasury;
type ForceOrigin = pallet_collective::EnsureMember<AccountId, CouncilCollective>;
type MinLength = MinLength;
type MaxLength = MaxLength;
type BasicDeposit = BasicDeposit;
type FieldDeposit = FieldDeposit;
type SubAccountDeposit = SubAccountDeposit;
type MaximumSubAccounts = MaximumSubAccounts;
type RegistrarOrigin = pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
type ForceOrigin = pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
}

impl frame_system::offchain::CreateTransaction<Runtime, UncheckedExtrinsic> for Runtime {
Expand Down Expand Up @@ -617,7 +620,7 @@ construct_runtime!(
AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config},
Offences: pallet_offences::{Module, Call, Storage, Event},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
Nicks: pallet_nicks::{Module, Call, Storage, Event<T>},
Identity: pallet_identity::{Module, Call, Storage, Event<T>},
Society: pallet_society::{Module, Call, Storage, Event<T>},
Recovery: pallet_recovery::{Module, Call, Storage, Event<T>},
}
Expand Down