Interface IProxyApi

  • All Known Implementing Classes:
    ProxyApiProvider

    public interface IProxyApi
    EtherScan - API Descriptions https://etherscan.io/apis#proxy
    Since:
    30.10.2018
    Author:
    GoodforGod
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<BlockProxy> block​(long blockNo)
      Returns information about a block by block number eth_getBlockByNumber
      long blockNoLast()
      Returns the number of most recent block eth_blockNumber
      java.util.Optional<BlockProxy> blockUncle​(long blockNo, long index)
      Returns information about a uncle by block number eth_getUncleByBlockNumberAndIndex
      java.util.Optional<java.lang.String> call​(java.lang.String address, java.lang.String data)
      Executes a new message call immediately without creating a transaction on the block chain eth_call
      java.util.Optional<java.lang.String> code​(java.lang.String address)
      Returns code at a given address eth_getCode
      java.math.BigInteger gasEstimated()
      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
      java.math.BigInteger gasEstimated​(java.lang.String hexData)  
      java.math.BigInteger gasPrice()
      Returns the current price per gas in wei eth_gasPrice
      java.util.Optional<java.lang.String> storageAt​(java.lang.String address, long position)
      (**experimental) Returns the value from a storage position at a given address eth_getStorageAt
      java.util.Optional<TxProxy> tx​(long blockNo, long index)
      Returns information about a transaction by block number and transaction index position eth_getTransactionByBlockNumberAndIndex
      java.util.Optional<TxProxy> tx​(java.lang.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
      java.util.Optional<ReceiptProxy> txReceipt​(java.lang.String txhash)
      Returns the receipt of a transaction by transaction hash eth_getTransactionReceipt
      int txSendCount​(java.lang.String address)
      Returns the number of transactions sent from an address eth_getTransactionCount
      java.util.Optional<java.lang.String> txSendRaw​(java.lang.String hexEncodedTx)
      Creates new message call transaction or a contract creation for signed transactions eth_sendRawTransaction
    • Method Detail

      • blockNoLast

        long blockNoLast()
        Returns the number of most recent block eth_blockNumber
        Returns:
        last block number
      • block

        @NotNull
        java.util.Optional<BlockProxy> block​(long blockNo)
                                      throws ApiException
        Returns information about a block by block number eth_getBlockByNumber
        Parameters:
        blockNo - block number
        Returns:
        block info
        Throws:
        ApiException
      • blockUncle

        @NotNull
        java.util.Optional<BlockProxy> blockUncle​(long blockNo,
                                                  long index)
                                           throws ApiException
        Returns information about a uncle by block number eth_getUncleByBlockNumberAndIndex
        Parameters:
        blockNo - block number
        index - uncle block index
        Returns:
        block info
        Throws:
        ApiException
      • tx

        @NotNull
        java.util.Optional<TxProxy> tx​(java.lang.String txhash)
                                throws ApiException
        Returns the information about a transaction requested by transaction hash eth_getTransactionByHash
        Parameters:
        txhash - tx hash
        Returns:
        tx info
        Throws:
        ApiException
      • tx

        @NotNull
        java.util.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
        index - tx index in block
        Returns:
        tx info
        Throws:
        ApiException
      • 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
        Returns:
        tx count in block
        Throws:
        ApiException
      • txSendCount

        int txSendCount​(java.lang.String address)
                 throws ApiException
        Returns the number of transactions sent from an address eth_getTransactionCount
        Parameters:
        address - to look for
        Returns:
        tx send count
        Throws:
        ApiException
      • txSendRaw

        @NotNull
        java.util.Optional<java.lang.String> txSendRaw​(java.lang.String hexEncodedTx)
                                                throws ApiException
        Creates new message call transaction or a contract creation for signed transactions eth_sendRawTransaction
        Parameters:
        hexEncodedTx - tx as hex
        Returns:
        result (check eth grpc info)
        Throws:
        ApiException
      • txReceipt

        @NotNull
        java.util.Optional<ReceiptProxy> txReceipt​(java.lang.String txhash)
                                            throws ApiException
        Returns the receipt of a transaction by transaction hash eth_getTransactionReceipt
        Parameters:
        txhash - tx hash
        Returns:
        receipt
        Throws:
        ApiException
      • call

        @NotNull
        java.util.Optional<java.lang.String> call​(java.lang.String address,
                                                  java.lang.String data)
                                           throws ApiException
        Executes a new message call immediately without creating a transaction on the block chain eth_call
        Parameters:
        address - to look for
        data - in tx for call
        Returns:
        result (check eth grpc info)
        Throws:
        ApiException
      • code

        @NotNull
        java.util.Optional<java.lang.String> code​(java.lang.String address)
                                           throws ApiException
        Returns code at a given address eth_getCode
        Parameters:
        address - to look for
        Returns:
        result (check eth grpc info)
        Throws:
        ApiException
      • storageAt

        @NotNull
        java.util.Optional<java.lang.String> storageAt​(java.lang.String address,
                                                       long position)
                                                throws ApiException
        (**experimental) Returns the value from a storage position at a given address eth_getStorageAt
        Parameters:
        address - to look for
        position - storage position
        Returns:
        result (check eth grpc info)
        Throws:
        ApiException
      • gasPrice

        @NotNull
        java.math.BigInteger gasPrice()
                               throws ApiException
        Returns the current price per gas in wei eth_gasPrice
        Returns:
        price
        Throws:
        ApiException
      • gasEstimated

        @NotNull
        java.math.BigInteger gasEstimated()
                                   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
        Returns:
        gas estimate
        Throws:
        ApiException
      • gasEstimated

        @NotNull
        java.math.BigInteger gasEstimated​(java.lang.String hexData)
                                   throws ApiException
        Throws:
        ApiException