Interface BlockchainTransactionService


public interface BlockchainTransactionService
  • Method Details

    • sendPendingTransactionsToBlockchain

      List<TransactionDetail> sendPendingTransactionsToBlockchain()
      Sends raw transactions to blockchain
      Returns:
      List of TransactionDetail asynchronously after sent to blockchain
    • refreshTransactionFromBlockchain

      TransactionDetail refreshTransactionFromBlockchain(String transactionHash)
      This will refresh transaction from blockchain. If the transaction detail exists in database, it will update its status, else it will create a new one with data found on Blockchain mined Transaction
      Parameters:
      transactionHash - hash of transaction to update
      Returns:
      refreshed TransactionDetail from blockchain
    • getGasPrice

      double getGasPrice() throws IOException
      Get gas price from blockchain
      Returns:
      last gas price retrieved from blockchain
      Throws:
      IOException - when an error occurs while requesting gas price from blockchain
    • addTransactionToRefreshFromBlockchain

      void addTransactionToRefreshFromBlockchain(TransactionDetail transactionDetail)
      Add TransactionDetail to refresh processing Queue
      Parameters:
      transactionDetail - TransactionDetail to refresh from blockchain
    • hasManagedWalletInTransaction

      boolean hasManagedWalletInTransaction(ContractTransactionEvent contractEvent)
      Checks whether the Contract Transaction Topics contains a managed wallet
      Parameters:
      contractEvent - Contract Event Log
      Returns:
      true if a wallet is found in topics list
    • startWatchingBlockchain

      Future startWatchingBlockchain()
      Renew subscription to listen to new transactions from Blockchain
      Returns:
      Future of async watching operation
    • stopWatchingBlockchain

      void stopWatchingBlockchain()
      Stop subscription to listen on Blockchain
    • getLastWatchedBlockNumber

      long getLastWatchedBlockNumber()
      Returns:
      last watched block number
    • saveLastWatchedBlockNumber

      void saveLastWatchedBlockNumber(long lastWatchedBlockNumber)
      Saves last watched block number
      Parameters:
      lastWatchedBlockNumber -