@@ -22,115 +22,131 @@ public interface IProxyApi {
22
22
* Returns the number of most recent block
23
23
* eth_blockNumber
24
24
* @return last block number
25
+ * @throws ApiException parent exception class
25
26
*/
26
27
long blockNoLast ();
27
28
28
29
/**
29
30
* Returns information about a block by block number
30
31
* 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
33
35
*/
34
36
@ NotNull Optional <BlockProxy > block (long blockNo ) throws ApiException ;
35
37
36
38
/**
37
39
* Returns information about a uncle by block number
38
40
* eth_getUncleByBlockNumberAndIndex
39
- * @param blockNo block number
41
+ * @param blockNo block number from 0 to last
40
42
* @param index uncle block index
41
- * @return block info
43
+ * @return optional block result
44
+ * @throws ApiException parent exception class
42
45
*/
43
46
@ NotNull Optional <BlockProxy > blockUncle (long blockNo , long index ) throws ApiException ;
44
47
45
48
/**
46
49
* Returns the information about a transaction requested by transaction hash
47
50
* 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
50
54
*/
51
55
@ NotNull Optional <TxProxy > tx (String txhash ) throws ApiException ;
52
56
53
57
/**
54
58
* Returns information about a transaction by block number and transaction index position
55
59
* eth_getTransactionByBlockNumberAndIndex
56
- * @param blockNo block number
60
+ * @param blockNo block number from 0 to last
57
61
* @param index tx index in block
58
- * @return tx info
62
+ * @return optional tx result
63
+ * @throws ApiException parent exception class
59
64
*/
60
65
@ NotNull Optional <TxProxy > tx (long blockNo , long index ) throws ApiException ;
61
66
62
67
/**
63
68
* Returns the number of transactions in a block from a block matching the given block number
64
69
* 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
67
73
*/
68
74
int txCount (long blockNo ) throws ApiException ;
69
75
70
76
/**
71
77
* Returns the number of transactions sent from an address
72
78
* 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
75
82
*/
76
83
int txSendCount (String address ) throws ApiException ;
77
84
78
85
/**
79
86
* Creates new message call transaction or a contract creation for signed transactions
80
87
* 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
83
91
*/
84
92
@ NotNull Optional <String > txSendRaw (String hexEncodedTx ) throws ApiException ;
85
93
86
94
/**
87
95
* Returns the receipt of a transaction by transaction hash
88
96
* 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
91
100
*/
92
101
@ NotNull Optional <ReceiptProxy > txReceipt (String txhash ) throws ApiException ;
93
102
94
103
/**
95
104
* Executes a new message call immediately without creating a transaction on the block chain
96
105
* 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
100
110
*/
101
111
@ NotNull Optional <String > call (String address , String data ) throws ApiException ;
102
112
103
113
/**
104
114
* Returns code at a given address
105
115
* 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
108
119
*/
109
120
@ NotNull Optional <String > code (String address ) throws ApiException ;
110
121
111
122
/**
112
123
* (**experimental)
113
124
* Returns the value from a storage position at a given address
114
125
* eth_getStorageAt
115
- * @param address to look for
126
+ * @param address to get storage
116
127
* @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
118
130
*/
119
131
@ NotNull Optional <String > storageAt (String address , long position ) throws ApiException ;
120
132
121
133
/**
122
134
* Returns the current price per gas in wei
123
135
* eth_gasPrice
124
- * @return price
136
+ * @return estimated gas price
137
+ * @throws ApiException parent exception class
125
138
*/
126
139
@ NotNull BigInteger gasPrice () throws ApiException ;
127
140
141
+
128
142
/**
129
143
* Makes a call or transaction, which won't be added to the blockchain and returns the used gas,
130
144
* which can be used for estimating the used gas
131
145
* 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
133
149
*/
134
- @ NotNull BigInteger gasEstimated () throws ApiException ;
135
150
@ NotNull BigInteger gasEstimated (String hexData ) throws ApiException ;
151
+ @ NotNull BigInteger gasEstimated () throws ApiException ;
136
152
}
0 commit comments