mock-proposal-v2-c4
SP1MTYHV6K2FNH3QNF4P5QXS9VJ3XZ0GBB5T1SJPKSource Code
;; mock-proposal.clar
;; Test helper implementing proposal-trait
(define-data-var should-fail bool false)
(define-read-only (get-should-fail)
(var-get should-fail)
)
(define-public (set-should-fail (fail bool))
(begin
(var-set should-fail fail)
(ok true)
)
)
(define-public (execute (sender principal))
(begin
sender
(if (var-get should-fail)
(err u1)
(ok true)
)
)
)
Functions (3)
| Function | Access | Args |
|---|---|---|
| get-should-fail | read-only | |
| set-should-fail | public | fail: bool |
| execute | public | sender: principal |