feat: wire trust score system with cross-chain staking data and component triggers

- Add CachedStakingDetails storage and receive_staking_details extrinsic
  to staking-score pallet for Asset Hub XCM data reception
- Add TrustScoreUpdater triggers to referral, tiki, and perwerde pallets
  so component score changes propagate to trust pallet
- Wire runtime hooks (OnKycApproved, OnCitizenshipRevoked) to Referral
  and CitizenNftProvider to Tiki in people.rs
- Fix PerwerdeScoreSource and ReferralScoreSource to read actual pallet data
- Fix EnsureOrigin trait feature unification issue by removing cfg gate
  from try_successful_origin and adding default Err(()) implementation
- Fix workspace Cargo.toml default-features for pezkuwi-subxt dependencies
This commit is contained in:
2026-02-13 20:13:50 +03:00
parent 7cc2f831b4
commit bd454cf395
11 changed files with 170 additions and 43 deletions
@@ -72,8 +72,14 @@ pub trait EnsureOrigin<OuterOrigin> {
/// is impossible.
///
/// ** Should be used for benchmarking only!!! **
#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<OuterOrigin, ()>;
///
/// Default implementation returns `Err(())` to handle feature unification issues where
/// pezframe-support/runtime-benchmarks is enabled but the implementing crate's
/// runtime-benchmarks feature is not. Implementations should override this when
/// runtime-benchmarks feature is enabled.
fn try_successful_origin() -> Result<OuterOrigin, ()> {
Err(())
}
}
/// [`EnsureOrigin`] implementation that checks that an origin has equal or higher privilege
@@ -180,8 +186,8 @@ pub trait EnsureOriginWithArg<OuterOrigin, Argument> {
///
/// Default implementation returns `Err(())` to handle feature unification issues where
/// pezframe-support/runtime-benchmarks is enabled but the implementing crate's
/// runtime-benchmarks feature is not. Implementations should override this.
#[cfg(feature = "runtime-benchmarks")]
/// runtime-benchmarks feature is not. Implementations should override this when
/// runtime-benchmarks feature is enabled.
fn try_successful_origin(_a: &Argument) -> Result<OuterOrigin, ()> {
Err(())
}