63 lines
995 B
Plaintext
63 lines
995 B
Plaintext
import {
|
|
DocBlock,
|
|
DocSideBySide,
|
|
CodeParams,
|
|
Parameter,
|
|
Field,
|
|
Values,
|
|
CodeSnippets,
|
|
} from "../../../components/CodeDocBlock";
|
|
|
|
<DocBlock>
|
|
|
|
## getInflationRate
|
|
|
|
Returns the specific inflation values for the current epoch
|
|
|
|
<DocSideBySide>
|
|
<CodeParams>
|
|
|
|
### Parameters:
|
|
|
|
**None**
|
|
|
|
### Result:
|
|
|
|
The result field will be a JSON object with the following fields:
|
|
|
|
- `total: <f64>` - total inflation
|
|
- `validator: <f64>` -inflation allocated to validators
|
|
- `foundation: <f64>` - inflation allocated to the foundation
|
|
- `epoch: <u64>` - epoch for which these values are valid
|
|
|
|
</CodeParams>
|
|
|
|
<CodeSnippets>
|
|
|
|
### Code sample:
|
|
|
|
```bash
|
|
curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
|
|
{"jsonrpc":"2.0","id":1, "method":"getInflationRate"}
|
|
'
|
|
```
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"jsonrpc": "2.0",
|
|
"result": {
|
|
"epoch": 100,
|
|
"foundation": 0.001,
|
|
"total": 0.149,
|
|
"validator": 0.148
|
|
},
|
|
"id": 1
|
|
}
|
|
```
|
|
|
|
</CodeSnippets>
|
|
</DocSideBySide>
|
|
</DocBlock>
|