@gala-chain/chaincode ∙ API
API > fetchKnownBurnCount
Function: fetchKnownBurnCount()
fetchKnownBurnCount(
ctx
,token
):Promise
\<BigNumber
>
Parameters
▪ ctx: GalaChainContext
▪ token: FetchBurnCounterParams
Returns
Description
Execute a getStateByRange
query of TokenBurnCounter
entries.
The start key will be offset by the configured blockTimeout
environment variable, using an inverted time stamp.
New entries are expected to be composed with a simple key
generated based on the inversion of the current ctx.txUnixTime
.
The intent is to avoid reading new entries written in the same block, by choosing a start key that begins a range which will not include new writes.
Remarks
Unlike many other fetch queries, fetchKnownBurnCount
iterate over entries extended from the RangedChainObject
.
RangedChainObject
types do not support composite key queries.