Skip to content

Commit 3c88719

Browse files
committed
[pallet_identity] adapt paritytech/polkadot-sdk#2048
[pallet_identity] removed `FieldDeposit`, `MaxAdditionalFields`, added `ByteDeposit` fix import `simple` -> `legacy`
1 parent 93f136b commit 3c88719

File tree

4 files changed

+20
-44
lines changed

4 files changed

+20
-44
lines changed

relay/kusama/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ use frame_support::{
8080
};
8181
use frame_system::EnsureRoot;
8282
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
83-
use pallet_identity::simple::IdentityInfo;
83+
use pallet_identity::legacy::IdentityInfo;
8484
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
8585
use pallet_session::historical as session_historical;
8686
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
@@ -922,7 +922,8 @@ impl claims::Config for Runtime {
922922
parameter_types! {
923923
// Minimum 100 bytes/KSM deposited (1 CENT/byte)
924924
pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain
925-
pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain
925+
// TODO:(PR#137) - check ByteDeposit?
926+
pub const ByteDeposit: Balance = deposit(0, 1);
926927
pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain
927928
pub const MaxSubAccounts: u32 = 100;
928929
pub const MaxAdditionalFields: u32 = 100;
@@ -933,10 +934,9 @@ impl pallet_identity::Config for Runtime {
933934
type RuntimeEvent = RuntimeEvent;
934935
type Currency = Balances;
935936
type BasicDeposit = BasicDeposit;
936-
type FieldDeposit = FieldDeposit;
937+
type ByteDeposit = ByteDeposit;
937938
type SubAccountDeposit = SubAccountDeposit;
938939
type MaxSubAccounts = MaxSubAccounts;
939-
type MaxAdditionalFields = MaxAdditionalFields;
940940
type IdentityInformation = IdentityInfo<MaxAdditionalFields>;
941941
type MaxRegistrars = MaxRegistrars;
942942
type Slashed = Treasury;

relay/kusama/src/weights/pallet_identity.rs

Lines changed: 6 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

relay/polkadot/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ use frame_support::{
6666
};
6767
use frame_system::EnsureRoot;
6868
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
69-
use pallet_identity::simple::IdentityInfo;
69+
use pallet_identity::legacy::IdentityInfo;
7070
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
7171
use pallet_session::historical as session_historical;
7272
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
@@ -795,7 +795,8 @@ impl pallet_fast_unstake::Config for Runtime {
795795
parameter_types! {
796796
// Minimum 4 CENTS/byte
797797
pub const BasicDeposit: Balance = deposit(1, 258);
798-
pub const FieldDeposit: Balance = deposit(0, 66);
798+
// TODO:(PR#137) - check ByteDeposit?
799+
pub const ByteDeposit: Balance = deposit(0, 1);
799800
pub const SubAccountDeposit: Balance = deposit(1, 53);
800801
pub const MaxSubAccounts: u32 = 100;
801802
pub const MaxAdditionalFields: u32 = 100;
@@ -806,10 +807,9 @@ impl pallet_identity::Config for Runtime {
806807
type RuntimeEvent = RuntimeEvent;
807808
type Currency = Balances;
808809
type BasicDeposit = BasicDeposit;
809-
type FieldDeposit = FieldDeposit;
810+
type ByteDeposit = ByteDeposit;
810811
type SubAccountDeposit = SubAccountDeposit;
811812
type MaxSubAccounts = MaxSubAccounts;
812-
type MaxAdditionalFields = MaxAdditionalFields;
813813
type IdentityInformation = IdentityInfo<MaxAdditionalFields>;
814814
type MaxRegistrars = MaxRegistrars;
815815
type Slashed = Treasury;

relay/polkadot/src/weights/pallet_identity.rs

Lines changed: 6 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)