Class UpgradeState

UpgradeState tracks the protocol upgrade state machine. It is, strictly speaking, computable from the history of all UpgradeVotes but we keep it in the block for explicitness and convenience (instead of materializing it separately, like balances).

Implements

Constructors

  • Parameters

    • params: {
          currentProtocol: string;
          nextProtocol: string;
          nextProtocolApprovals: bigint;
          nextProtocolSwitchOn: bigint;
          nextProtocolVoteBefore: bigint;
      }
      • currentProtocol: string
      • nextProtocol: string
      • nextProtocolApprovals: bigint
      • nextProtocolSwitchOn: bigint
      • nextProtocolVoteBefore: bigint

    Returns UpgradeState

Properties

currentProtocol: string
nextProtocol: string
nextProtocolApprovals: bigint
nextProtocolSwitchOn: bigint

NextProtocolSwitchOn specify the round number at which the next protocol would be adopted. If there is no upgrade taking place, nor a wait for the next protocol, this would be zero.

nextProtocolVoteBefore: bigint

NextProtocolVoteBefore specify the last voting round for the next protocol proposal. If there is no voting for an upgrade taking place, this would be zero.

encodingSchema: NamedMapSchema = ...

Methods

  • Extract the encoding data for this object. This data, after being prepared by the encoding Schema, can be encoded to msgpack or JSON.

    Returns Map<string, unknown>

Generated using TypeDoc