Function promise_batch_action_add_key_with_function_call

Source
pub fn promise_batch_action_add_key_with_function_call(
    promise_index: PromiseIndex,
    public_key: &PublicKey,
    nonce: u64,
    allowance: NearToken,
    receiver_id: &AccountId,
    function_names: &str,
)
๐Ÿ‘ŽDeprecated since 5.0.0: Use add_access_key_allowance instead
Expand description

ยงExamples

use near_sdk::env::{promise_batch_action_add_key_with_function_call, promise_batch_create};
use near_sdk::{PublicKey, AccountId, NearToken};
use std::str::FromStr;

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

let pk: PublicKey = "secp256k1:qMoRgcoXai4mBPsdbHi1wfyxF9TdbPCF4qSDQTRP3TfescSRoUdSx6nmeQoN3aiwGzwMyGXAb1gUjBTv5AY8DXj".parse().unwrap();
let nonce = 55;
promise_batch_action_add_key_with_function_call(
    promise,
    &pk,
    nonce,
    NearToken::from_near(1),
    &AccountId::from_str("counter.near").unwrap(),
    "increase,decrease"
);