junobuild_shared::mgmt::ic

Function install_code

Source
pub async fn install_code(
    canister_id: Principal,
    __arg1: &WasmArg,
    mode: CanisterInstallMode,
) -> CallResult<()>
Expand description

Asynchronously installs code on a specified canister.

§Arguments

  • canister_id: Principal ID of the target canister.
  • wasm_arg: Contains the Wasm module and installation arguments.
  • mode: Installation mode defined by CanisterInstallMode.

§Returns

  • A CallResult<()> indicating success or failure.