Skip to content

Commit

Permalink
[pallet_identity] adapt paritytech/polkadot-sdk#2048
Browse files Browse the repository at this point in the history
[pallet_identity] removed `FieldDeposit`, `MaxAdditionalFields`, added `ByteDeposit`
fix import `simple` -> `legacy`
  • Loading branch information
bkontur committed Jan 10, 2024
1 parent f822b59 commit e02d635
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 44 deletions.
8 changes: 4 additions & 4 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ use frame_support::{
};
use frame_system::EnsureRoot;
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
use pallet_identity::simple::IdentityInfo;
use pallet_identity::legacy::IdentityInfo;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use pallet_session::historical as session_historical;
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
Expand Down Expand Up @@ -920,7 +920,8 @@ impl claims::Config for Runtime {
parameter_types! {
// Minimum 100 bytes/KSM deposited (1 CENT/byte)
pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain
pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain
// TODO:(PR#137) - check ByteDeposit?
pub const ByteDeposit: Balance = deposit(0, 1);
pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain
pub const MaxSubAccounts: u32 = 100;
pub const MaxAdditionalFields: u32 = 100;
Expand All @@ -931,10 +932,9 @@ impl pallet_identity::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type BasicDeposit = BasicDeposit;
type FieldDeposit = FieldDeposit;
type ByteDeposit = ByteDeposit;
type SubAccountDeposit = SubAccountDeposit;
type MaxSubAccounts = MaxSubAccounts;
type MaxAdditionalFields = MaxAdditionalFields;
type IdentityInformation = IdentityInfo<MaxAdditionalFields>;
type MaxRegistrars = MaxRegistrars;
type Slashed = Treasury;
Expand Down
24 changes: 6 additions & 18 deletions relay/kusama/src/weights/pallet_identity.rs

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

8 changes: 4 additions & 4 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ use frame_support::{
};
use frame_system::EnsureRoot;
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
use pallet_identity::simple::IdentityInfo;
use pallet_identity::legacy::IdentityInfo;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use pallet_session::historical as session_historical;
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
Expand Down Expand Up @@ -795,7 +795,8 @@ impl pallet_fast_unstake::Config for Runtime {
parameter_types! {
// Minimum 4 CENTS/byte
pub const BasicDeposit: Balance = deposit(1, 258);
pub const FieldDeposit: Balance = deposit(0, 66);
// TODO:(PR#137) - check ByteDeposit?
pub const ByteDeposit: Balance = deposit(0, 1);
pub const SubAccountDeposit: Balance = deposit(1, 53);
pub const MaxSubAccounts: u32 = 100;
pub const MaxAdditionalFields: u32 = 100;
Expand All @@ -806,10 +807,9 @@ impl pallet_identity::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type BasicDeposit = BasicDeposit;
type FieldDeposit = FieldDeposit;
type ByteDeposit = ByteDeposit;
type SubAccountDeposit = SubAccountDeposit;
type MaxSubAccounts = MaxSubAccounts;
type MaxAdditionalFields = MaxAdditionalFields;
type IdentityInformation = IdentityInfo<MaxAdditionalFields>;
type MaxRegistrars = MaxRegistrars;
type Slashed = Treasury;
Expand Down
24 changes: 6 additions & 18 deletions relay/polkadot/src/weights/pallet_identity.rs

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

0 comments on commit e02d635

Please sign in to comment.