Package io.goodforgod.api.etherscan
Interface ProxyAPI
public interface ProxyAPI
EtherScan - API Descriptions
...
- Since:
- 30.10.2018
-
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<BlockProxy>block(long blockNo) Returns information about a block by block number eth_getBlockByNumberlongReturns the number of most recent block eth_blockNumber@NotNull Optional<BlockProxy>blockUncle(long blockNo, long index) Returns information about a uncle by block number eth_getUncleByBlockNumberAndIndexExecutes a new message call immediately without creating a transaction on the block chain eth_callReturns code at a given address eth_getCode@NotNull Wei@NotNull WeigasEstimated(@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 WeigasPrice()Returns the current price per gas in wei eth_gasPrice(**experimental) Returns the value from a storage position at a given address eth_getStorageAttx(long blockNo, long index) Returns information about a transaction by block number and transaction index position eth_getTransactionByBlockNumberAndIndexReturns 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 Optional<ReceiptProxy>Returns the receipt of a transaction by transaction hash eth_getTransactionReceiptinttxSendCount(@NotNull String address) Returns the number of transactions sent from an address eth_getTransactionCountCreates 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
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 lastindex- uncle block index- Returns:
- optional block result
- Throws:
EtherScanException- parent exception class
-
tx
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
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:
EtherScanException- parent exception class
-
txCount
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
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 calldata- data to call address- Returns:
- optional the return value of executed contract.
- Throws:
EtherScanException- parent exception class
-
code
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 storageposition- storage position- Returns:
- optional the value at this storage position
- Throws:
EtherScanException- parent exception class
-
gasPrice
Returns the current price per gas in wei eth_gasPrice- Returns:
- estimated gas price
- Throws:
EtherScanException- parent exception class
-
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- Parameters:
hexData- data to calc gas usage for- Returns:
- estimated gas usage
- Throws:
EtherScanException- parent exception class
-
gasEstimated
- Throws:
EtherScanException
-