IotaSystemStateV1
IotaSystemStateV1
class IotaSystemStateV1
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].
debugDescription
var debugDescription: String { get }
A textual representation of this instance, suitable for debugging.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the String(reflecting:)
initializer. This initializer works with any type, and uses the custom
debugDescription property for types that conform to
CustomDebugStringConvertible:
struct Point: CustomDebugStringConvertible {
let x: Int, y: Int
var debugDescription: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(reflecting: p)
print(s)
// Prints "(21, 30)"
The conversion of p to a string in the assignment to s uses the
Point type's debugDescription property.
epoch()
func epoch() -> UInt64
epochStartTimestampMs()
func epochStartTimestampMs() -> UInt64
Unix timestamp (ms) of the current epoch start.
extraFieldsId()
func extraFieldsId() -> ObjectId
Object ID of the Bag holding fields added to this struct after its
current on-chain layout was set.
iotaTotalSupply()
func iotaTotalSupply() -> UInt64
Total IOTA supply controlled by the system treasury, in nanos.
parameters()
func parameters() -> SystemParametersV1
The system parameters.
protocolVersion()
func protocolVersion() -> UInt64
referenceGasPrice()
func referenceGasPrice() -> UInt64
The reference gas price for the current epoch, in nanos.
safeMode()
func safeMode() -> Bool
Whether the system is running in a downgraded safe mode.
safeModeComputationRewards()
func safeModeComputationRewards() -> UInt64
Computation rewards accumulated during safe mode, in nanos.
safeModeNonRefundableStorageFee()
func safeModeNonRefundableStorageFee() -> UInt64
Non-refundable storage fees accumulated during safe mode, in nanos.
safeModeStorageCharges()
func safeModeStorageCharges() -> UInt64
Storage charges accumulated during safe mode, in nanos.
safeModeStorageRebates()
func safeModeStorageRebates() -> UInt64
Storage rebates accumulated during safe mode, in nanos.
storageFund()
func storageFund() -> StorageFundV1
The storage fund.
systemStateVersion()
func systemStateVersion() -> UInt64
validatorReportRecords()
func validatorReportRecords() -> [Address : [Address]]
Validator report records: each reported validator's address mapped to the addresses of the validators reporting it.
validators()
func validators() -> ValidatorSetV1
The validator set.
tryFromBcs(bytes:)
static func tryFromBcs(bytes: Data) throws -> IotaSystemStateV1
Decode an IotaSystemStateV1 from raw BCS bytes.
There is no object-based constructor: the inner state is stored as
a dynamic field of the 0x5 wrapper, not as a top-level object
with its own type tag.