@@ -21,87 +21,132 @@ public interface IProxyApi {
2121 /**
2222 * Returns the number of most recent block
2323 * eth_blockNumber
24+ * @return last block number
25+ * @throws ApiException parent exception class
2426 */
2527 long blockNoLast ();
2628
2729 /**
2830 * Returns information about a block by block number
2931 * eth_getBlockByNumber
32+ * @param blockNo block number from 0 to last
33+ * @return optional block result
34+ * @throws ApiException parent exception class
3035 */
3136 @ NotNull Optional <BlockProxy > block (long blockNo ) throws ApiException ;
3237
3338 /**
3439 * Returns information about a uncle by block number
3540 * eth_getUncleByBlockNumberAndIndex
41+ * @param blockNo block number from 0 to last
42+ * @param index uncle block index
43+ * @return optional block result
44+ * @throws ApiException parent exception class
3645 */
3746 @ NotNull Optional <BlockProxy > blockUncle (long blockNo , long index ) throws ApiException ;
3847
3948 /**
4049 * Returns the information about a transaction requested by transaction hash
4150 * eth_getTransactionByHash
51+ * @param txhash transaction hash
52+ * @return optional tx result
53+ * @throws ApiException parent exception class
4254 */
4355 @ NotNull Optional <TxProxy > tx (String txhash ) throws ApiException ;
4456
4557 /**
4658 * Returns information about a transaction by block number and transaction index position
4759 * eth_getTransactionByBlockNumberAndIndex
60+ * @param blockNo block number from 0 to last
61+ * @param index tx index in block
62+ * @return optional tx result
63+ * @throws ApiException parent exception class
4864 */
4965 @ NotNull Optional <TxProxy > tx (long blockNo , long index ) throws ApiException ;
5066
5167 /**
5268 * Returns the number of transactions in a block from a block matching the given block number
5369 * eth_getBlockTransactionCountByNumber
70+ * @param blockNo block number from 0 to last
71+ * @return transaction amount in block
72+ * @throws ApiException parent exception class
5473 */
5574 int txCount (long blockNo ) throws ApiException ;
5675
5776 /**
5877 * Returns the number of transactions sent from an address
5978 * eth_getTransactionCount
79+ * @param address eth address
80+ * @return transactions send amount from address
81+ * @throws ApiException parent exception class
6082 */
6183 int txSendCount (String address ) throws ApiException ;
6284
6385 /**
6486 * Creates new message call transaction or a contract creation for signed transactions
6587 * eth_sendRawTransaction
88+ * @param hexEncodedTx encoded hex data to send
89+ * @return optional string response
90+ * @throws ApiException parent exception class
6691 */
6792 @ NotNull Optional <String > txSendRaw (String hexEncodedTx ) throws ApiException ;
6893
6994 /**
7095 * Returns the receipt of a transaction by transaction hash
7196 * eth_getTransactionReceipt
97+ * @param txhash transaction hash
98+ * @return optional tx receipt
99+ * @throws ApiException parent exception class
72100 */
73101 @ NotNull Optional <ReceiptProxy > txReceipt (String txhash ) throws ApiException ;
74102
75103 /**
76104 * Executes a new message call immediately without creating a transaction on the block chain
77105 * eth_call
106+ * @param address to call
107+ * @param data data to call address
108+ * @return optional the return value of executed contract.
109+ * @throws ApiException parent exception class
78110 */
79111 @ NotNull Optional <String > call (String address , String data ) throws ApiException ;
80112
81113 /**
82114 * Returns code at a given address
83115 * eth_getCode
116+ * @param address get code from
117+ * @return optional the code from the given address
118+ * @throws ApiException parent exception class
84119 */
85120 @ NotNull Optional <String > code (String address ) throws ApiException ;
86121
87122 /**
88123 * (**experimental)
89124 * Returns the value from a storage position at a given address
90125 * eth_getStorageAt
126+ * @param address to get storage
127+ * @param position storage position
128+ * @return optional the value at this storage position
129+ * @throws ApiException parent exception class
91130 */
92131 @ NotNull Optional <String > storageAt (String address , long position ) throws ApiException ;
93132
94133 /**
95134 * Returns the current price per gas in wei
96135 * eth_gasPrice
136+ * @return estimated gas price
137+ * @throws ApiException parent exception class
97138 */
98139 @ NotNull BigInteger gasPrice () throws ApiException ;
99140
141+
100142 /**
101143 * Makes a call or transaction, which won't be added to the blockchain and returns the used gas,
102144 * which can be used for estimating the used gas
103145 * eth_estimateGas
146+ * @param hexData data to calc gas usage for
147+ * @return estimated gas usage
148+ * @throws ApiException parent exception class
104149 */
105- @ NotNull BigInteger gasEstimated () throws ApiException ;
106150 @ NotNull BigInteger gasEstimated (String hexData ) throws ApiException ;
151+ @ NotNull BigInteger gasEstimated () throws ApiException ;
107152}
0 commit comments