deploy
Deploy a contract in one step (RECOMMENDED).
This is the primary deployment method that handles everything:
Upload WASM (with duplicate detection)
Load the contract spec from the uploaded code
Deploy contract with optional constructor
Return ready-to-use client
For advanced scenarios requiring WASM reuse, see install and deployFromWasmId.
Return
ContractClient for the deployed contract
Parameters
The contract WASM code
Constructor arguments as native Kotlin types
Source account for transactions
KeyPair for signing
Network to deploy to
RPC server URL
Salt for contract ID generation (default: 32 bytes from the platform CSPRNG)
Whether to load the contract spec from the uploaded code before deploying, so the returned client carries it (default: true)
Throws
if the network refuses the upload or deployment transaction at submission
if constructor arguments are provided but the uploaded code cannot be found on the RPC to convert them
if constructor arguments are provided but the contract spec declares no __constructor function
if constructor arguments are provided but the uploaded code cannot be parsed