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