Add an endpoint for precise circulating supply

This commit is contained in:
Aayush Rajasekaran
2020-10-12 16:38:29 -04:00
parent 8d769f0c07
commit 96e1dfd8d7
16 changed files with 236 additions and 65 deletions
+36 -11
View File
@@ -165,6 +165,7 @@
* [StateSectorGetInfo](#StateSectorGetInfo)
* [StateSectorPartition](#StateSectorPartition)
* [StateSectorPreCommitInfo](#StateSectorPreCommitInfo)
* [StateVMCirculatingSupply](#StateVMCirculatingSupply)
* [StateVerifiedClientStatus](#StateVerifiedClientStatus)
* [StateVerifiedRegistryRootKey](#StateVerifiedRegistryRootKey)
* [StateVerifierStatus](#StateVerifierStatus)
@@ -3094,7 +3095,8 @@ Response:
```
### StateCirculatingSupply
StateCirculatingSupply returns the circulating supply of Filecoin at the given tipset
StateCirculatingSupply returns the exact circulating supply of Filecoin at the given tipset.
This is not used anywhere in the protocol itself, and is only for external consumption.
Perms: read
@@ -3113,16 +3115,7 @@ Inputs:
]
```
Response:
```json
{
"FilVested": "0",
"FilMined": "0",
"FilBurnt": "0",
"FilLocked": "0",
"FilCirculating": "0"
}
```
Response: `"0"`
### StateCompute
StateCompute is a flexible command that applies the given messages on the given tipset.
@@ -4265,6 +4258,38 @@ Response:
}
```
### StateVMCirculatingSupply
StateVMCirculatingSupply returns an approximation of the circulating supply of Filecoin at the given tipset.
This is the value reported by the runtime interface to actors code.
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"FilVested": "0",
"FilMined": "0",
"FilBurnt": "0",
"FilLocked": "0",
"FilCirculating": "0"
}
```
### StateVerifiedClientStatus
StateVerifiedClientStatus returns the data cap for the given address.
Returns nil if there is no entry in the data cap table for the