Record Class EpochRewards

java.lang.Object
java.lang.Record
software.sava.core.accounts.sysvar.EpochRewards
All Implemented Interfaces:
Borsh, Serializable

public record EpochRewards(PublicKey address, long distributionStartingBlockHeight, long numPartitions, byte[] parentBlockHash, BigInteger totalPoints, long totalRewards, long distributedRewards, boolean active) extends Record implements Borsh
  • Field Details

  • Constructor Details

    • EpochRewards

      public EpochRewards(PublicKey address, long distributionStartingBlockHeight, long numPartitions, byte[] parentBlockHash, BigInteger totalPoints, long totalRewards, long distributedRewards, boolean active)
      Creates an instance of a EpochRewards record class.
      Parameters:
      address - the value for the address record component
      distributionStartingBlockHeight - the value for the distributionStartingBlockHeight record component
      numPartitions - the value for the numPartitions record component
      parentBlockHash - the value for the parentBlockHash record component
      totalPoints - the value for the totalPoints record component
      totalRewards - the value for the totalRewards record component
      distributedRewards - the value for the distributedRewards record component
      active - the value for the active record component
  • Method Details

    • read

      public static EpochRewards read(byte[] data)
    • read

      public static EpochRewards read(byte[] data, int offset)
    • read

      public static EpochRewards read(PublicKey address, byte[] data)
    • read

      public static EpochRewards read(PublicKey address, byte[] data, int offset)
    • write

      public int write(byte[] data, int offset)
      Specified by:
      write in interface Serializable
    • l

      public int l()
      Specified by:
      l in interface Serializable
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • address

      public PublicKey address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • distributionStartingBlockHeight

      public long distributionStartingBlockHeight()
      Returns the value of the distributionStartingBlockHeight record component.
      Returns:
      the value of the distributionStartingBlockHeight record component
    • numPartitions

      public long numPartitions()
      Returns the value of the numPartitions record component.
      Returns:
      the value of the numPartitions record component
    • parentBlockHash

      public byte[] parentBlockHash()
      Returns the value of the parentBlockHash record component.
      Returns:
      the value of the parentBlockHash record component
    • totalPoints

      public BigInteger totalPoints()
      Returns the value of the totalPoints record component.
      Returns:
      the value of the totalPoints record component
    • totalRewards

      public long totalRewards()
      Returns the value of the totalRewards record component.
      Returns:
      the value of the totalRewards record component
    • distributedRewards

      public long distributedRewards()
      Returns the value of the distributedRewards record component.
      Returns:
      the value of the distributedRewards record component
    • active

      public boolean active()
      Returns the value of the active record component.
      Returns:
      the value of the active record component