Browse Source

Define constants that are used as error return values and for how much stxs we should transfer from the faucet

feat/emotion-core-ui
Adam Dunkels 4 years ago
committed by Thomas Osmonson
parent
commit
f105154515
  1. 8
      src/pages/smart-contracts/principals.md

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

@ -103,8 +103,12 @@ faucet" could be implemented as so:
```clarity
(define-map claimed-before
((sender principal))
((claimed bool)))
((sender principal))
((claimed bool)))
(define-constant err-already-claimed u1)
(define-constant err-faucet-empty u2)
(define-constant stx-amount u1)
(define-public (claim-from-faucet)
(if (is-none (map-get? claimed-before {sender: tx-sender}))

Loading…
Cancel
Save