stacks-analytics-analytics-stacking-v1
SP2PEBKJ2W1ZDDF2QQ6Y4FXKZEDPT9J9R2NKD9WJBSource Code
(define-map cycle-stats uint {total-stacked: uint, participants: uint, rewards: uint})
(define-data-var current-cycle uint u0)
(define-read-only (get-cycle (cycle uint)) (map-get? cycle-stats cycle))
(define-public (record-cycle (cycle uint) (stacked uint) (participants uint) (rewards uint))
(begin
(map-set cycle-stats cycle {total-stacked: stacked, participants: participants, rewards: rewards})
(var-set current-cycle cycle)
(ok true)))Functions (2)
| Function | Access | Args |
|---|---|---|
| get-cycle | read-only | cycle: uint |
| record-cycle | public | cycle: uint, stacked: uint, participants: uint, rewards: uint |