Skip to content

Commit

Permalink
Merge pull request #9 from Trust-Machines/GRNT-1159
Browse files Browse the repository at this point in the history
fix L-03
  • Loading branch information
hackercf authored Dec 5, 2024
2 parents cd01e5b + 5093342 commit f63e6a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/pyth-governance-v1.clar
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
(define-constant ERR_UNAUTHORIZED_UPDATE (err u4006))
;; Error parsing PTGM
(define-constant ERR_INVALID_PTGM (err u4007))
;; Error not standard principal
(define-constant ERR_NOT_STANDARD_PRINCIPAL (err u4008))

(define-data-var governance-data-source
{ emitter-chain: uint, emitter-address: (buff 32) }
Expand Down Expand Up @@ -418,6 +420,7 @@
(cursor-principal-len (try! (contract-call? 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2 read-uint-8 (get next cursor-ptgm-body))))
(principal-bytes (contract-call? 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2 slice (get next cursor-principal-len) (some (get value cursor-principal-len))))
(new-principal (unwrap! (from-consensus-buff? principal principal-bytes) ERR_UNEXPECTED_ACTION_PAYLOAD)))
(asserts! (is-standard new-principal) ERR_NOT_STANDARD_PRINCIPAL)
(ok new-principal)))

(define-private (parse-and-verify-prices-data-sources (ptgm-body (buff 8192)))
Expand Down

0 comments on commit f63e6a0

Please sign in to comment.