java.lang.Object
com.hedera.hashgraph.sdk.Key
com.hedera.hashgraph.sdk.ContractId
com.hedera.hashgraph.sdk.DelegateContractId
- All Implemented Interfaces:
Comparable<ContractId>
The ID for a smart contract instance on Hedera.
-
Field Summary
Fields inherited from class com.hedera.hashgraph.sdk.ContractId
EVM_ADDRESS_REGEX, evmAddress, num, realm, shardFields inherited from class com.hedera.hashgraph.sdk.Key
ECDSA_SECP256K1_CURVE, ECDSA_SECP256K1_DOMAIN, ID_EC_PUBLIC_KEY, ID_ECDSA_SECP256K1, ID_ED25519 -
Constructor Summary
ConstructorsConstructorDescriptionDelegateContractId(long num) Deprecated.DelegateContractId(long shard, long realm, byte[] evmAddress) DelegateContractId(long shard, long realm, long num) Constructor.DelegateContractId(long shard, long realm, long num, String checksum) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic DelegateContractIdfromBytes(byte[] bytes) Create a delegate contract id from a byte array.static DelegateContractIdfromEvmAddress(long shard, long realm, String evmAddress) Parse DelegateContract id from an ethereum address.(package private) static DelegateContractIdfromProtobuf(ContractID contractId) Create a delegate contract id from a string.static DelegateContractIdfromSolidityAddress(String address) Deprecated.static DelegateContractIdfromString(String id) Create a delegate contract id from a string.(package private) KeySerialize this key as a protobuf objectMethods inherited from class com.hedera.hashgraph.sdk.ContractId
compareTo, getChecksum, hashCode, populateContractNum, populateContractNumAsync, toBytes, toEvmAddress, toProtobuf, toSolidityAddress, toString, toStringWithChecksum, validate, validateChecksumMethods inherited from class com.hedera.hashgraph.sdk.Key
fromProtobufKey
-
Constructor Details
-
DelegateContractId
Deprecated.Constructor.- Parameters:
num- the num portion of the contract id Constructor that uses shard, realm and num should be used instead as shard and realm should not assume 0 value
-
DelegateContractId
public DelegateContractId(long shard, long realm, long num) Constructor.- Parameters:
shard- the shard portion of the contract idrealm- the realm portion of the contract idnum- the num portion of the contract id
-
DelegateContractId
DelegateContractId(long shard, long realm, long num, @Nullable String checksum) Constructor.- Parameters:
shard- the shard portion of the contract idrealm- the realm portion of the contract idnum- the num portion of the contract idchecksum- the optional checksum
-
DelegateContractId
public DelegateContractId(long shard, long realm, byte[] evmAddress)
-
-
Method Details
-
fromString
Create a delegate contract id from a string.- Parameters:
id- the contract id- Returns:
- the delegate contract id object
-
fromSolidityAddress
Deprecated.Create a delegate contract id from a string.- Parameters:
address- the contract id solidity address- Returns:
- the delegate contract id object
-
fromEvmAddress
public static DelegateContractId fromEvmAddress(@Nonnegative long shard, @Nonnegative long realm, String evmAddress) Parse DelegateContract id from an ethereum address.- Parameters:
shard- the desired shardrealm- the desired realmevmAddress- the evm address- Returns:
- the contract id object
-
fromProtobuf
Create a delegate contract id from a string.- Parameters:
contractId- the contract id protobuf- Returns:
- the delegate contract id object
-
fromBytes
public static DelegateContractId fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException Create a delegate contract id from a byte array.- Parameters:
bytes- the byte array- Returns:
- the delegate contract id object
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
toProtobufKey
Key toProtobufKey()Description copied from class:KeySerialize this key as a protobuf object- Overrides:
toProtobufKeyin classContractId
-
equals
- Overrides:
equalsin classContractId
-