Class DelegateContractId

All Implemented Interfaces:
Comparable<ContractId>

public final class DelegateContractId extends ContractId
The ID for a smart contract instance on Hedera.
  • Constructor Details

    • DelegateContractId

      @Deprecated public DelegateContractId(long num)
      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 id
      realm - the realm portion of the contract id
      num - 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 id
      realm - the realm portion of the contract id
      num - the num portion of the contract id
      checksum - the optional checksum
    • DelegateContractId

      public DelegateContractId(long shard, long realm, byte[] evmAddress)
  • Method Details

    • fromString

      public static DelegateContractId fromString(String id)
      Create a delegate contract id from a string.
      Parameters:
      id - the contract id
      Returns:
      the delegate contract id object
    • fromSolidityAddress

      @Deprecated public static DelegateContractId fromSolidityAddress(String address)
      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 shard
      realm - the desired realm
      evmAddress - the evm address
      Returns:
      the contract id object
    • fromProtobuf

      static DelegateContractId fromProtobuf(ContractID contractId)
      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: Key
      Serialize this key as a protobuf object
      Overrides:
      toProtobufKey in class ContractId
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class ContractId