java.lang.Object
com.hedera.hashgraph.sdk.ContractNonceInfo
Info about a contract account's nonce value.
A nonce of a contract is only incremented when that contract creates another contract.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ContractIdId of the contractfinal LongThe current value of the contract account's nonce property -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ContractNonceInfofromBytes(byte[] bytes) Extract the contractNonce from a byte array.(package private) static ContractNonceInfofromProtobuf(ContractNonceInfo contractNonceInfo) Extract the contractNonce from the protobuf.inthashCode()byte[]toBytes()Create a byte array representation.(package private) ContractNonceInfoBuild the protobuf.toString()
-
Field Details
-
contractId
Id of the contract -
nonce
The current value of the contract account's nonce property
-
-
Constructor Details
-
ContractNonceInfo
-
-
Method Details
-
fromProtobuf
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() -
equals
-
toString
-
toBytes
public byte[] toBytes()Create a byte array representation.- Returns:
- the byte array representation
-