Class ContractID

java.lang.Object
com.google.protobuf.AbstractMessageLite<ContractID,ContractID.Builder>
com.google.protobuf.GeneratedMessageLite<ContractID,ContractID.Builder>
com.hedera.hashgraph.sdk.proto.ContractID
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, ContractIDOrBuilder

@Generated public final class ContractID extends com.google.protobuf.GeneratedMessageLite<ContractID,ContractID.Builder> implements ContractIDOrBuilder
 *
 An identifier for a smart contract within the network.
 
Protobuf type proto.ContractID
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * An identifier for a smart contract within the network.
    static enum 
     

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
     
    long
    * A whole number contract identifier, unique within its realm and shard.
    static ContractID
     
    com.google.protobuf.ByteString
    * A 20-byte EVM address of the contract to call.
    long
    * A whole number realm identifier.
    long
    * A whole number shard identifier.
    boolean
    * A whole number contract identifier, unique within its realm and shard.
    boolean
    * A 20-byte EVM address of the contract to call.
     
     
    static ContractID
     
    static ContractID
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ContractID
    parseFrom(byte[] data)
     
    static ContractID
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ContractID
    parseFrom(com.google.protobuf.ByteString data)
     
    static ContractID
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ContractID
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static ContractID
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ContractID
     
    static ContractID
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ContractID
     
    static ContractID
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<ContractID>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

    • SHARDNUM_FIELD_NUMBER

      public static final int SHARDNUM_FIELD_NUMBER
      See Also:
    • REALMNUM_FIELD_NUMBER

      public static final int REALMNUM_FIELD_NUMBER
      See Also:
    • CONTRACTNUM_FIELD_NUMBER

      public static final int CONTRACTNUM_FIELD_NUMBER
      See Also:
    • EVM_ADDRESS_FIELD_NUMBER

      public static final int EVM_ADDRESS_FIELD_NUMBER
      See Also:
  • Method Details

    • getContractCase

      public ContractID.ContractCase getContractCase()
      Specified by:
      getContractCase in interface ContractIDOrBuilder
    • getShardNum

      public long getShardNum()
       *
       A whole number shard identifier.
       
      int64 shardNum = 1;
      Specified by:
      getShardNum in interface ContractIDOrBuilder
      Returns:
      The shardNum.
    • getRealmNum

      public long getRealmNum()
       *
       A whole number realm identifier.
       
      int64 realmNum = 2;
      Specified by:
      getRealmNum in interface ContractIDOrBuilder
      Returns:
      The realmNum.
    • hasContractNum

      public boolean hasContractNum()
       *
       A whole number contract identifier, unique within its realm and shard.
       
      int64 contractNum = 3;
      Specified by:
      hasContractNum in interface ContractIDOrBuilder
      Returns:
      Whether the contractNum field is set.
    • getContractNum

      public long getContractNum()
       *
       A whole number contract identifier, unique within its realm and shard.
       
      int64 contractNum = 3;
      Specified by:
      getContractNum in interface ContractIDOrBuilder
      Returns:
      The contractNum.
    • hasEvmAddress

      public boolean hasEvmAddress()
       *
       A 20-byte EVM address of the contract to call.
       <p>
       A contract created via a HAPI `ContractCreate` call SHALL have
       an EVM address determined by its `shard.realm.num` identifier.<br/>
       This address is as follows
       <ol>
       <li>4 byte big-endian shard number</li>
       <li>8 byte big-endian realm number</li>
       <li>8 byte big-endian contract number</li>
       </ol>
       This address is not stored in state, but is computed when needed.
       <p>
       Contracts created by any other means, including a HAPI
       `EthereumTransaction` whose `to` address is the zero address,
       SHALL have the EVM address prescribed by the `CREATE` or
       `CREATE2` opcode, as applicable.
       
      bytes evm_address = 4;
      Specified by:
      hasEvmAddress in interface ContractIDOrBuilder
      Returns:
      Whether the evmAddress field is set.
    • getEvmAddress

      public com.google.protobuf.ByteString getEvmAddress()
       *
       A 20-byte EVM address of the contract to call.
       <p>
       A contract created via a HAPI `ContractCreate` call SHALL have
       an EVM address determined by its `shard.realm.num` identifier.<br/>
       This address is as follows
       <ol>
       <li>4 byte big-endian shard number</li>
       <li>8 byte big-endian realm number</li>
       <li>8 byte big-endian contract number</li>
       </ol>
       This address is not stored in state, but is computed when needed.
       <p>
       Contracts created by any other means, including a HAPI
       `EthereumTransaction` whose `to` address is the zero address,
       SHALL have the EVM address prescribed by the `CREATE` or
       `CREATE2` opcode, as applicable.
       
      bytes evm_address = 4;
      Specified by:
      getEvmAddress in interface ContractIDOrBuilder
      Returns:
      The evmAddress.
    • parseFrom

      public static ContractID parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractID parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractID parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractID parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractID parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractID parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ContractID parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ContractID parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ContractID parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ContractID parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ContractID parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ContractID parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static ContractID.Builder newBuilder()
    • newBuilder

      public static ContractID.Builder newBuilder(ContractID prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<ContractID,ContractID.Builder>
    • getDefaultInstance

      public static ContractID getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ContractID> parser()