createCreateContractContext

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

wasmHashHex

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...")

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

wasmHash

The WASM hash (32 bytes)

Throws

if the byte array is not 32 bytes

Example:

val contextType = OZBuilders.createCreateContractContext(wasmHashBytes)