deploy
suspend fun deploy(wasmBytes: ByteArray, constructorArgs: Map<String, Any?> = emptyMap(), source: String, signer: KeyPair, network: Network, rpcUrl: String, salt: ByteArray = Random.nextBytes(32), loadSpec: Boolean = true): ContractClient
Deploy a contract in one step (RECOMMENDED).
This is the primary deployment method that handles everything:
Upload WASM (with duplicate detection)
Deploy contract with optional constructor
Load contract spec
Return ready-to-use client
For advanced scenarios requiring WASM reuse, see install and deployFromWasmId.
Return
ContractClient for the deployed contract
Parameters
wasm Bytes
The contract WASM code
constructor Args
Constructor arguments as native Kotlin types
source
Source account for transactions
signer
KeyPair for signing
network
Network to deploy to
rpc Url
RPC server URL
salt
Salt for contract ID generation (default: random)
load Spec
Whether to load spec after deployment (default: true)