deployFromWasmId

suspend fun deployFromWasmId(wasmId: String, constructorArgs: List<SCValXdr> = emptyList(), source: String, signer: KeyPair, network: Network, rpcUrl: String, salt: ByteArray = Random.nextBytes(32), loadSpec: Boolean = true): ContractClient

Deploy a contract from an existing WASM ID (ADVANCED - Step 2 of 2).

This is a power-user method for deploying contracts from a previously uploaded WASM. Use this to deploy multiple contract instances from the same WASM code (saves fees and time).

Most developers should use the one-step deploy method instead.

Return

ContractClient for the deployed contract

Parameters

wasmId

WASM ID (hex string) from install

constructorArgs

Constructor arguments as List (XDR)

source

Source account

signer

KeyPair for signing

network

Network to deploy to

rpcUrl

RPC server URL

salt

Salt for contract ID generation (default: random)

loadSpec

Whether to load spec after deployment (default: true)

Samples