Trait ForceAccountManager

Source
pub trait ForceAccountManager: AccessControllable {
    // Required methods
    fn is_account_locked(&self, account_id: &AccountId) -> bool;
    fn force_lock_account(&mut self, account_id: AccountId) -> bool;
    fn force_unlock_account(&mut self, account_id: &AccountId) -> bool;
    fn force_disable_auth_by_predecessor_ids(
        &mut self,
        account_ids: Vec<AccountId>,
    );
    fn force_enable_auth_by_predecessor_ids(
        &mut self,
        account_ids: Vec<AccountId>,
    );
}

Required Methods§

Source

fn is_account_locked(&self, account_id: &AccountId) -> bool

Returns whether the givenaccount_id is locked

Source

fn force_lock_account(&mut self, account_id: AccountId) -> bool

Locks given account_id from modifying its own state, including token balances. Returns false if the account was already in locked state.

Attached deposit of 1yN is required for security purposes.

NOTE: this still allows for force withdrawals/transfers

Source

fn force_unlock_account(&mut self, account_id: &AccountId) -> bool

Unlocks given account_id. Returns false if the account wasn’t in locked state.

Attached deposit of 1yN is required for security purposes.

Source

fn force_disable_auth_by_predecessor_ids(&mut self, account_ids: Vec<AccountId>)

Disables authentication by PREDECESSOR_ID for given account ids.

WARN: Doing so might lock these accounts out of your funds if they don’t have any other public_keys added to them.

NOTE: MUST attach 1 yⓃ for security purposes.

Source

fn force_enable_auth_by_predecessor_ids(&mut self, account_ids: Vec<AccountId>)

Enables authentication by PREDECESSOR_ID for given account ids.

WARN: Doing so might let an attacker who has control over Near accounts with the same AccountIds to take over control of these accounts inside verifier contract.

NOTE: MUST attach 1 yⓃ for security purposes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§