mirror of
https://github.com/alexgo-io/brc20-indexer-contracts.git
synced 2026-01-12 22:21:46 +08:00
chore: add indexer registry contract logs (#20)
Signed-off-by: bestmike007 <i@bestmike007.com>
This commit is contained in:
@@ -62,11 +62,13 @@
|
||||
(define-public (set-user-balance (key { user: (buff 128), tick: (string-utf8 4) }) (value { balance: uint, up-to-block: uint }))
|
||||
(begin
|
||||
(try! (check-is-approved))
|
||||
(print { type: "user-balance-updated", user: (get user key), tick: (get tick key), balance: (get balance value), up-to-block: (get up-to-block value) })
|
||||
(ok (map-set user-balance key value))))
|
||||
|
||||
(define-public (set-tx-mined (key (buff 4096)) (value bool))
|
||||
(begin
|
||||
(try! (check-is-approved))
|
||||
(print { type: "tx-mined", tx-hash: key })
|
||||
(ok (map-set bitcoin-tx-mined key value))
|
||||
)
|
||||
)
|
||||
@@ -74,6 +76,7 @@
|
||||
(define-public (set-tx-indexed (key { tx-hash: (buff 4096), output: uint, offset: uint }) (value { tick: (string-utf8 4), amt: uint, from: (buff 128), to: (buff 128) }))
|
||||
(begin
|
||||
(try! (check-is-approved))
|
||||
(print { type: "tx-indexed", tx-hash: (get tx-hash key), output: (get output key), offset: (get offset key), tick: (get tick value), amt: (get amt value), from: (get from value), to: (get to value) })
|
||||
(ok (map-set bitcoin-tx-indexed key value))
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user