Skip to main content

BoolSetting

open class BoolSetting : Disposable, AutoCloseable, BoolSettingInterface

A typed view of a 0x2::config::Setting<bool> held in a dynamic field of a Config object — the shape used by the deny list for its per-address and global-pause entries.

A setting carries the value for the epoch it was last written in plus the value that preceded it, so a reader can tell which one applies to the epoch it cares about.

Functions

NameSummary
close@Synchronized
open override fun close()
destroyopen override fun destroy()
newerValueopen override fun newerValue(): Boolean?
The value written in newer_value_epoch.
newerValueEpochopen override fun newerValueEpoch(): ULong?
The epoch newer_value was written in, if the setting holds data.
olderValueopen override fun olderValue(): Boolean?
The value that applied before newer_value_epoch.
toStringopen override fun toString(): String

Companion object functions

NameSummary
tryFromBcsfun tryFromBcs(bytes: ByteArray): BoolSetting
Decode a Setting<bool> from raw BCS bytes.