You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -191,6 +202,8 @@ module.exports = function (apiKey) {
191
202
/**
192
203
* Returns the number of transactions sent from an address
193
204
* @param {string} address - Address of the transaction
205
+
* @example
206
+
* var res = api.proxy.eth_getTransactionCount('0x2910543af39aba0cd09dbb2d50200b3e800a63d2', 'latest');
194
207
* @returns {Promise.<object>}
195
208
*/
196
209
eth_getTransactionCount(address){
@@ -204,6 +217,8 @@ module.exports = function (apiKey) {
204
217
/**
205
218
* Creates new message call transaction or a contract creation for signed transactions
206
219
* @param {string} hex - Serialized Message
220
+
* @example
221
+
* var res = api.proxy.eth_sendRawTransaction('0xf904808000831cfde080');
207
222
* @returns {Promise.<object>}
208
223
*/
209
224
eth_sendRawTransaction(hex){
@@ -217,6 +232,8 @@ module.exports = function (apiKey) {
217
232
/**
218
233
* Returns the receipt of a transaction by transaction hash
219
234
* @param {string} txhash - Transaction hash
235
+
* @example
236
+
* var ret = api.proxy.eth_getTransactionReceipt('0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1');
220
237
* @returns {Promise.<object>}
221
238
*/
222
239
eth_getTransactionReceipt(txhash){
@@ -231,6 +248,8 @@ module.exports = function (apiKey) {
231
248
* Executes a new message call immediately without creating a transaction on the block chain
232
249
* @param {string} to - Address to execute from
233
250
* @param {string} tag - Content
251
+
* @example
252
+
* var res = api.proxy.eth_call('0xAEEF46DB4855E25702F8237E8f403FddcaF931C0', '0x70a08231000000000000000000000000e16359506c028e51f16be38986ec5746251e9724', 'latest');
234
253
* @returns {Promise.<object>}
235
254
*/
236
255
eth_call(to,tag){
@@ -245,6 +264,8 @@ module.exports = function (apiKey) {
245
264
* Returns code at a given address
246
265
* @param {string} address - Address to get code from
247
266
* @param {string} tag - ??
267
+
* @example
268
+
* var res = api.proxy.eth_getCode('0xf75e354c5edc8efed9b59ee9f67a80845ade7d0c', 'latest');
248
269
* @returns {Promise.<object>}
249
270
*/
250
271
eth_getCode(address,tag){
@@ -260,6 +281,8 @@ module.exports = function (apiKey) {
260
281
* @param {string} address - Address to get code from
261
282
* @param {string} position - Storage position
262
283
* @param {string} tag - ??
284
+
* @example
285
+
* var res = api.proxy.eth_getStorageAt('0x6e03d9cce9d60f3e9f2597e13cd4c54c55330cfd', '0x0', 'latest');
263
286
* @returns {Promise.<object>}
264
287
*/
265
288
eth_getStorageAt(address,position,tag){
@@ -272,6 +295,7 @@ module.exports = function (apiKey) {
272
295
},
273
296
/**
274
297
* Returns the current price per gas in wei.
298
+
* var gasprice = api.proxy.eth_gasPrice();
275
299
* @returns {Promise.<object>}
276
300
*/
277
301
eth_gasPrice(){
@@ -288,6 +312,13 @@ module.exports = function (apiKey) {
288
312
* @param {string} value - Storage position
289
313
* @param {string} gasPrice - ??
290
314
* @param {string} gas - ??
315
+
* @xample
316
+
* var res = api.proxy.eth_estimateGas(
317
+
* '0xf0160428a8552ac9bb7e050d90eeade4ddd52843',
318
+
* '0xff22',
319
+
* '0x051da038cc',
320
+
* '0xffffff'
321
+
*);
291
322
* @returns {Promise.<object>}
292
323
*/
293
324
eth_estimateGas(to,value,gasPrice,gas){
@@ -307,6 +338,8 @@ module.exports = function (apiKey) {
307
338
* Returns the supply of Tokens
308
339
* @param {string} tokenname - Name of the Token
309
340
* @param {string} contractaddress - Address from token contract
341
+
* @example
342
+
* var supply = api.stats.tokensupply(null, '0x57d90b64a1a57749b0f932f1a3395792e12e7055');
310
343
* @returns {Promise.<object>}
311
344
*/
312
345
tokensupply(tokenname,contractaddress){
@@ -331,6 +364,7 @@ module.exports = function (apiKey) {
331
364
332
365
/**
333
366
* Returns total supply of ether
367
+
* var supply = api.stats.ethsupply();
334
368
* @returns {Promise.<integer>}
335
369
*/
336
370
ethsupply(){
@@ -344,6 +378,8 @@ module.exports = function (apiKey) {
344
378
345
379
/**
346
380
* Returns the price of ether now
381
+
* @example
382
+
* var price = api.stats.ethprice();
347
383
* @returns {Promise.<integer>}
348
384
*/
349
385
ethprice(){
@@ -402,6 +438,12 @@ module.exports = function (apiKey) {
0 commit comments