Interface IProxyApi

All Known Implementing Classes:
ProxyApiProvider

public interface IProxyApi
EtherScan - API Descriptions https://etherscan.io/apis#proxy
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(String address, String data)
    Executes a new message call immediately without creating a transaction on the block chain eth_call
    @NotNull Optional<String>
    code(String address)
    Returns code at a given address eth_getCode
    @NotNull BigInteger
     
    @NotNull BigInteger
    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 BigInteger
    Returns the current price per gas in wei eth_gasPrice
    @NotNull Optional<String>
    storageAt(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(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(String txhash)
    Returns the receipt of a transaction by transaction hash eth_getTransactionReceipt
    int
    Returns the number of transactions sent from an address eth_getTransactionCount
    @NotNull Optional<String>
    txSendRaw(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:
      ApiException - parent exception class
    • block

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

      @NotNull @NotNull Optional<BlockProxy> blockUncle(long blockNo, long index) throws ApiException
      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:
      ApiException - parent exception class
    • tx

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

      @NotNull @NotNull Optional<TxProxy> tx(long blockNo, long index) throws ApiException
      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:
      ApiException - parent exception class
    • txCount

      int txCount(long blockNo) throws ApiException
      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:
      ApiException - parent exception class
    • txSendCount

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

      @NotNull @NotNull Optional<String> txSendRaw(String hexEncodedTx) throws ApiException
      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:
      ApiException - parent exception class
    • txReceipt

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

      @NotNull @NotNull Optional<String> call(String address, String data) throws ApiException
      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:
      ApiException - parent exception class
    • code

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

      @Experimental @NotNull @NotNull Optional<String> storageAt(String address, long position) throws ApiException
      (**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:
      ApiException - parent exception class
    • gasPrice

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

      @NotNull @NotNull BigInteger gasEstimated(String hexData) throws ApiException
      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:
      ApiException - parent exception class
    • gasEstimated

      @NotNull @NotNull BigInteger gasEstimated() throws ApiException
      Throws:
      ApiException