put_code_on_the_canister function
Implementation
Future<void> put_code_on_the_canister(Caller caller, Principal canister_id, Uint8List wasm_canister_bytes, String mode, [Uint8List? canister_install_arg]) async {
await SYSTEM_CANISTERS.management.call(
caller: caller,
calltype: CallType.call,
method_name: 'install_code',
put_bytes: c_forwards([
Record.oftheMap({
'mode': Variant.oftheMap({mode: Null()}),
'canister_id': canister_id.candid,
'wasm_module': Blob(wasm_canister_bytes),
'arg': canister_install_arg != null ? Blob(canister_install_arg) : Blob([])
})
])
);
}