pallet_permission0/permission/
wallet.rs1use codec::{Decode, Encode, MaxEncodedLen};
2use polkadot_sdk::frame_support::{CloneNoBound, DebugNoBound, EqNoBound, PartialEqNoBound};
3use scale_info::TypeInfo;
4
5use crate::Config;
6
7#[derive(CloneNoBound, DebugNoBound, Encode, Decode, MaxEncodedLen, TypeInfo)]
8#[scale_info(skip_type_params(T))]
9pub struct WalletScope<T: Config> {
10 pub recipient: T::AccountId,
11 pub r#type: WalletScopeType,
12}
13
14impl<T: Config> WalletScope<T> {
15 pub(crate) fn cleanup(
17 &self,
18 _permission_id: polkadot_sdk::sp_core::H256,
19 _last_execution: &Option<crate::BlockNumberFor<T>>,
20 _delegator: &T::AccountId,
21 ) {
22 }
24}
25
26#[derive(CloneNoBound, DebugNoBound, Encode, Decode, MaxEncodedLen, TypeInfo)]
27pub enum WalletScopeType {
28 Stake(WalletStake),
29}
30
31#[derive(
32 CloneNoBound, DebugNoBound, Encode, Decode, MaxEncodedLen, TypeInfo, PartialEqNoBound, EqNoBound,
33)]
34pub struct WalletStake {
35 pub can_transfer_stake: bool,
37 pub exclusive_stake_access: bool,
41}