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
@@ -129,6 +129,12 @@ pub trait TrustScoreUpdater<AccountId> {
fn on_score_component_changed(who: &AccountId);
}
/// Noop implementation of TrustScoreUpdater for use in mock environments
/// and pallets that don't need to trigger trust score updates.
impl<AccountId> TrustScoreUpdater<AccountId> for () {
fn on_score_component_changed(_who: &AccountId) {}
}
pub trait PerwerdeScoreProvider<AccountId> {
fn get_perwerde_score(who: &AccountId) -> u32;
}