Enum pallet_recovery::pallet::Call
source · pub enum Call<T: Config> {
as_recovered {
account: <<T as Config>::Lookup as StaticLookup>::Source,
call: Box<<T as Config>::RuntimeCall>,
},
set_recovered {
lost: <<T as Config>::Lookup as StaticLookup>::Source,
rescuer: <<T as Config>::Lookup as StaticLookup>::Source,
},
create_recovery {
friends: Vec<T::AccountId>,
threshold: u16,
delay_period: T::BlockNumber,
},
initiate_recovery {
account: <<T as Config>::Lookup as StaticLookup>::Source,
},
vouch_recovery {
lost: <<T as Config>::Lookup as StaticLookup>::Source,
rescuer: <<T as Config>::Lookup as StaticLookup>::Source,
},
claim_recovery {
account: <<T as Config>::Lookup as StaticLookup>::Source,
},
close_recovery {
rescuer: <<T as Config>::Lookup as StaticLookup>::Source,
},
remove_recovery {},
cancel_recovered {
account: <<T as Config>::Lookup as StaticLookup>::Source,
},
// some variants omitted
}
Expand description
Contains one variant per dispatchable that can be called by an extrinsic.
Variants§
as_recovered
Fields
account: <<T as Config>::Lookup as StaticLookup>::Source
call: Box<<T as Config>::RuntimeCall>
Send a call through a recovered account.
The dispatch origin for this call must be Signed and registered to be able to make calls on behalf of the recovered account.
Parameters:
account
: The recovered account you want to make a call on-behalf-of.call
: The call you want to make with the recovered account.
set_recovered
Fields
lost: <<T as Config>::Lookup as StaticLookup>::Source
rescuer: <<T as Config>::Lookup as StaticLookup>::Source
Allow ROOT to bypass the recovery process and set an a rescuer account for a lost account directly.
The dispatch origin for this call must be ROOT.
Parameters:
lost
: The “lost account” to be recovered.rescuer
: The “rescuer account” which can call as the lost account.
create_recovery
Create a recovery configuration for your account. This makes your account recoverable.
Payment: ConfigDepositBase
+ FriendDepositFactor
* #_of_friends balance
will be reserved for storing the recovery configuration. This deposit is returned
in full when the user calls remove_recovery
.
The dispatch origin for this call must be Signed.
Parameters:
friends
: A list of friends you trust to vouch for recovery attempts. Should be ordered and contain no duplicate values.threshold
: The number of friends that must vouch for a recovery attempt before the account can be recovered. Should be less than or equal to the length of the list of friends.delay_period
: The number of blocks after a recovery attempt is initialized that needs to pass before the account can be recovered.
initiate_recovery
Fields
account: <<T as Config>::Lookup as StaticLookup>::Source
Initiate the process for recovering a recoverable account.
Payment: RecoveryDeposit
balance will be reserved for initiating the
recovery process. This deposit will always be repatriated to the account
trying to be recovered. See close_recovery
.
The dispatch origin for this call must be Signed.
Parameters:
account
: The lost account that you want to recover. This account needs to be recoverable (i.e. have a recovery configuration).
vouch_recovery
Fields
lost: <<T as Config>::Lookup as StaticLookup>::Source
rescuer: <<T as Config>::Lookup as StaticLookup>::Source
Allow a “friend” of a recoverable account to vouch for an active recovery process for that account.
The dispatch origin for this call must be Signed and must be a “friend” for the recoverable account.
Parameters:
lost
: The lost account that you want to recover.rescuer
: The account trying to rescue the lost account that you want to vouch for.
The combination of these two parameters must point to an active recovery process.
claim_recovery
Fields
account: <<T as Config>::Lookup as StaticLookup>::Source
Allow a successful rescuer to claim their recovered account.
The dispatch origin for this call must be Signed and must be a “rescuer”
who has successfully completed the account recovery process: collected
threshold
or more vouches, waited delay_period
blocks since initiation.
Parameters:
account
: The lost account that you want to claim has been successfully recovered by you.
close_recovery
Fields
rescuer: <<T as Config>::Lookup as StaticLookup>::Source
As the controller of a recoverable account, close an active recovery process for your account.
Payment: By calling this function, the recoverable account will receive
the recovery deposit RecoveryDeposit
placed by the rescuer.
The dispatch origin for this call must be Signed and must be a recoverable account with an active recovery process for it.
Parameters:
rescuer
: The account trying to rescue this recoverable account.
remove_recovery
Fields
Remove the recovery process for your account. Recovered accounts are still accessible.
NOTE: The user must make sure to call close_recovery
on all active
recovery attempts before calling this function else it will fail.
Payment: By calling this function the recoverable account will unreserve
their recovery configuration deposit.
(ConfigDepositBase
+ FriendDepositFactor
* #_of_friends)
The dispatch origin for this call must be Signed and must be a recoverable account (i.e. has a recovery configuration).
cancel_recovered
Fields
account: <<T as Config>::Lookup as StaticLookup>::Source
Cancel the ability to use as_recovered
for account
.
The dispatch origin for this call must be Signed and registered to be able to make calls on behalf of the recovered account.
Parameters:
account
: The recovered account you are able to call on-behalf-of.
Implementations§
source§impl<T: Config> Call<T>
impl<T: Config> Call<T>
sourcepub fn new_call_variant_as_recovered(
account: <<T as Config>::Lookup as StaticLookup>::Source,
call: Box<<T as Config>::RuntimeCall>
) -> Self
pub fn new_call_variant_as_recovered(
account: <<T as Config>::Lookup as StaticLookup>::Source,
call: Box<<T as Config>::RuntimeCall>
) -> Self
Create a call with the variant as_recovered
.
sourcepub fn new_call_variant_set_recovered(
lost: <<T as Config>::Lookup as StaticLookup>::Source,
rescuer: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
pub fn new_call_variant_set_recovered(
lost: <<T as Config>::Lookup as StaticLookup>::Source,
rescuer: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
Create a call with the variant set_recovered
.
sourcepub fn new_call_variant_create_recovery(
friends: Vec<T::AccountId>,
threshold: u16,
delay_period: T::BlockNumber
) -> Self
pub fn new_call_variant_create_recovery(
friends: Vec<T::AccountId>,
threshold: u16,
delay_period: T::BlockNumber
) -> Self
Create a call with the variant create_recovery
.
sourcepub fn new_call_variant_initiate_recovery(
account: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
pub fn new_call_variant_initiate_recovery(
account: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
Create a call with the variant initiate_recovery
.
sourcepub fn new_call_variant_vouch_recovery(
lost: <<T as Config>::Lookup as StaticLookup>::Source,
rescuer: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
pub fn new_call_variant_vouch_recovery(
lost: <<T as Config>::Lookup as StaticLookup>::Source,
rescuer: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
Create a call with the variant vouch_recovery
.
sourcepub fn new_call_variant_claim_recovery(
account: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
pub fn new_call_variant_claim_recovery(
account: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
Create a call with the variant claim_recovery
.
sourcepub fn new_call_variant_close_recovery(
rescuer: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
pub fn new_call_variant_close_recovery(
rescuer: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
Create a call with the variant close_recovery
.
sourcepub fn new_call_variant_remove_recovery() -> Self
pub fn new_call_variant_remove_recovery() -> Self
Create a call with the variant remove_recovery
.
sourcepub fn new_call_variant_cancel_recovered(
account: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
pub fn new_call_variant_cancel_recovered(
account: <<T as Config>::Lookup as StaticLookup>::Source
) -> Self
Create a call with the variant cancel_recovered
.
Trait Implementations§
source§impl<T: Config> Decode for Call<T>
impl<T: Config> Decode for Call<T>
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
source§impl<T: Config> Encode for Call<T>
impl<T: Config> Encode for Call<T>
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
source§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
source§impl<T: Config> GetCallName for Call<T>
impl<T: Config> GetCallName for Call<T>
source§fn get_call_name(&self) -> &'static str
fn get_call_name(&self) -> &'static str
source§fn get_call_names() -> &'static [&'static str]
fn get_call_names() -> &'static [&'static str]
source§impl<T: Config> GetDispatchInfo for Call<T>
impl<T: Config> GetDispatchInfo for Call<T>
source§fn get_dispatch_info(&self) -> DispatchInfo
fn get_dispatch_info(&self) -> DispatchInfo
DispatchInfo
, containing relevant information of this dispatch. Read moresource§impl<T: Config> GetDispatchInfo for Call<T>
impl<T: Config> GetDispatchInfo for Call<T>
source§fn get_dispatch_info(&self) -> DispatchInfo
fn get_dispatch_info(&self) -> DispatchInfo
frame_support::dispatch
source§impl<T> TypeInfo for Call<T>where
PhantomData<(T,)>: TypeInfo + 'static,
<<T as Config>::Lookup as StaticLookup>::Source: TypeInfo + 'static,
Box<<T as Config>::RuntimeCall>: TypeInfo + 'static,
Vec<T::AccountId>: TypeInfo + 'static,
T::BlockNumber: TypeInfo + 'static,
T: Config + 'static,
impl<T> TypeInfo for Call<T>where
PhantomData<(T,)>: TypeInfo + 'static,
<<T as Config>::Lookup as StaticLookup>::Source: TypeInfo + 'static,
Box<<T as Config>::RuntimeCall>: TypeInfo + 'static,
Vec<T::AccountId>: TypeInfo + 'static,
T::BlockNumber: TypeInfo + 'static,
T: Config + 'static,
source§impl<T: Config> UnfilteredDispatchable for Call<T>
impl<T: Config> UnfilteredDispatchable for Call<T>
§type RuntimeOrigin = <T as Config>::RuntimeOrigin
type RuntimeOrigin = <T as Config>::RuntimeOrigin
frame_system::Config::RuntimeOrigin
).source§fn dispatch_bypass_filter(
self,
origin: Self::RuntimeOrigin
) -> DispatchResultWithPostInfo
fn dispatch_bypass_filter(
self,
origin: Self::RuntimeOrigin
) -> DispatchResultWithPostInfo
impl<T: Config> EncodeLike<Call<T>> for Call<T>
impl<T: Config> Eq for Call<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Call<T>where
T: RefUnwindSafe,
<T as Config>::AccountId: RefUnwindSafe,
<T as Config>::BlockNumber: RefUnwindSafe,
<T as Config>::RuntimeCall: RefUnwindSafe,
<<T as Config>::Lookup as StaticLookup>::Source: RefUnwindSafe,
impl<T> Send for Call<T>where
T: Send,
<T as Config>::RuntimeCall: Send,
<<T as Config>::Lookup as StaticLookup>::Source: Send,
impl<T> Sync for Call<T>where
T: Sync,
<T as Config>::RuntimeCall: Sync,
<<T as Config>::Lookup as StaticLookup>::Source: Sync,
impl<T> Unpin for Call<T>where
T: Unpin,
<T as Config>::AccountId: Unpin,
<T as Config>::BlockNumber: Unpin,
<<T as Config>::Lookup as StaticLookup>::Source: Unpin,
impl<T> UnwindSafe for Call<T>where
T: UnwindSafe,
<T as Config>::AccountId: UnwindSafe,
<T as Config>::BlockNumber: UnwindSafe,
<T as Config>::RuntimeCall: UnwindSafe,
<<T as Config>::Lookup as StaticLookup>::Source: UnwindSafe,
Blanket Implementations§
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresource§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
fn blake2_128(&self) -> [u8; 16]
fn blake2_256(&self) -> [u8; 32]
fn blake2_128_concat(&self) -> Vec<u8, Global> ⓘ
fn twox_128(&self) -> [u8; 16]
fn twox_256(&self) -> [u8; 32]
fn twox_64_concat(&self) -> Vec<u8, Global> ⓘ
fn identity(&self) -> Vec<u8, Global> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read moresource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.