Browse Source

fix: #700

fix/enable-imgix
Thomas Osmonson 4 years ago
parent
commit
1372ef261c
  1. 4
      src/pages/smart-contracts/principals.md

4
src/pages/smart-contracts/principals.md

@ -103,10 +103,10 @@ faucet" could be implemented as so:
```clarity
(define-public (claim-from-faucet)
(if (is-none? (map-get? claimed-before (tuple (sender tx-sender))))
(if (is-none (map-get? claimed-before (tuple (sender tx-sender))))
(let ((requester tx-sender)) ;; set a local variable requester = tx-sender
(begin
(map-set claimed-before (tuple (sender requester)) (tuple (claimed true)))
(map-set claimed-before { sender: requester, claimed: true })
(as-contract (stx-transfer? u1 tx-sender requester))))
(err 1)))
```

Loading…
Cancel
Save