Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Identity pallet #1178

Merged
merged 6 commits into from
Jun 1, 2020
Merged
Changes from 3 commits
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
29 changes: 28 additions & 1 deletion runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("polkadot"),
impl_name: create_runtime_str!("parity-polkadot"),
authoring_version: 0,
spec_version: 1,
spec_version: 2,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down Expand Up @@ -335,6 +335,30 @@ impl staking::Trait for Runtime {
type MaxIterations = MaxIterations;
}

parameter_types! {
// Minimum 4 CENTS/byte
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 MaxSubAccounts: u32 = 100;
pub const MaxAdditionalFields: u32 = 100;
pub const MaxRegistrars: u32 = 20;
}

impl identity::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type Slashed = Treasury;
type BasicDeposit = BasicDeposit;
type FieldDeposit = FieldDeposit;
type SubAccountDeposit = SubAccountDeposit;
type MaxSubAccounts = MaxSubAccounts;
type MaxAdditionalFields = MaxAdditionalFields;
type MaxRegistrars = MaxRegistrars;
type RegistrarOrigin = frame_system::EnsureRoot;
type ForceOrigin = frame_system::EnsureRoot;
}

parameter_types! {
pub const LaunchPeriod: BlockNumber = 28 * DAYS;
pub const VotingPeriod: BlockNumber = 28 * DAYS;
Expand Down Expand Up @@ -777,6 +801,9 @@ construct_runtime! {

// Sudo. Last module. Usable initially, but removed once governance enabled.
Sudo: sudo::{Module, Call, Storage, Config<T>, Event<T>},

// Identity. Late addition.
Identity: pallet_identity::{Module, Call, Storage, Event<T>},
}
}

Expand Down