create Create Contract Context
Creates a CreateContract context rule type from a hex-encoded WASM hash.
CreateContract rules apply only when deploying contracts with a specific WASM hash.
Return
A ContextRuleType.CreateContract for contract creation authorization
Parameters
wasm Hash Hex
The WASM hash as a hex string (64 characters, optionally prefixed with "0x")
Throws
if the hex string (after removing optional "0x" prefix) is not 64 characters
Example:
val contextType = OZBuilders.createCreateContractContext("abc123...")Content copied to clipboard
Creates a CreateContract context rule type from raw WASM hash bytes.
CreateContract rules apply only when deploying contracts with a specific WASM hash.
Return
A ContextRuleType.CreateContract for contract creation authorization
Parameters
wasm Hash
The WASM hash (32 bytes)
Throws
if the byte array is not 32 bytes
Example:
val contextType = OZBuilders.createCreateContractContext(wasmHashBytes)Content copied to clipboard