Package io.api.etherscan.core.impl
Class ProxyApiProvider
java.lang.Object
io.api.etherscan.core.impl.ProxyApiProvider
- All Implemented Interfaces:
IProxyApi
Proxy API Implementation
- Since:
- 28.10.2018
- See Also:
-
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 BigInteger@NotNull BigIntegergasEstimated(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 BigIntegergasPrice()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(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
Description copied from interface:IProxyApiReturns the number of most recent block eth_blockNumber- Specified by:
blockNoLastin interfaceIProxyApi- Returns:
- last block number
- Throws:
ApiException- parent exception class
-
block
Description copied from interface:IProxyApiReturns information about a block by block number eth_getBlockByNumber- Specified by:
blockin interfaceIProxyApi- Parameters:
blockNo- block number from 0 to last- Returns:
- optional block result
- Throws:
ApiException- parent exception class
-
blockUncle
@NotNull public @NotNull Optional<BlockProxy> blockUncle(long blockNo, long index) throws ApiException Description copied from interface:IProxyApiReturns information about a uncle by block number eth_getUncleByBlockNumberAndIndex- Specified by:
blockUnclein interfaceIProxyApi- Parameters:
blockNo- block number from 0 to lastindex- uncle block index- Returns:
- optional block result
- Throws:
ApiException- parent exception class
-
tx
Description copied from interface:IProxyApiReturns the information about a transaction requested by transaction hash eth_getTransactionByHash- Specified by:
txin interfaceIProxyApi- Parameters:
txhash- transaction hash- Returns:
- optional tx result
- Throws:
ApiException- parent exception class
-
tx
Description copied from interface:IProxyApiReturns information about a transaction by block number and transaction index position eth_getTransactionByBlockNumberAndIndex- Specified by:
txin interfaceIProxyApi- Parameters:
blockNo- block number from 0 to lastindex- tx index in block- Returns:
- optional tx result
- Throws:
ApiException- parent exception class
-
txCount
Description copied from interface:IProxyApiReturns the number of transactions in a block from a block matching the given block number eth_getBlockTransactionCountByNumber- Specified by:
txCountin interfaceIProxyApi- Parameters:
blockNo- block number from 0 to last- Returns:
- transaction amount in block
- Throws:
ApiException- parent exception class
-
txSendCount
Description copied from interface:IProxyApiReturns the number of transactions sent from an address eth_getTransactionCount- Specified by:
txSendCountin interfaceIProxyApi- Parameters:
address- eth address- Returns:
- transactions send amount from address
- Throws:
ApiException- parent exception class
-
txSendRaw
Description copied from interface:IProxyApiCreates new message call transaction or a contract creation for signed transactions eth_sendRawTransaction- Specified by:
txSendRawin interfaceIProxyApi- Parameters:
hexEncodedTx- encoded hex data to send- Returns:
- optional string response
- Throws:
ApiException- parent exception class
-
txReceipt
Description copied from interface:IProxyApiReturns the receipt of a transaction by transaction hash eth_getTransactionReceipt- Specified by:
txReceiptin interfaceIProxyApi- Parameters:
txhash- transaction hash- Returns:
- optional tx receipt
- Throws:
ApiException- parent exception class
-
call
Description copied from interface:IProxyApiExecutes a new message call immediately without creating a transaction on the block chain eth_call- Specified by:
callin interfaceIProxyApi- Parameters:
address- to calldata- data to call address- Returns:
- optional the return value of executed contract.
- Throws:
ApiException- parent exception class
-
code
Description copied from interface:IProxyApiReturns code at a given address eth_getCode- Specified by:
codein interfaceIProxyApi- Parameters:
address- get code from- Returns:
- optional the code from the given address
- Throws:
ApiException- parent exception class
-
storageAt
@NotNull public @NotNull Optional<String> storageAt(String address, long position) throws ApiException Description copied from interface:IProxyApi(**experimental) Returns the value from a storage position at a given address eth_getStorageAt- Specified by:
storageAtin interfaceIProxyApi- Parameters:
address- to get storageposition- storage position- Returns:
- optional the value at this storage position
- Throws:
ApiException- parent exception class
-
gasPrice
Description copied from interface:IProxyApiReturns the current price per gas in wei eth_gasPrice- Specified by:
gasPricein interfaceIProxyApi- Returns:
- estimated gas price
- Throws:
ApiException- parent exception class
-
gasEstimated
- Specified by:
gasEstimatedin interfaceIProxyApi- Throws:
ApiException
-
gasEstimated
Description copied from interface:IProxyApiMakes 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- Specified by:
gasEstimatedin interfaceIProxyApi- Parameters:
hexData- data to calc gas usage for- Returns:
- estimated gas usage
- Throws:
ApiException- parent exception class
-