tx-overdrive
SP1YH5MXTJT86BZXMFA2T51JF0QVZ8XNYV33QH6MFSource Code
(define-map hack-count principal uint)
(define-data-var total-hacks uint u0)
(define-public (hack-node)
(begin
(map-set hack-count tx-sender
(+ (default-to u0 (map-get? hack-count tx-sender)) u1))
(var-set total-hacks (+ (var-get total-hacks) u1))
(ok true)))
(define-read-only (get-hack-count (who principal))
(default-to u0 (map-get? hack-count who)))
(define-read-only (get-total-hacks)
(var-get total-hacks))Functions (3)
| Function | Access | Args |
|---|---|---|
| hack-node | public | |
| get-hack-count | read-only | who: principal |
| get-total-hacks | read-only |