mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 00:28:01 +00:00
Rococo & Westend People Chain (#2281)
Rococo and Westend runtimes for the "People Chain". This chain contains the Identity pallet with plans to migrate all related data from the Relay Chain. Changes `IdentityInfo` to: - Remove `additional_fields`. - Add `github` and `discord` as first class fields. From scraping chain data, these were the only two additional fields used (for the Fellowship and Ambassador Program, respectively). - Rename `riot` to `matrix`. Note: This will use the script in https://github.com/paritytech/polkadot-sdk/pull/2025 to generate the genesis state. TODO: - [x] https://github.com/paritytech/polkadot-sdk/pull/1814 and integration of the Identity Migrator pallet for migration. - [x] Tests: https://github.com/paritytech/polkadot-sdk/pull/2373 --------- Co-authored-by: Muharem <ismailov.m.h@gmail.com> Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: Dónal Murray <donal.murray@parity.io> Co-authored-by: Richard Melkonian <35300528+0xmovses@users.noreply.github.com> Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
This commit is contained in:
@@ -1005,8 +1005,9 @@ impl<T: Config> Pallet<T> {
|
||||
Ok((new_id_deposit, new_subs_deposit))
|
||||
}
|
||||
|
||||
/// Set an identity with zero deposit. Only used for benchmarking that involves `rejig_deposit`.
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
/// Set an identity with zero deposit. Used for benchmarking and XCM emulator tests that involve
|
||||
/// `rejig_deposit`.
|
||||
#[cfg(any(feature = "runtime-benchmarks", feature = "std"))]
|
||||
pub fn set_identity_no_deposit(
|
||||
who: &T::AccountId,
|
||||
info: T::IdentityInformation,
|
||||
@@ -1022,15 +1023,25 @@ impl<T: Config> Pallet<T> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Set subs with zero deposit. Only used for benchmarking that involves `rejig_deposit`.
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub fn set_sub_no_deposit(who: &T::AccountId, sub: T::AccountId) -> DispatchResult {
|
||||
/// Set subs with zero deposit and default name. Only used for benchmarks that involve
|
||||
/// `rejig_deposit`.
|
||||
#[cfg(any(feature = "runtime-benchmarks", feature = "std"))]
|
||||
pub fn set_subs_no_deposit(
|
||||
who: &T::AccountId,
|
||||
subs: Vec<(T::AccountId, Data)>,
|
||||
) -> DispatchResult {
|
||||
use frame_support::BoundedVec;
|
||||
let subs = BoundedVec::<_, T::MaxSubAccounts>::try_from(vec![sub]).unwrap();
|
||||
let mut sub_accounts = BoundedVec::<T::AccountId, T::MaxSubAccounts>::default();
|
||||
for (sub, name) in subs {
|
||||
<SuperOf<T>>::insert(&sub, (who.clone(), name));
|
||||
sub_accounts
|
||||
.try_push(sub)
|
||||
.expect("benchmark should not pass more than T::MaxSubAccounts");
|
||||
}
|
||||
SubsOf::<T>::insert::<
|
||||
&T::AccountId,
|
||||
(BalanceOf<T>, BoundedVec<T::AccountId, T::MaxSubAccounts>),
|
||||
>(&who, (Zero::zero(), subs));
|
||||
>(&who, (Zero::zero(), sub_accounts));
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user