Class ContractID.Builder

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

public static final class ContractID.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<ContractID,ContractID.Builder> implements ContractIDOrBuilder
 *
 An identifier for a smart contract within the network.
 
Protobuf type proto.ContractID
  • Method Details

    • getContractCase

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

      public ContractID.Builder clearContract()
    • getShardNum

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

      public ContractID.Builder setShardNum(long value)
       *
       A whole number shard identifier.
       
      int64 shardNum = 1;
      Parameters:
      value - The shardNum to set.
      Returns:
      This builder for chaining.
    • clearShardNum

      public ContractID.Builder clearShardNum()
       *
       A whole number shard identifier.
       
      int64 shardNum = 1;
      Returns:
      This builder for chaining.
    • getRealmNum

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

      public ContractID.Builder setRealmNum(long value)
       *
       A whole number realm identifier.
       
      int64 realmNum = 2;
      Parameters:
      value - The realmNum to set.
      Returns:
      This builder for chaining.
    • clearRealmNum

      public ContractID.Builder clearRealmNum()
       *
       A whole number realm identifier.
       
      int64 realmNum = 2;
      Returns:
      This builder for chaining.
    • 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.
    • setContractNum

      public ContractID.Builder setContractNum(long value)
       *
       A whole number contract identifier, unique within its realm and shard.
       
      int64 contractNum = 3;
      Parameters:
      value - The contractNum to set.
      Returns:
      This builder for chaining.
    • clearContractNum

      public ContractID.Builder clearContractNum()
       *
       A whole number contract identifier, unique within its realm and shard.
       
      int64 contractNum = 3;
      Returns:
      This builder for chaining.
    • 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.
    • setEvmAddress

      public ContractID.Builder setEvmAddress(com.google.protobuf.ByteString value)
       *
       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;
      Parameters:
      value - The evmAddress to set.
      Returns:
      This builder for chaining.
    • clearEvmAddress

      public ContractID.Builder clearEvmAddress()
       *
       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;
      Returns:
      This builder for chaining.