update print event on token-lqstx::transfer

This commit is contained in:
fiftyeightandeight
2024-03-14 17:36:43 +08:00
parent 3eac74fd2a
commit 7c713bc803
2 changed files with 4 additions and 4 deletions

View File

@@ -109,10 +109,11 @@
;; public calls
(define-public (transfer (amount uint) (sender principal) (recipient principal) (memo (optional (buff 2048))))
(begin
(let (
(shares (get-tokens-to-shares amount)))
(asserts! (or (is-eq tx-sender sender) (is-eq contract-caller sender)) err-unauthorised)
(try! (ft-transfer? lqstx (get-tokens-to-shares amount) sender recipient))
(print { type: "transfer", amount: amount, sender: sender, recipient: recipient, memo: memo })
(try! (ft-transfer? lqstx shares sender recipient))
(print { notification: "transfer", payload: { amount: amount, shares: shares, sender: sender, recipient: recipient, memo: memo } })
(ok true)))
;; private functions

View File

@@ -39,7 +39,6 @@ genesis:
- pox
- pox-2
- pox-3
- pox-4
- lockup
- costs-2
- costs-3