-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated contract and traits in line with developments here stacksgov/…
…sips#52 and 51
- Loading branch information
1 parent
871e358
commit a3a770a
Showing
6 changed files
with
78 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(define-trait nft-operable-trait | ||
( | ||
;; set approval for an operator to handle a specified id or amount of the asset | ||
;; must return `(ok true)` on success, never `(ok false)` | ||
;; @param id-or-amount; identifier of NFT or amount of FTs | ||
;; @param operator: principal that wants top operate the asset | ||
;; @param bool: if true operator can transfer id or up to amount | ||
(set-approved (uint principal bool) (response bool uint)) | ||
|
||
;; read-only function to return the current status of given operator | ||
;; if returned `(ok true)` the operator can transfer the NFT with the given id or up to the requested amount of FT | ||
;; @param id-or-amount; identifier of NFT or amount of FTs | ||
;; @param operator: principal that wants to operate the asset | ||
;; @param bool: if true operator can transfer id or up to amount | ||
(is-approved (uint principal) (response bool uint)) | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters