loadContractInfoForWasmId

Loads contract information (Environment Meta, Contract Spec, Contract Meta) for a given WASM ID.

This method:

  1. Fetches the contract code using loadContractCodeForWasmId

  2. Parses the WASM bytecode to extract contract metadata

The returned information includes:

  • Environment interface version (protocol version)

  • Contract specification entries (functions, structs, events, etc.)

  • Contract metadata (key-value pairs for application/tooling use)

Example

val wasmId = "abc123..."  // From transaction response
val contractInfo = server.loadContractInfoForWasmId(wasmId)
contractInfo?.let {
println("Protocol version: ${it.envInterfaceVersion}")
println("Functions: ${it.specEntries.size}")
}

Return

The parsed contract information if found, null if the contract code doesn't exist

Parameters

wasmId

The contract WASM ID as a hex-encoded hash string

See also

Throws

If the RPC request fails

If the WASM bytecode cannot be parsed

If wasmId is not a valid hex string