Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 59a7491

Browse files
committed
Update jsdoc
1 parent d46a6f6 commit 59a7491

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

‎doc/API.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ EtherscanApi
2727
* [.getTransactionByHash(txhash)](#EtherscanApi+getTransactionByHash) ⇒ <code>Promise.&lt;object&gt;</code>
2828
* [.getTransactionByBlockNumberAndIndex(blockNumber, [index])](#EtherscanApi+getTransactionByBlockNumberAndIndex) ⇒ <code>Promise.&lt;object&gt;</code>
2929
* [.getTransactionCount(address)](#EtherscanApi+getTransactionCount) ⇒ <code>Promise.&lt;number&gt;</code>
30-
* [.sendRawTransaction(hex)](#EtherscanApi+sendRawTransaction)
30+
* [.sendRawTransaction(hex)](#EtherscanApi+sendRawTransaction) ⇒ <code>Promise.&lt;void&gt;</code>
3131
* [.getTransactionReceipt(txhash)](#EtherscanApi+getTransactionReceipt) ⇒ <code>Promise.&lt;object&gt;</code>
3232
* [.call(to, data)](#EtherscanApi+call) ⇒ <code>Promise.&lt;string&gt;</code>
3333
* [.getCode(address)](#EtherscanApi+getCode) ⇒ <code>Promise.&lt;string&gt;</code>
3434
* [.getStorageAt(address, position)](#EtherscanApi+getStorageAt) ⇒ <code>Promise.&lt;string&gt;</code>
35-
* [.getGasPrice([unit])](#EtherscanApi+getGasPrice) ⇒ <code>string</code>
36-
* [.estimateGas(to, value, gasPrice, gas)](#EtherscanApi+estimateGas)
35+
* [.getGasPrice([unit])](#EtherscanApi+getGasPrice) ⇒ <code>Promise.&lt;string&gt;</code>
36+
* [.estimateGas(to, value, gasPrice, gas)](#EtherscanApi+estimateGas) ⇒ <code>Promise.&lt;void&gt;</code>
3737
* [.getTokenByContractAddress(contractAddress)](#EtherscanApi+getTokenByContractAddress) ⇒ <code>Promise.&lt;string&gt;</code>
3838
* [.getTokenBalanceByContractAddress(contractAddress)](#EtherscanApi+getTokenBalanceByContractAddress) ⇒ <code>Promise.&lt;string&gt;</code>
3939
* [.getTotalEtherSupply()](#EtherscanApi+getTotalEtherSupply) ⇒ <code>Promise.&lt;string&gt;</code>
@@ -283,7 +283,7 @@ Returns the number of transactions sent from an address
283283

284284
<a name="EtherscanApi+sendRawTransaction"></a>
285285

286-
### etherscanApi.sendRawTransaction(hex)
286+
### etherscanApi.sendRawTransaction(hex) ⇒ <code>Promise.&lt;void&gt;</code>
287287
Creates new message call transaction or a contract creation for signed
288288
transactions
289289

@@ -342,7 +342,7 @@ Returns the value from a storage position at a given address.
342342

343343
<a name="EtherscanApi+getGasPrice"></a>
344344

345-
### etherscanApi.getGasPrice([unit]) ⇒ <code>string</code>
345+
### etherscanApi.getGasPrice([unit]) ⇒ <code>Promise.&lt;string&gt;</code>
346346
Returns the current price per gas (in wei by default)
347347

348348
**Kind**: instance method of [<code>EtherscanApi</code>](#EtherscanApi)
@@ -353,7 +353,7 @@ Returns the current price per gas (in wei by default)
353353

354354
<a name="EtherscanApi+estimateGas"></a>
355355

356-
### etherscanApi.estimateGas(to, value, gasPrice, gas)
356+
### etherscanApi.estimateGas(to, value, gasPrice, gas) ⇒ <code>Promise.&lt;void&gt;</code>
357357
Makes a call or transaction, which won't be added to the blockchain and
358358
returns the used gas, which can be used for estimating the used gas
359359

‎index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ declare class EtherscanApi {
532532
/**
533533
* Returns the current price per gas (in wei by default)
534534
* @param {string} [unit=wei] Unit of gas
535-
* @returns {string}
535+
* @returns {Promise<string>}
536536
*/
537537
getGasPrice(unit?: keyof UNITS): Promise<string>
538538

@@ -543,6 +543,7 @@ declare class EtherscanApi {
543543
* @param {string} value Storage position
544544
* @param {string} gasPrice Gas price in wei
545545
* @param {string} gas
546+
* @returns {Promise<void>}
546547
*/
547548
estimateGas(
548549
to: string,

‎src/EtherscanApi.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ class EtherscanApi {
378378
* Creates new message call transaction or a contract creation for signed
379379
* transactions
380380
* @param {string} hex Raw hex encoded transaction that you want to send
381+
* @return {Promise<void>}
381382
*/
382383
sendRawTransaction(hex) {
383384
this._createRequest({
@@ -450,7 +451,7 @@ class EtherscanApi {
450451
/**
451452
* Returns the current price per gas (in wei by default)
452453
* @param {string} [unit=wei] Unit of gas
453-
* @returns {string}
454+
* @returns {Promise<string>}
454455
*/
455456
getGasPrice(unit = 'wei') {
456457
return this._createRequest({
@@ -477,6 +478,7 @@ class EtherscanApi {
477478
* @param {string} value Storage position
478479
* @param {string} gasPrice Gas price in wei
479480
* @param {string} gas
481+
* @return {Promise<void>}
480482
*/
481483
estimateGas(to, value, gasPrice, gas) {
482484
this._createRequest({

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /