Closed PaulRBerg closed 2 years ago
@paulrberg I believe this is no longer an issue.
### getPrice
```solidity
function getPrice(
string symbol
) external returns (uint256)
```
Gets the official price for a symbol in the default format used by Chainlink, which
has 8 decimals.
Requirements:
- The feed must be set.
- The price returned by the oracle cannot be zero.
#### Parameters
| Name | Type | Description |
| :------- | :----- | :--------------------------------- |
| `symbol` | string | The symbol to fetch the price for. |
#### Return Values
| Name | Type | Description |
| :---- | :------ | :--------------------------------------------- |
| `[0]` | uint256 | The price denominated in USD, with 8 decimals. |
The
generate-docs
scripts generates a pretty Markdown report that we use in our official docs. The problem is that this report needs some polishing before is easy for use.One issue is related to the "Name" column in table under the "Returned Values" section. When the returned value does not have a name, but the NatSpec comments make a reference to it, in the table we find the first word after the
@return
keyword, which often is "The".To solve this, we should add an
#if
statement, and check whether the returned value has a name or not.