Skip to content

Commit

Permalink
Update royalty-policy-v1.pact
Browse files Browse the repository at this point in the history
Changed capability to ROTATE-ROYALTY
  • Loading branch information
daplcor committed May 17, 2024
1 parent cc47f83 commit 46f5017
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pact/concrete-policies/royalty-policy/royalty-policy-v1.pact
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
true
)

(defcap UPDATE-ROYALTY (token-id:string creator:string creator-guard:guard)
(defcap ROTATE-ROYALTY (token-id:string creator:string creator-guard:guard)
@doc "Update royalty information for token"
@event
(with-read royalties token-id {'creator-guard:=cg}
Expand All @@ -60,11 +60,10 @@

(defun rotate:string (token-id:string creator:string creator-guard:guard)
@doc "Rotates the royalty creator account and guard for the token"
(with-capability (UPDATE-ROYALTY token-id creator creator-guard)
(with-capability (ROTATE-ROYALTY token-id creator creator-guard)
(update royalties token-id {'creator:creator,
'creator-guard:creator-guard})
)
(emit-event (UPDATE-ROYALTY token-id creator creator-guard))
"Rotated creator and guard"
)

Expand Down

0 comments on commit 46f5017

Please sign in to comment.