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-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* A whole number contract identifier, unique within its realm and shard.* A 20-byte EVM address of the contract to call.* A whole number realm identifier.* A whole number shard identifier.long* A whole number contract identifier, unique within its realm and shard.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.setContractNum(long value) * A whole number contract identifier, unique within its realm and shard.setEvmAddress(com.google.protobuf.ByteString value) * A 20-byte EVM address of the contract to call.setRealmNum(long value) * A whole number realm identifier.setShardNum(long value) * A whole number shard identifier.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getContractCase
- Specified by:
getContractCasein interfaceContractIDOrBuilder
-
clearContract
-
getShardNum
public long getShardNum()* A whole number shard identifier.
int64 shardNum = 1;- Specified by:
getShardNumin interfaceContractIDOrBuilder- Returns:
- The shardNum.
-
setShardNum
* A whole number shard identifier.
int64 shardNum = 1;- Parameters:
value- The shardNum to set.- Returns:
- This builder for chaining.
-
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:
getRealmNumin interfaceContractIDOrBuilder- Returns:
- The realmNum.
-
setRealmNum
* A whole number realm identifier.
int64 realmNum = 2;- Parameters:
value- The realmNum to set.- Returns:
- This builder for chaining.
-
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:
hasContractNumin interfaceContractIDOrBuilder- 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:
getContractNumin interfaceContractIDOrBuilder- Returns:
- The contractNum.
-
setContractNum
* 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
* 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:
hasEvmAddressin interfaceContractIDOrBuilder- 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:
getEvmAddressin interfaceContractIDOrBuilder- Returns:
- The evmAddress.
-
setEvmAddress
* 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
* 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.
-