Interface ProxyAPI

All Known Implementing Classes:
ProxyAPIProvider

public interface ProxyAPI
EtherScan - API Descriptions ...
Since:
30.10.2018
  • Method Summary

    Modifier and Type
    Method
    Description
    block(long blockNo)
    Returns information about a block by block number eth_getBlockByNumber
    long
    Returns the number of most recent block eth_blockNumber
    blockUncle(long blockNo, long index)
    Returns information about a uncle by block number eth_getUncleByBlockNumberAndIndex
    @NotNull Optional<String>
    call(@NotNull String address, @NotNull String data)
    Executes a new message call immediately without creating a transaction on the block chain eth_call
    @NotNull Optional<String>
    code(@NotNull String address)
    Returns code at a given address eth_getCode
    @NotNull Wei
     
    @NotNull Wei
    gasEstimated(@NotNull String hexData)
    Makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas eth_estimateGas
    @NotNull Wei
    Returns the current price per gas in wei eth_gasPrice
    @NotNull Optional<String>
    storageAt(@NotNull String address, long position)
    (**experimental) Returns the value from a storage position at a given address eth_getStorageAt
    @NotNull Optional<TxProxy>
    tx(long blockNo, long index)
    Returns information about a transaction by block number and transaction index position eth_getTransactionByBlockNumberAndIndex
    @NotNull Optional<TxProxy>
    tx(@NotNull String txhash)
    Returns the information about a transaction requested by transaction hash eth_getTransactionByHash
    int
    txCount(long blockNo)
    Returns the number of transactions in a block from a block matching the given block number eth_getBlockTransactionCountByNumber
    txReceipt(@NotNull String txhash)
    Returns the receipt of a transaction by transaction hash eth_getTransactionReceipt
    int
    txSendCount(@NotNull String address)
    Returns the number of transactions sent from an address eth_getTransactionCount
    @NotNull Optional<String>
    txSendRaw(@NotNull String hexEncodedTx)
    Creates new message call transaction or a contract creation for signed transactions eth_sendRawTransaction
  • Method Details

    • blockNoLast

      long blockNoLast()
      Returns the number of most recent block eth_blockNumber
      Returns:
      last block number
      Throws:
      EtherScanException - parent exception class
    • block

      @NotNull @NotNull Optional<BlockProxy> block(long blockNo) throws EtherScanException
      Returns information about a block by block number eth_getBlockByNumber
      Parameters:
      blockNo - block number from 0 to last
      Returns:
      optional block result
      Throws:
      EtherScanException - parent exception class
    • blockUncle

      @NotNull @NotNull Optional<BlockProxy> blockUncle(long blockNo, long index) throws EtherScanException
      Returns information about a uncle by block number eth_getUncleByBlockNumberAndIndex
      Parameters:
      blockNo - block number from 0 to last
      index - uncle block index
      Returns:
      optional block result
      Throws:
      EtherScanException - parent exception class
    • tx

      @NotNull @NotNull Optional<TxProxy> tx(@NotNull @NotNull String txhash) throws EtherScanException
      Returns the information about a transaction requested by transaction hash eth_getTransactionByHash
      Parameters:
      txhash - transaction hash
      Returns:
      optional tx result
      Throws:
      EtherScanException - parent exception class
    • tx

      @NotNull @NotNull Optional<TxProxy> tx(long blockNo, long index) throws EtherScanException
      Returns information about a transaction by block number and transaction index position eth_getTransactionByBlockNumberAndIndex
      Parameters:
      blockNo - block number from 0 to last
      index - tx index in block
      Returns:
      optional tx result
      Throws:
      EtherScanException - parent exception class
    • txCount

      int txCount(long blockNo) throws EtherScanException
      Returns the number of transactions in a block from a block matching the given block number eth_getBlockTransactionCountByNumber
      Parameters:
      blockNo - block number from 0 to last
      Returns:
      transaction amount in block
      Throws:
      EtherScanException - parent exception class
    • txSendCount

      int txSendCount(@NotNull @NotNull String address) throws EtherScanException
      Returns the number of transactions sent from an address eth_getTransactionCount
      Parameters:
      address - eth address
      Returns:
      transactions send amount from address
      Throws:
      EtherScanException - parent exception class
    • txSendRaw

      @NotNull @NotNull Optional<String> txSendRaw(@NotNull @NotNull String hexEncodedTx) throws EtherScanException
      Creates new message call transaction or a contract creation for signed transactions eth_sendRawTransaction
      Parameters:
      hexEncodedTx - encoded hex data to send
      Returns:
      optional string response
      Throws:
      EtherScanException - parent exception class
    • txReceipt

      @NotNull @NotNull Optional<ReceiptProxy> txReceipt(@NotNull @NotNull String txhash) throws EtherScanException
      Returns the receipt of a transaction by transaction hash eth_getTransactionReceipt
      Parameters:
      txhash - transaction hash
      Returns:
      optional tx receipt
      Throws:
      EtherScanException - parent exception class
    • call

      @NotNull @NotNull Optional<String> call(@NotNull @NotNull String address, @NotNull @NotNull String data) throws EtherScanException
      Executes a new message call immediately without creating a transaction on the block chain eth_call
      Parameters:
      address - to call
      data - data to call address
      Returns:
      optional the return value of executed contract.
      Throws:
      EtherScanException - parent exception class
    • code

      @NotNull @NotNull Optional<String> code(@NotNull @NotNull String address) throws EtherScanException
      Returns code at a given address eth_getCode
      Parameters:
      address - get code from
      Returns:
      optional the code from the given address
      Throws:
      EtherScanException - parent exception class
    • storageAt

      @Experimental @NotNull @NotNull Optional<String> storageAt(@NotNull @NotNull String address, long position) throws EtherScanException
      (**experimental) Returns the value from a storage position at a given address eth_getStorageAt
      Parameters:
      address - to get storage
      position - storage position
      Returns:
      optional the value at this storage position
      Throws:
      EtherScanException - parent exception class
    • gasPrice

      @NotNull @NotNull Wei gasPrice() throws EtherScanException
      Returns the current price per gas in wei eth_gasPrice
      Returns:
      estimated gas price
      Throws:
      EtherScanException - parent exception class
    • gasEstimated

      @NotNull @NotNull Wei gasEstimated(@NotNull @NotNull String hexData) throws EtherScanException
      Makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas eth_estimateGas
      Parameters:
      hexData - data to calc gas usage for
      Returns:
      estimated gas usage
      Throws:
      EtherScanException - parent exception class
    • gasEstimated

      @NotNull @NotNull Wei gasEstimated() throws EtherScanException
      Throws:
      EtherScanException