Skip to main content

IotaSystemStateV1Interface

type IotaSystemStateV1Interface

A typed view of the `0x3::iota_system_state_inner::IotaSystemStateV1` inner system state, the layout selected by [`IotaSystemState::version`] 1.

Exposes the same parameters as [`IotaSystemStateV2`], except that safe-mode computation is accounted as rewards rather than charges, and the validator set is a [`ValidatorSetV1`].

type IotaSystemStateV1Interface interface {
Epoch() uint64
// Unix timestamp (ms) of the current epoch start.
EpochStartTimestampMs() uint64
// Object ID of the `Bag` holding fields added to this struct after its
// current on-chain layout was set.
ExtraFieldsId() *ObjectId
// Total IOTA supply controlled by the system treasury, in nanos.
IotaTotalSupply() uint64
// The system parameters.
Parameters() *SystemParametersV1
ProtocolVersion() uint64
// The reference gas price for the current epoch, in nanos.
ReferenceGasPrice() uint64
// Whether the system is running in a downgraded safe mode.
SafeMode() bool
// Computation rewards accumulated during safe mode, in nanos.
SafeModeComputationRewards() uint64
// Non-refundable storage fees accumulated during safe mode, in nanos.
SafeModeNonRefundableStorageFee() uint64
// Storage charges accumulated during safe mode, in nanos.
SafeModeStorageCharges() uint64
// Storage rebates accumulated during safe mode, in nanos.
SafeModeStorageRebates() uint64
// The storage fund.
StorageFund() *StorageFundV1
SystemStateVersion() uint64
// Validator report records: each reported validator's address mapped to
// the addresses of the validators reporting it.
ValidatorReportRecords() map[*Address][]*Address
// The validator set.
Validators() *ValidatorSetV1
}