Skip to content

Commit 8df3a76

Browse files
bkonturclaravanstaden
authored and
claravanstaden
committed
[pallet_identity] adapt paritytech/polkadot-sdk#2048
[pallet_identity] removed `FieldDeposit`, `MaxAdditionalFields`, added `ByteDeposit` fix import `simple` -> `legacy`
1 parent a6cb81a commit 8df3a76

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};
@@ -914,7 +914,8 @@ impl claims::Config for Runtime {
914914
parameter_types! {
915915
// Minimum 100 bytes/KSM deposited (1 CENT/byte)
916916
pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain
917-
pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain
917+
// TODO:(PR#137) - check ByteDeposit?
918+
pub const ByteDeposit: Balance = deposit(0, 1);
918919
pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain
919920
pub const MaxSubAccounts: u32 = 100;
920921
pub const MaxAdditionalFields: u32 = 100;
@@ -925,10 +926,9 @@ impl pallet_identity::Config for Runtime {
925926
type RuntimeEvent = RuntimeEvent;
926927
type Currency = Balances;
927928
type BasicDeposit = BasicDeposit;
928-
type FieldDeposit = FieldDeposit;
929+
type ByteDeposit = ByteDeposit;
929930
type SubAccountDeposit = SubAccountDeposit;
930931
type MaxSubAccounts = MaxSubAccounts;
931-
type MaxAdditionalFields = MaxAdditionalFields;
932932
type IdentityInformation = IdentityInfo<MaxAdditionalFields>;
933933
type MaxRegistrars = MaxRegistrars;
934934
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)