feat: getting rid of the implicit syntax

This commit is contained in:
Ludovic Galabru
2020-12-01 13:34:35 -05:00
parent 60db326bd3
commit 0d26dfd9e4
30 changed files with 232 additions and 317 deletions

View File

@@ -3,10 +3,10 @@
(if (< name u100000) u1000 u100))
(define-map name-map
((name uint)) ((owner principal)))
{ name: uint } { owner: principal })
(define-map preorder-map
((name-hash (buff 20)))
((buyer principal) (paid uint)))
{ name-hash: (buff 20) }
{ buyer: principal, paid: uint })
(define-public (preorder
(name-hash (buff 20))

View File

@@ -1,4 +1,4 @@
(define-map tokens ((account principal)) ((balance uint)))
(define-map tokens { account: principal } { balance: uint })
(define-private (get-balance (account principal))
(default-to u0 (get balance (map-get? tokens (tuple (account account))))))