1234567891011121314151617#![cfg_attr(not(feature = "std"), no_std)]1819use up_data_structs::{20 CollectionId, TokenId, RpcCollection, CollectionStats, CollectionLimits, Property,21 PropertyKeyPermission, TokenData, TokenChild,22};2324use sp_std::vec::Vec;25use codec::Decode;26use sp_runtime::{27 DispatchError,28 traits::{AtLeast32BitUnsigned, Member},29};3031type Result<T> = core::result::Result<T, DispatchError>;3233sp_api::decl_runtime_apis! {34 #[api_version(2)]35 36 pub trait AppPromotionApi<BlockNumber ,CrossAccountId, AccountId> where37 BlockNumber: Decode + Member + AtLeast32BitUnsigned,38 AccountId: Decode,39 CrossAccountId: pallet_evm::account::CrossAccountId<AccountId>,40 {41 fn total_staked(staker: Option<CrossAccountId>) -> Result<u128>;42 fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;43 fn total_staking_locked(staker: CrossAccountId) -> Result<u128>;44 fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128>;45 fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;46 }47}