Function promise_batch_action_deploy_contract

Source
pub fn promise_batch_action_deploy_contract(
    promise_index: PromiseIndex,
    code: &[u8],
)
Expand description

Attach a deploy contract promise action to the NEAR promise index with the provided promise index.

More info about batching here

ยงExamples

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

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

let code = [0; 1487];
promise_batch_action_deploy_contract(promise, &code);

More low-level info here: near_vm_runner::logic::VMLogic::promise_batch_action_deploy_contract See example of usage here