Skip to content

Commit 0fb9f85

Browse files
authored
Merge pull request #2597 from blockstack/feat/clarity-cli-costs-json
Feat/clarity cli costs json
2 parents ba2aeef + e074d6c commit 0fb9f85

File tree

10 files changed

+1259
-325
lines changed

10 files changed

+1259
-325
lines changed

sample-contracts/tokens-ft-mint.clar

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(begin
2+
(as-contract
3+
(contract-call? 'S1G2081040G2081040G2081040G208105NK8PE5.tokens-ft mint! u100)
4+
)
5+
)

sample-contracts/tokens-ft.clar

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
(define-fungible-token tokens)
2+
(define-private (get-balance (account principal))
3+
(ft-get-balance tokens account))
4+
5+
(define-private (token-credit! (account principal) (amount uint))
6+
(ft-mint? tokens amount account))
7+
8+
(define-public (token-transfer (to principal) (amount uint))
9+
(ft-transfer? tokens amount tx-sender to))
10+
11+
(define-public (mint! (amount uint))
12+
(token-credit! tx-sender amount))
13+
14+
(token-credit! tx-sender u10300)
15+
(token-transfer 'SZ2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKQ9H6DPR u10000)
16+
(token-transfer 'SM2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKQVX8X0G u300)

sample-contracts/tokens-mint.clar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
(as-contract
33
(contract-call? 'S1G2081040G2081040G2081040G208105NK8PE5.tokens mint! u100)
44
)
5-
)
5+
)

0 commit comments

Comments
 (0)