uploadContractWasm

Creates an InvokeHostFunctionOperation for uploading contract WASM code.

This operation installs contract code on the ledger and returns a WASM hash that can be used to deploy contract instances.

Return

An InvokeHostFunctionOperation for uploading the WASM

Example

val wasmBytes = File("contract.wasm").readBytes()
val uploadOp = InvokeHostFunctionOperation.uploadContractWasm(wasmBytes)

Parameters

wasmBytes

The contract WASM code as a byte array