load Contract Info For Wasm Id
Loads contract information (Environment Meta, Contract Spec, Contract Meta) for a given WASM ID.
This method:
Fetches the contract code using loadContractCodeForWasmId
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}")
}Content copied to clipboard
Return
The parsed contract information if found, null if the contract code doesn't exist
Parameters
wasm Id
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