referrerpolicy=no-referrer-when-downgrade
pub trait OnReapIdentity<AccountId> {
    // Required methods
    fn on_reap_identity(
        who: &AccountId,
        bytes: u32,
        subs: u32,
    ) -> DispatchResult;
    fn ensure_successful_identity_reaping(
        who: &AccountId,
        bytes: u32,
        subs: u32,
    );
}
Expand description

Trait to handle reaping identity from state.

Required Methods§

source

fn on_reap_identity(who: &AccountId, bytes: u32, subs: u32) -> DispatchResult

What to do when an identity is reaped. For example, the implementation could send an XCM program to another chain. Concretely, a type implementing this trait in the Polkadot runtime would teleport enough DOT to the People Chain to cover the Identity deposit there.

This could also directly include Transact { poke_deposit(..), ..}.

Inputs

  • who: Whose identity was reaped.
  • bytes: The byte size of IdentityInfo.
  • subs: The number of sub-accounts they had.
source

fn ensure_successful_identity_reaping(who: &AccountId, bytes: u32, subs: u32)

Ensure that identity reaping will be succesful in benchmarking.

Should setup the state in a way that the same call ot [Self::on_reap_identity] will be successful.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<AccountId> OnReapIdentity<AccountId> for ()

source§

fn on_reap_identity(_who: &AccountId, _bytes: u32, _subs: u32) -> DispatchResult

source§

fn ensure_successful_identity_reaping(_: &AccountId, _: u32, _: u32)

Implementors§