diff --git a/primitives/rpc/src/nomination_pools.rs b/primitives/rpc/src/nomination_pools.rs index 8378632..960877b 100644 --- a/primitives/rpc/src/nomination_pools.rs +++ b/primitives/rpc/src/nomination_pools.rs @@ -1,7 +1,7 @@ use codec::{Decode, Encode}; use frame_system::pallet_prelude::BlockNumberFor; use pallet_nomination_pools::BalanceOf; -use scale_info::TypeInfo; +use scale_info::{prelude::vec::Vec, TypeInfo}; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::Perbill; @@ -175,17 +175,20 @@ pub struct BondedPool { pub roles: PoolRoles, /// The current state of the pool. pub state: PoolState, + /// Pool metadata + pub metadata: Vec, } impl - From<(u32, T::AccountId, pallet_nomination_pools::BondedPoolInner)> + From<(u32, T::AccountId, pallet_nomination_pools::BondedPoolInner, Vec)> for BondedPool, BlockNumberFor> { fn from( - (id, bonded_account, pool): ( + (id, bonded_account, pool, metadata): ( u32, T::AccountId, pallet_nomination_pools::BondedPoolInner, + Vec, ), ) -> Self { Self { @@ -196,6 +199,7 @@ impl points: pool.points, roles: pool.roles.into(), state: pool.state.into(), + metadata, } } } diff --git a/runtime/src/api.rs b/runtime/src/api.rs index 1e5ed07..bd6f58f 100644 --- a/runtime/src/api.rs +++ b/runtime/src/api.rs @@ -541,7 +541,8 @@ impl_runtime_apis! { .take(limit.unwrap_or(u32::MAX) as usize) .map(|(pool_id, pool)| { let bonded_account = NominationPools::create_bonded_account(pool_id); - (pool_id, bonded_account, pool) + let metadata: Vec<_> = pallet_nomination_pools::Metadata::::get(pool_id).into(); + (pool_id, bonded_account, pool, metadata) }) .map(Into::into) .collect() diff --git a/runtime/src/pallets/system.rs b/runtime/src/pallets/system.rs index ea0733f..0f21388 100644 --- a/runtime/src/pallets/system.rs +++ b/runtime/src/pallets/system.rs @@ -13,7 +13,7 @@ parameter_types! { ); pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); - pub const SS58Prefix: u8 = prod_or_fast!(21, 42); + pub const SS58Prefix: u8 = prod_or_fast!(42, 42); } // Configure FRAME pallets to include in runtime.