@@ -22,115 +22,131 @@ public interface IProxyApi {
2222 * Returns the number of most recent block
2323 * eth_blockNumber
2424 * @return last block number
25+ * @throws ApiException parent exception class
2526 */
2627 long blockNoLast ();
2728
2829 /**
2930 * Returns information about a block by block number
3031 * eth_getBlockByNumber
31- * @param blockNo block number
32- * @return block info
32+ * @param blockNo block number from 0 to last
33+ * @return optional block result
34+ * @throws ApiException parent exception class
3335 */
3436 @ NotNull Optional <BlockProxy > block (long blockNo ) throws ApiException ;
3537
3638 /**
3739 * Returns information about a uncle by block number
3840 * eth_getUncleByBlockNumberAndIndex
39- * @param blockNo block number
41+ * @param blockNo block number from 0 to last
4042 * @param index uncle block index
41- * @return block info
43+ * @return optional block result
44+ * @throws ApiException parent exception class
4245 */
4346 @ NotNull Optional <BlockProxy > blockUncle (long blockNo , long index ) throws ApiException ;
4447
4548 /**
4649 * Returns the information about a transaction requested by transaction hash
4750 * eth_getTransactionByHash
48- * @param txhash tx hash
49- * @return tx info
51+ * @param txhash transaction hash
52+ * @return optional tx result
53+ * @throws ApiException parent exception class
5054 */
5155 @ NotNull Optional <TxProxy > tx (String txhash ) throws ApiException ;
5256
5357 /**
5458 * Returns information about a transaction by block number and transaction index position
5559 * eth_getTransactionByBlockNumberAndIndex
56- * @param blockNo block number
60+ * @param blockNo block number from 0 to last
5761 * @param index tx index in block
58- * @return tx info
62+ * @return optional tx result
63+ * @throws ApiException parent exception class
5964 */
6065 @ NotNull Optional <TxProxy > tx (long blockNo , long index ) throws ApiException ;
6166
6267 /**
6368 * Returns the number of transactions in a block from a block matching the given block number
6469 * eth_getBlockTransactionCountByNumber
65- * @param blockNo block number
66- * @return tx count in block
70+ * @param blockNo block number from 0 to last
71+ * @return transaction amount in block
72+ * @throws ApiException parent exception class
6773 */
6874 int txCount (long blockNo ) throws ApiException ;
6975
7076 /**
7177 * Returns the number of transactions sent from an address
7278 * eth_getTransactionCount
73- * @param address to look for
74- * @return tx send count
79+ * @param address eth address
80+ * @return transactions send amount from address
81+ * @throws ApiException parent exception class
7582 */
7683 int txSendCount (String address ) throws ApiException ;
7784
7885 /**
7986 * Creates new message call transaction or a contract creation for signed transactions
8087 * eth_sendRawTransaction
81- * @param hexEncodedTx tx as hex
82- * @return result (check eth grpc info)
88+ * @param hexEncodedTx encoded hex data to send
89+ * @return optional string response
90+ * @throws ApiException parent exception class
8391 */
8492 @ NotNull Optional <String > txSendRaw (String hexEncodedTx ) throws ApiException ;
8593
8694 /**
8795 * Returns the receipt of a transaction by transaction hash
8896 * eth_getTransactionReceipt
89- * @param txhash tx hash
90- * @return receipt
97+ * @param txhash transaction hash
98+ * @return optional tx receipt
99+ * @throws ApiException parent exception class
91100 */
92101 @ NotNull Optional <ReceiptProxy > txReceipt (String txhash ) throws ApiException ;
93102
94103 /**
95104 * Executes a new message call immediately without creating a transaction on the block chain
96105 * eth_call
97- * @param address to look for
98- * @param data in tx for call
99- * @return result (check eth grpc info)
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
100110 */
101111 @ NotNull Optional <String > call (String address , String data ) throws ApiException ;
102112
103113 /**
104114 * Returns code at a given address
105115 * eth_getCode
106- * @param address to look for
107- * @return result (check eth grpc info)
116+ * @param address get code from
117+ * @return optional the code from the given address
118+ * @throws ApiException parent exception class
108119 */
109120 @ NotNull Optional <String > code (String address ) throws ApiException ;
110121
111122 /**
112123 * (**experimental)
113124 * Returns the value from a storage position at a given address
114125 * eth_getStorageAt
115- * @param address to look for
126+ * @param address to get storage
116127 * @param position storage position
117- * @return result (check eth grpc info)
128+ * @return optional the value at this storage position
129+ * @throws ApiException parent exception class
118130 */
119131 @ NotNull Optional <String > storageAt (String address , long position ) throws ApiException ;
120132
121133 /**
122134 * Returns the current price per gas in wei
123135 * eth_gasPrice
124- * @return price
136+ * @return estimated gas price
137+ * @throws ApiException parent exception class
125138 */
126139 @ NotNull BigInteger gasPrice () throws ApiException ;
127140
141+ 128142 /**
129143 * Makes a call or transaction, which won't be added to the blockchain and returns the used gas,
130144 * which can be used for estimating the used gas
131145 * eth_estimateGas
132- * @return gas estimate
146+ * @param hexData data to calc gas usage for
147+ * @return estimated gas usage
148+ * @throws ApiException parent exception class
133149 */
134- @ NotNull BigInteger gasEstimated () throws ApiException ;
135150 @ NotNull BigInteger gasEstimated (String hexData ) throws ApiException ;
151+ @ NotNull BigInteger gasEstimated () throws ApiException ;
136152}
0 commit comments