File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
(define-trait stacks-m2m-trait-v1
2
2
(
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 ))
9
9
)
10
10
)
Original file line number Diff line number Diff line change 77
77
78
78
;; tracks resources added by deployer keyed by resource index
79
79
;; can iterate over full map with resourceCount data-var
80
+ ;; TODO: add string for URL / health checks? could it change?
80
81
(define-map ResourceData
81
82
uint ;; resource index
82
83
{
258
259
259
260
;; adds active resource that invoices can be generated for
260
261
;; 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 ))
262
263
(let
263
264
(
264
265
(newCount (+ (get-total-resources ) u1 ))
You can’t perform that action at this time.
0 commit comments