Class ContractNonceInfo

java.lang.Object
com.hedera.hashgraph.sdk.ContractNonceInfo

public final class ContractNonceInfo extends Object
Info about a contract account's nonce value. A nonce of a contract is only incremented when that contract creates another contract.
  • Field Details

    • contractId

      public final ContractId contractId
      Id of the contract
    • nonce

      public final Long nonce
      The current value of the contract account's nonce property
  • Constructor Details

    • ContractNonceInfo

      public ContractNonceInfo(ContractId contractId, Long nonce)
  • Method Details

    • fromProtobuf

      static ContractNonceInfo fromProtobuf(ContractNonceInfo contractNonceInfo)
      Extract the contractNonce from the protobuf.
      Parameters:
      contractNonceInfo - the protobuf
      Returns:
      the contract object
    • fromBytes

      public static ContractNonceInfo fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException
      Extract the contractNonce from a byte array.
      Parameters:
      bytes - the byte array
      Returns:
      the extracted contract
      Throws:
      com.google.protobuf.InvalidProtocolBufferException - when there is an issue with the protobuf
    • toProtobuf

      ContractNonceInfo toProtobuf()
      Build the protobuf.
      Returns:
      the protobuf representation
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBytes

      public byte[] toBytes()
      Create a byte array representation.
      Returns:
      the byte array representation