load Contract Code For Contract Id
Loads the contract code entry (including WASM bytecode) for a given contract ID.
This method:
Fetches the contract instance to get the WASM hash
Fetches the contract code using the WASM hash
Example
val contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5"
val codeEntry = server.loadContractCodeForContractId(contractId)
codeEntry?.let {
println("Contract code size: ${it.code.dataValue.size} bytes")
}Content copied to clipboard
Return
The contract code entry if found, null otherwise
Parameters
contract Id
The contract address (C... format)
See also
Throws
If the RPC request fails
If contractId is not a valid contract address