Class EthereumFlow

java.lang.Object
com.hedera.hashgraph.sdk.EthereumFlow

@Deprecated public class EthereumFlow extends Object
Deprecated.
Execute an Ethereum transaction on Hedera
  • Field Details

    • MAX_ETHEREUM_DATA_SIZE

      static int MAX_ETHEREUM_DATA_SIZE
      Deprecated.
      128,000 bytes - jumbo transaction limit Indicates when we should splice out the call data from an ethereum transaction data
  • Constructor Details

    • EthereumFlow

      public EthereumFlow()
      Deprecated.
      Constructor
  • Method Details

    • getEthereumData

      @Nullable public EthereumTransactionData getEthereumData()
      Deprecated.
      Gets the data of the Ethereum transaction
      Returns:
      the data of the Ethereum transaction
    • setEthereumData

      public EthereumFlow setEthereumData(byte[] ethereumData)
      Deprecated.
      Sets the raw Ethereum transaction (RLP encoded type 0, 1, and 2). Complete unless the callDataFileId is set.
      Parameters:
      ethereumData - raw ethereum transaction bytes
      Returns:
      this
    • getMaxGasAllowance

      @Nullable public Hbar getMaxGasAllowance()
      Deprecated.
      Gets the maximum amount that the payer of the hedera transaction is willing to pay to complete the transaction.
      Returns:
      the max gas allowance
    • setMaxGasAllowance

      public EthereumFlow setMaxGasAllowance(Hbar maxGasAllowance)
      Deprecated.
      Sets the maximum amount that the payer of the hedera transaction is willing to pay to complete the transaction.
      Ordinarily the account with the ECDSA alias corresponding to the public key that is extracted from the ethereum_data signature is responsible for fees that result from the execution of the transaction. If that amount of authorized fees is not sufficient then the payer of the transaction can be charged, up to but not exceeding this amount. If the ethereum_data transaction authorized an amount that was insufficient then the payer will only be charged the amount needed to make up the difference. If the gas price in the transaction was set to zero then the payer will be assessed the entire fee.
      Parameters:
      maxGasAllowance - the maximum gas allowance
      Returns:
      this
    • execute

      Deprecated.
      Execute the transactions in the flow with the passed in client.
      Parameters:
      client - the client with the transaction to execute
      Returns:
      the response
      Throws:
      PrecheckStatusException - when the precheck fails
      TimeoutException - when the transaction times out
    • execute

      public TransactionResponse execute(Client client, Duration timeoutPerTransaction) throws PrecheckStatusException, TimeoutException
      Deprecated.
      Execute the transactions in the flow with the passed in client.
      Parameters:
      client - the client with the transaction to execute
      timeoutPerTransaction - The timeout after which each transaction's execution attempt will be cancelled.
      Returns:
      the response
      Throws:
      PrecheckStatusException - when the precheck fails
      TimeoutException - when the transaction times out
    • executeAsync

      public CompletableFuture<TransactionResponse> executeAsync(Client client)
      Deprecated.
      Execute the transactions in the flow with the passed in client asynchronously.

      Note: This method requires API level 33 or higher. It will not work on devices running API versions below 31 because it uses features introduced in API level 31 (Android 12).

      *
      Parameters:
      client - the client with the transaction to execute
      Returns:
      the response
    • executeAsync

      public CompletableFuture<TransactionResponse> executeAsync(Client client, Duration timeoutPerTransaction)
      Deprecated.
      Execute the transactions in the flow with the passed in client asynchronously.

      Note: This method requires API level 33 or higher. It will not work on devices running API versions below 31 because it uses features introduced in API level 31 (Android 12).

      *
      Parameters:
      client - the client with the transaction to execute
      timeoutPerTransaction - The timeout after which each transaction's execution attempt will be cancelled.
      Returns:
      the response
    • executeAsync

      public void executeAsync(Client client, BiConsumer<TransactionResponse,Throwable> callback)
      Deprecated.
      Execute the transactions in the flow with the passed in client asynchronously.
      Parameters:
      client - the client with the transaction to execute
      callback - a BiConsumer which handles the result or error.
    • executeAsync

      public void executeAsync(Client client, Duration timeoutPerTransaction, BiConsumer<TransactionResponse,Throwable> callback)
      Deprecated.
      Execute the transactions in the flow with the passed in client asynchronously.
      Parameters:
      client - the client with the transaction to execute
      timeoutPerTransaction - The timeout after which each transaction's execution attempt will be cancelled.
      callback - a BiConsumer which handles the result or error.
    • executeAsync

      public void executeAsync(Client client, Consumer<TransactionResponse> onSuccess, Consumer<Throwable> onFailure)
      Deprecated.
      Execute the transactions in the flow with the passed in client asynchronously.
      Parameters:
      client - the client with the transaction to execute
      onSuccess - a Consumer which consumes the result on success.
      onFailure - a Consumer which consumes the error on failure.
    • executeAsync

      public void executeAsync(Client client, Duration timeoutPerTransaction, Consumer<TransactionResponse> onSuccess, Consumer<Throwable> onFailure)
      Deprecated.
      Execute the transactions in the flow with the passed in client asynchronously.
      Parameters:
      client - the client with the transaction to execute
      timeoutPerTransaction - The timeout after which each transaction's execution attempt will be cancelled.
      onSuccess - a Consumer which consumes the result on success.
      onFailure - a Consumer which consumes the error on failure.