Skip to main content

ValidatorV1

ValidatorV1

class ValidatorV1

A typed view of a 0x3::validator::ValidatorV1 from the active validator set.

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.

commissionRate()

func commissionRate() -> UInt64

Commission rate of the validator, in basis points.

extraFieldsId()

func extraFieldsId() -> ObjectId

Object ID of the Bag holding fields added to this struct after its current on-chain layout was set.

gasPrice()

func gasPrice() -> UInt64

Gas price quote, updated only at end of epoch.

metadata()

func metadata() -> ValidatorMetadataV1

The validator's metadata (addresses, keys, and descriptive info).

nextEpochCommissionRate()

func nextEpochCommissionRate() -> UInt64

The commission rate of the validator starting next epoch, in basis points.

nextEpochGasPrice()

func nextEpochGasPrice() -> UInt64

This validator's gas price quote for the next epoch.

nextEpochStake()

func nextEpochStake() -> UInt64

Total amount of stake that would be active in the next epoch, in nanos.

operationCapId()

func operationCapId() -> ObjectId

Object ID of this validator's current valid UnverifiedValidatorOperationCap.

stakingPool()

func stakingPool() -> StakingPoolV1

Staking pool for this validator.

votingPower()

func votingPower() -> UInt64

The voting power of this validator, which may differ from its stake amount.