Package io.api.etherscan.core
Interface IProxyApi
-
- All Known Implementing Classes:
ProxyApiProvider
public interface IProxyApiEtherScan - API Descriptions https://etherscan.io/apis#proxy- Since:
- 30.10.2018
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull java.util.Optional<BlockProxy>block(long blockNo)Returns information about a block by block number eth_getBlockByNumberlongblockNoLast()Returns the number of most recent block eth_blockNumber@NotNull java.util.Optional<BlockProxy>blockUncle(long blockNo, long index)Returns information about a uncle by block number eth_getUncleByBlockNumberAndIndex@NotNull 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@NotNull java.util.Optional<java.lang.String>code(java.lang.String address)Returns code at a given address eth_getCode@NotNull java.math.BigIntegergasEstimated()@NotNull java.math.BigIntegergasEstimated(java.lang.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 java.math.BigIntegergasPrice()Returns the current price per gas in wei eth_gasPrice@NotNull 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@NotNull java.util.Optional<TxProxy>tx(long blockNo, long index)Returns information about a transaction by block number and transaction index position eth_getTransactionByBlockNumberAndIndex@NotNull java.util.Optional<TxProxy>tx(java.lang.String txhash)Returns the information about a transaction requested by transaction hash eth_getTransactionByHashinttxCount(long blockNo)Returns the number of transactions in a block from a block matching the given block number eth_getBlockTransactionCountByNumber@NotNull java.util.Optional<ReceiptProxy>txReceipt(java.lang.String txhash)Returns the receipt of a transaction by transaction hash eth_getTransactionReceiptinttxSendCount(java.lang.String address)Returns the number of transactions sent from an address eth_getTransactionCount@NotNull 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
- Throws:
ApiException- parent exception class
-
block
@NotNull @NotNull java.util.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 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 from 0 to lastindex- uncle block index- Returns:
- optional block result
- Throws:
ApiException- parent exception class
-
tx
@NotNull @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- transaction hash- Returns:
- optional tx result
- Throws:
ApiException- parent exception class
-
tx
@NotNull @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 from 0 to lastindex- tx index in block- Returns:
- optional tx result
- Throws:
ApiException- parent exception class
-
txCount
int txCount(long blockNo) throws ApiExceptionReturns 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(java.lang.String address) throws ApiExceptionReturns 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 java.util.Optional<java.lang.String> txSendRaw(java.lang.String hexEncodedTx) throws ApiExceptionCreates 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 java.util.Optional<ReceiptProxy> txReceipt(java.lang.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 java.util.Optional<java.lang.String> call(java.lang.String address, java.lang.String data) throws ApiExceptionExecutes a new message call immediately without creating a transaction on the block chain eth_call- Parameters:
address- to calldata- data to call address- Returns:
- optional the return value of executed contract.
- Throws:
ApiException- parent exception class
-
code
@NotNull @NotNull java.util.Optional<java.lang.String> code(java.lang.String address) throws ApiExceptionReturns 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
@NotNull @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 get storageposition- storage position- Returns:
- optional the value at this storage position
- Throws:
ApiException- parent exception class
-
gasPrice
@NotNull @NotNull java.math.BigInteger gasPrice() throws ApiExceptionReturns the current price per gas in wei eth_gasPrice- Returns:
- estimated gas price
- Throws:
ApiException- parent exception class
-
gasEstimated
@NotNull @NotNull java.math.BigInteger gasEstimated(java.lang.String hexData) throws ApiExceptionMakes 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 java.math.BigInteger gasEstimated() throws ApiException- Throws:
ApiException
-
-