/// Calls the "install_code" method of the management canister.
Calls the "install_code" method of the management canister.
Calls the " install_code " method of the management canister .
async fn install_code(
    payload: ChangeNnsCanisterProposalPayload,
) -> ic_cdk::api::call::CallResult<()> {
    let install_code_args = InstallCodeArgs {
        mode: payload.mode,
        canister_id: payload.canister_id.get(),
        wasm_module: payload.wasm_module,
        arg: payload.arg,
        compute_allocation: payload.compute_allocation,
        memory_allocation: payload.memory_allocation,
        query_allocation: payload.query_allocation,
    };
    // Warning: despite dfn_core::call returning a Result, it actually traps when
    // the callee traps! Use the public cdk instead, which does not have this
    // issue.
    ic_cdk::api::call::call(
        ic_cdk::export::Principal::try_from(IC_00.get().as_slice()).unwrap(),
        "install_code",
        (&install_code_args,),
    )
    .await
}
async fn install_code ( payload : ChangeNnsCanisterProposalPayload , ) -> ic_cdk :: api :: call :: CallResult < ( ) > { let install_code_args = InstallCodeArgs { mode : payload . mode , canister_id : payload . canister_id . get ( ) , wasm_module : payload . wasm_module , arg : payload . arg , compute_allocation : payload . compute_allocation , memory_allocation : payload . memory_allocation , query_allocation : payload . query_allocation , } ; // Warning: despite dfn_core::call returning a Result, it actually traps when // the callee traps! Use the public cdk instead, which does not have this // issue. ic_cdk :: api :: call :: call ( ic_cdk :: export :: Principal :: try_from ( IC_00 . get ( ) . as_slice ( ) ) . unwrap ( ) , " " , ( & install_code_args , ) , ) . await }
Calls the "install_code" method of the management canister.
Calls the " install_code " method of the management canister .
payload
ChangeNnsCanisterProposalPayload