Skip to content

Commit d97aa1a

Browse files
committed
bug: issue with traits, added small todo
1 parent 1e32d55 commit d97aa1a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/stacks-m2m-trait-v1.clar

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
(define-trait stacks-m2m-trait-v1
22
(
3-
(set-payment-address (principal principal) (response bool uint))
4-
(add-resource (uint (string-utf8 50) (string-utf8 255)) (response bool uint))
5-
(delete-resource (uint) (response bool uint))
6-
(delete-resource-by-name ((string-utf8 50)) (response bool uint))
7-
;; (pay-invoice (uint (optional (buff 34))) (response bool uint))
8-
;; (pay-invoice-by-resource-name ((string-utf8 50) (optional (buff 34))) (response bool uint))
3+
(set-payment-address (principal principal) (response bool uint)) ;; works
4+
(add-resource ((string-utf8 50) (string-utf8 255) uint) (response bool uint)) ;; error
5+
(delete-resource (uint) (response bool uint)) ;; works
6+
(delete-resource-by-name ((string-utf8 50)) (response bool uint)) ;; works
7+
(pay-invoice (uint (optional (buff 34))) (response bool uint))
8+
(pay-invoice-by-resource-name ((string-utf8 50) (optional (buff 34))) (response bool uint))
99
)
1010
)

src/stacks-m2m-v2.clar

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777

7878
;; tracks resources added by deployer keyed by resource index
7979
;; can iterate over full map with resourceCount data-var
80+
;; TODO: add string for URL / health checks? could it change?
8081
(define-map ResourceData
8182
uint ;; resource index
8283
{
@@ -258,7 +259,7 @@
258259

259260
;; adds active resource that invoices can be generated for
260261
;; only accessible by deployer
261-
(define-public (add-resource (price uint) (name (string-utf8 50)) (description (string-utf8 255)))
262+
(define-public (add-resource (name (string-utf8 50)) (description (string-utf8 255)) (price uint))
262263
(let
263264
(
264265
(newCount (+ (get-total-resources) u1))

0 commit comments

Comments
 (0)