pub async fn cmc_create_canister_install_code(
controllers: Vec<Principal>,
wasm_arg: &WasmArg,
cycles: u128,
subnet_id: &SubnetId,
) -> Result<Principal, String>Expand description
Asynchronously creates a new canister and installs the provided Wasm code with additional cycles.
§Arguments
controllers: A list ofPrincipalIDs to set as controllers of the new canister.wasm_arg: Wasm binary and arguments to install in the new canister (WasmArgstruct).cycles: Additional cycles to deposit during canister creation on top ofCREATE_CANISTER_CYCLES.subnet_id: TheSubnetIdwhere the canister should be created.
§Returns
Ok(Principal): On success, returns thePrincipalID of the newly created canister.Err(String): On failure, returns an error message.