Skip to main content

BoolSetting

type BoolSetting

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.

type BoolSetting struct {
// contains filtered or unexported fields
}

func BoolSettingTryFromBcs

func BoolSettingTryFromBcs(bytes []byte) (*BoolSetting, error)

Decode a `Setting<bool>` from raw BCS bytes.

There is no object-based constructor: a setting is stored as a dynamic field of the config, not as a top-level object with its own type tag.

func LiftFromExternalBoolSetting

func LiftFromExternalBoolSetting(handle uint64) *BoolSetting

func (*BoolSetting) DebugString

func (_self *BoolSetting) DebugString() string

func (*BoolSetting) Destroy

func (object *BoolSetting) Destroy()

func (*BoolSetting) NewerValue

func (_self *BoolSetting) NewerValue() *bool

The value written in `newer_value_epoch`.

func (*BoolSetting) NewerValueEpoch

func (_self *BoolSetting) NewerValueEpoch() *uint64

The epoch `newer_value` was written in, if the setting holds data.

func (*BoolSetting) OlderValue

func (_self *BoolSetting) OlderValue() *bool

The value that applied before `newer_value_epoch`.