get-reward-cycle
in the core contract and supplying the block height.get-stacking-stats-at-cycle
, and individual account Stacking details are available through get-stacker-at-cycle
.-or-default
version that returns empty default values instead of some
or none
Clarity types.stack-tokens
:rewardCycle as uint
(some StackingStatsAtCycle) as a tuple
or (none)
amountUstx
- total rewards from miners in uSTXamountToken
- total CityCoins StackedrewardCycle as uint
(some StackingStatsAtCycle) as a tuple, or defaults
get-stacking-stats-at-cycle
above, except if no entry is found, returns the default structure of:amountUstx: 0
amountToken: 0
rewardCycle as uint
and userId as uint
(some StackerAtCycle) as a tuple
or (none)
amountStacked
- the total amount of CityCoins StackedtoReturn
- the total amount of CityCoins that can be reclaimed from the contractrewardCycle as uint
and userId as uint
(some StackerAtCycle) as a tuple, or defaults
get-stacker-at-cycle
above, except if no entry is found, returns the default structure of:amountStacked: 0
toReturn: 0
stacksHeight as uint
(some rewardCycle) as uint
or (none)
rewardCycle as uint
true
or false
rewardCycle as uint
firstBlockInCycle as uint
amountTokens as uint
and lockPeriod as uint
(ok true)
ERR_CONTRACT_NOT_ACTIVATED u1005
ERR_STACKING_NOT_AVAILABLE u1015
ERR_CANNOT_STACK u1016
stack-tokens
function in the contract, which accepts an amount of CityCoins to Stack in addition to a number of reward cycles to Stack them for.