Function promise_batch_action_delete_account

Source
pub fn promise_batch_action_delete_account(
    promise_index: PromiseIndex,
    beneficiary_id: &AccountId,
)
Expand description

Attach promise action that deletes the account to the NEAR promise index with the provided promise index.

More info about batching here

ยงExamples

use near_sdk::env::{promise_batch_action_delete_account, promise_batch_create};
use near_sdk::AccountId;
use std::str::FromStr;

let promise = promise_batch_create(
    &AccountId::from_str("receiver.near").unwrap()
);

promise_batch_action_delete_account(
    promise,
    &AccountId::from_str("beneficiary.near").unwrap()
);

More low-level info here: near_vm_runner::logic::VMLogic::promise_batch_action_delete_account