diff --git a/contracts/pyth-governance-v1.clar b/contracts/pyth-governance-v1.clar index f62a939..4ac891c 100644 --- a/contracts/pyth-governance-v1.clar +++ b/contracts/pyth-governance-v1.clar @@ -46,12 +46,12 @@ (define-constant ERR_OUTDATED (err u4005)) ;; Error unauthorized update (define-constant ERR_UNAUTHORIZED_UPDATE (err u4006)) -;; Error parsing PGTM +;; Error parsing PTGM (define-constant ERR_INVALID_PTGM (err u4007)) (define-data-var governance-data-source { emitter-chain: uint, emitter-address: (buff 32) } - { emitter-chain: u0, emitter-address: 0x5635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b12e9e }) + { emitter-chain: u1, emitter-address: 0x5635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b12e9e }) (define-data-var prices-data-sources (list 255 { emitter-chain: uint, emitter-address: (buff 32) }) (list @@ -137,6 +137,8 @@ ;; Update fee-value (let ((updated-data (try! (parse-and-verify-fee-value (get body ptgm))))) (var-set fee-value updated-data) + ;; Emit event + (print { type: "fee-value", action: "updated", data: updated-data }) (ok updated-data)))) (define-public (update-stale-price-threshold (vaa-bytes (buff 8192)) (wormhole-core-contract )) @@ -152,6 +154,8 @@ ;; Update fee-value (let ((updated-data (try! (parse-and-verify-stale-price-threshold (get body ptgm))))) (var-set stale-price-threshold updated-data) + ;; Emit event + (print { type: "stale-price-threshold", action: "updated", data: updated-data }) (ok updated-data)))) (define-public (update-fee-recipient-address (vaa-bytes (buff 8192)) (wormhole-core-contract )) @@ -165,8 +169,10 @@ ;; Ensure that the lastest wormhole contract is used (try! (expect-active-wormhole-contract wormhole-core-contract expected-execution-plan)) ;; Update fee-recipient address - (let ((updated-data (unwrap! (from-consensus-buff? principal (get body ptgm)) ERR_UNEXPECTED_ACTION_PAYLOAD))) + (let ((updated-data (try! (parse-principal (get body ptgm))))) (var-set fee-recipient-address updated-data) + ;; Emit event + (print { type: "fee-recipient", action: "updated", data: updated-data }) (ok updated-data)))) (define-public (update-wormhole-core-contract (vaa-bytes (buff 8192)) (wormhole-core-contract )) @@ -180,8 +186,10 @@ ;; Ensure that the lastest wormhole contract is used (try! (expect-active-wormhole-contract wormhole-core-contract expected-execution-plan)) ;; Update execution plan - (let ((updated-data (unwrap! (from-consensus-buff? principal (get body ptgm)) ERR_UNEXPECTED_ACTION_PAYLOAD))) + (let ((updated-data (try! (parse-principal (get body ptgm))))) (var-set current-execution-plan (merge expected-execution-plan { wormhole-core-contract: updated-data })) + ;; Emit event + (print { type: "wormhole-core-contract", action: "updated", data: updated-data }) (ok (var-get current-execution-plan))))) (define-public (update-pyth-oracle-contract (vaa-bytes (buff 8192)) (wormhole-core-contract )) @@ -195,8 +203,10 @@ ;; Ensure that the lastest wormhole contract is used (try! (expect-active-wormhole-contract wormhole-core-contract expected-execution-plan)) ;; Update execution plan - (let ((updated-data (unwrap! (from-consensus-buff? principal (get body ptgm)) ERR_UNEXPECTED_ACTION_PAYLOAD))) + (let ((updated-data (try! (parse-principal (get body ptgm))))) (var-set current-execution-plan (merge expected-execution-plan { pyth-oracle-contract: updated-data })) + ;; Emit event + (print { type: "pyth-oracle-contract", action: "updated", data: updated-data }) (ok (var-get current-execution-plan))))) (define-public (update-pyth-decoder-contract (vaa-bytes (buff 8192)) (wormhole-core-contract )) @@ -210,8 +220,10 @@ ;; Ensure that the lastest wormhole contract is used (try! (expect-active-wormhole-contract wormhole-core-contract expected-execution-plan)) ;; Update execution plan - (let ((updated-data (unwrap! (from-consensus-buff? principal (get body ptgm)) ERR_UNEXPECTED_ACTION_PAYLOAD))) + (let ((updated-data (try! (parse-principal (get body ptgm))))) (var-set current-execution-plan (merge expected-execution-plan { pyth-decoder-contract: updated-data })) + ;; Emit event + (print { type: "pyth-decoder-contract", action: "updated", data: updated-data }) (ok (var-get current-execution-plan))))) (define-public (update-pyth-store-contract (vaa-bytes (buff 8192)) (wormhole-core-contract )) @@ -225,8 +237,10 @@ ;; Ensure that the lastest wormhole contract is used (try! (expect-active-wormhole-contract wormhole-core-contract expected-execution-plan)) ;; Update execution plan - (let ((updated-data (unwrap! (from-consensus-buff? principal (get body ptgm)) ERR_UNEXPECTED_ACTION_PAYLOAD))) + (let ((updated-data (try! (parse-principal (get body ptgm))))) (var-set current-execution-plan (merge expected-execution-plan { pyth-storage-contract: updated-data })) + ;; Emit event + (print { type: "pyth-storage-contract", action: "updated", data: updated-data }) (ok (var-get current-execution-plan))))) (define-public (update-prices-data-sources (vaa-bytes (buff 8192)) (wormhole-core-contract )) @@ -242,6 +256,8 @@ ;; Update prices-data-sources (let ((updated-data (try! (parse-and-verify-prices-data-sources (get body ptgm))))) (var-set prices-data-sources updated-data) + ;; Emit event + (print { type: "prices-data-sources", action: "updated", data: updated-data }) (ok updated-data)))) (define-public (update-governance-data-source (vaa-bytes (buff 8192)) (wormhole-core-contract )) @@ -257,6 +273,8 @@ ;; Update prices-data-sources (let ((updated-data (try! (parse-and-verify-governance-data-source (get body ptgm))))) (var-set governance-data-source updated-data) + ;; Emit event + (print { type: "governance-data-source", action: "updated", data: updated-data }) (ok updated-data)))) (define-private (check-update-source (emitter-chain uint) (emitter-address (buff 32))) @@ -387,10 +405,16 @@ emitter-address: (get value cursor-emitter-address) }))) +(define-private (parse-principal (ptgm-body (buff 8192))) + (let ((cursor-ptgm-body (contract-call? 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2 new ptgm-body none)) + (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))) + (ok new-principal))) -(define-private (parse-and-verify-prices-data-sources (pgtm-body (buff 8192))) - (let ((cursor-pgtm-body (contract-call? 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2 new pgtm-body none)) - (cursor-num-data-sources (try! (contract-call? 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2 read-uint-8 (get next cursor-pgtm-body)))) +(define-private (parse-and-verify-prices-data-sources (ptgm-body (buff 8192))) + (let ((cursor-ptgm-body (contract-call? 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2 new ptgm-body none)) + (cursor-num-data-sources (try! (contract-call? 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2 read-uint-8 (get next cursor-ptgm-body)))) (cursor-data-sources-bytes (contract-call? 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2 slice (get next cursor-num-data-sources) none)) (data-sources (get result (fold parse-data-source cursor-data-sources-bytes { result: (list), diff --git a/deployments/default.devnet-plan.yaml b/deployments/default.devnet-plan.yaml index 3885d3c..b903b4f 100644 --- a/deployments/default.devnet-plan.yaml +++ b/deployments/default.devnet-plan.yaml @@ -113,7 +113,7 @@ plan: method: update-guardians-set parameters: - 0x01000000020d00ce45474d9e1b1e7790a2d210871e195db53a70ffd6f237cfe70e2686a32859ac43c84a332267a8ef66f59719cf91cc8df0101fd7c36aa1878d5139241660edc0010375cc906156ae530786661c0cd9aef444747bc3d8d5aa84cac6a6d2933d4e1a031cffa30383d4af8131e929d9f203f460b07309a647d6cd32ab1cc7724089392c000452305156cfc90343128f97e499311b5cae174f488ff22fbc09591991a0a73d8e6af3afb8a5968441d3ab8437836407481739e9850ad5c95e6acfcc871e951bc30105a7956eefc23e7c945a1966d5ddbe9e4be376c2f54e45e3d5da88c2f8692510c7429b1ea860ae94d929bd97e84923a18187e777aa3db419813a80deb84cc8d22b00061b2a4f3d2666608e0aa96737689e3ba5793810ff3a52ff28ad57d8efb20967735dc5537a2e43ef10f583d144c12a1606542c207f5b79af08c38656d3ac40713301086b62c8e130af3411b3c0d91b5b50dcb01ed5f293963f901fc36e7b0e50114dce203373b32eb45971cef8288e5d928d0ed51cd86e2a3006b0af6a65c396c009080009e93ab4d2c8228901a5f4525934000b2c26d1dc679a05e47fdf0ff3231d98fbc207103159ff4116df2832eea69b38275283434e6cd4a4af04d25fa7a82990b707010aa643f4cf615dfff06ffd65830f7f6cf6512dabc3690d5d9e210fdc712842dc2708b8b2c22e224c99280cd25e5e8bfb40e3d1c55b8c41774e287c1e2c352aecfc010b89c1e85faa20a30601964ccc6a79c0ae53cfd26fb10863db37783428cd91390a163346558239db3cd9d420cfe423a0df84c84399790e2e308011b4b63e6b8015010ca31dcb564ac81a053a268d8090e72097f94f366711d0c5d13815af1ec7d47e662e2d1bde22678113d15963da100b668ba26c0c325970d07114b83c5698f46097010dc9fda39c0d592d9ed92cd22b5425cc6b37430e236f02d0d1f8a2ef45a00bde26223c0a6eb363c8b25fd3bf57234a1d9364976cefb8360e755a267cbbb674b39501108db01e444ab1003dd8b6c96f8eb77958b40ba7a85fefecf32ad00b7a47c0ae7524216262495977e09c0989dd50f280c21453d3756843608eacd17f4fdfe47600001261025228ef5af837cb060bcd986fcfa84ccef75b3fa100468cfd24e7fadf99163938f3b841a33496c2706d0208faab088bd155b2e20fd74c625bb1cc8c43677a0163c53c409e0c5dfa000100000000000000000000000000000000000000000000000000000000000000046c5a054d7833d1e42000000000000000000000000000000000000000000000000000000000436f7265020000000000031358cc3ae5c097b213ce3c81979e1b9f9570746aa5ff6cb952589bde862c25ef4392132fb9d4a42157114de8460193bdf3a2fcf81f86a09765f4762fd1107a0086b32d7a0977926a205131d8731d39cbeb8c82b2fd82faed2711d59af0f2499d16e726f6b211b39756c042441be6d8650b69b54ebe715e234354ce5b4d348fb74b958e8966e2ec3dbd4958a7cd15e7caf07c4e3dc8e7c469f92c8cd88fb8005a2074a3bf913953d695260d88bc1aa25a4eee363ef0000ac0076727b35fbea2dac28fee5ccb0fea768eaf45ced136b9d9e24903464ae889f5c8a723fc14f93124b7c738843cbb89e864c862c38cddcccf95d2cc37a4dc036a8d232b48f62cdd4731412f4890da798f6896a3331f64b48c12d1d57fd9cbe7081171aa1be1d36cafe3867910f99c09e347899c19c38192b6e7387ccd768277c17dab1b7a5027c0b3cf178e21ad2e77ae06711549cfbb1f9c7a9d8096e85e1487f35515d02a92753504a8d75471b9f49edb6fbebc898f403e4773e95feb15e80c9a99c8348d - - '(list 0x2a953a2e8b1052eb70c1d7b556b087deed598b55608396686c1c811b9796c763078687ce10459f4f25fb7a0fbf8727bb0fb51e00820e93a123f652ee843cf08d 0x2766db08820e311b22e109801ab8ea505b12e3df3d91ebc87c999ffb6929d1abb0ade987c74aa37db26eea4086ee738a2f34a5594edb8760da0eac5be356b731 0x54177ff4a8329520b76efd86f8bfce5c942554db16e673267dc1133b3f5e230b2d8cbf90fe274946045d4491de288d736680edc2ee9ee5b1b15416b0a34806c4 0x7fa3e98fcc2621337b217b61408a98facaabd25bad2b158438728ce863c14708cfcda1f3b50a16ca0211199079fb338d479a54546ec3c5f775af23a7d7f4fb24 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 0x 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab 0xb5943b6e284682ad2e011d6962d41febf86af2f5fc0c9c8f4b81358ff077f9c96ba0880eaf93541eae94b4fa41dba66dab7fb0201cc9af7c75681e5719b0c95f 0x0cfc9d5b5dcf702a1525f9d4ed1841e8eb8b34434cc82470dd35435f1dbdc73ffb51544b7500394eac9c7fa567868b495326075147a2d809ebbfd43273eeec91 0x0aa78894d894a15933969f5826347439e2c309f2049277a10066c9197840499498ad19ee3d1b291f932ec0890bbdafcec292c4f02a446670cd0084f997e25e2f 0x00f400e3fe40f64032485aad9240ead45a8e1fc83ec08c96db861c0eca155ac898df8673e778e3ccaae8a0f9e6af415fe40e99b0cbc88d7610e536b6041b07fb 0x604f384174c7ed3a0dc5f476569a978266a7943bd775449d1b8b27f4eb8beb99cdf095f9200a2dabb1bc5d68c3d96ea3d47f4d34499d59953669b6c8c093d578 0x4881345cbb299fa7c60ab2d16cb7fe7bf8d14675506ef6eb6037038b5b7092ea0a9e4d0b53ba3904edd99f86717d6ba81dffe44eb5b23c6fd22c91ab73c33021 0xee3d4cc17633afe7e1794fcfd728e0643325e3d130eb1daa39c0c5cb05a200b43876117a182cabdcc3795632aa529473a0c8245f9e4f6e43e54c3f1da28bcb82 0x21f338444e96af31cf44958acf5764844efbddace3b823ed761c340c59ed2685d829818c83eebe8f00f783f1048a53515845536668a9e0c059ade7579a0f4204)' + - '(list 0x2a953a2e8b1052eb70c1d7b556b087deed598b55608396686c1c811b9796c763078687ce10459f4f25fb7a0fbf8727bb0fb51e00820e93a123f652ee843cf08d 0x2766db08820e311b22e109801ab8ea505b12e3df3d91ebc87c999ffb6929d1abb0ade987c74aa37db26eea4086ee738a2f34a5594edb8760da0eac5be356b731 0x54177ff4a8329520b76efd86f8bfce5c942554db16e673267dc1133b3f5e230b2d8cbf90fe274946045d4491de288d736680edc2ee9ee5b1b15416b0a34806c4 0x7fa3e98fcc2621337b217b61408a98facaabd25bad2b158438728ce863c14708cfcda1f3b50a16ca0211199079fb338d479a54546ec3c5f775af23a7d7f4fb24 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 0x47b15c5039dcb2850b59bea323db662cc597dd7d48fe6b8dbb6cd8704c45854bf0e92fa267c844ba1a700105e157c8099d55c82316cb5e50c56a5d0920ff91c2 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab 0xb5943b6e284682ad2e011d6962d41febf86af2f5fc0c9c8f4b81358ff077f9c96ba0880eaf93541eae94b4fa41dba66dab7fb0201cc9af7c75681e5719b0c95f 0x0cfc9d5b5dcf702a1525f9d4ed1841e8eb8b34434cc82470dd35435f1dbdc73ffb51544b7500394eac9c7fa567868b495326075147a2d809ebbfd43273eeec91 0x0aa78894d894a15933969f5826347439e2c309f2049277a10066c9197840499498ad19ee3d1b291f932ec0890bbdafcec292c4f02a446670cd0084f997e25e2f 0x00f400e3fe40f64032485aad9240ead45a8e1fc83ec08c96db861c0eca155ac898df8673e778e3ccaae8a0f9e6af415fe40e99b0cbc88d7610e536b6041b07fb 0x604f384174c7ed3a0dc5f476569a978266a7943bd775449d1b8b27f4eb8beb99cdf095f9200a2dabb1bc5d68c3d96ea3d47f4d34499d59953669b6c8c093d578 0x4881345cbb299fa7c60ab2d16cb7fe7bf8d14675506ef6eb6037038b5b7092ea0a9e4d0b53ba3904edd99f86717d6ba81dffe44eb5b23c6fd22c91ab73c33021 0xee3d4cc17633afe7e1794fcfd728e0643325e3d130eb1daa39c0c5cb05a200b43876117a182cabdcc3795632aa529473a0c8245f9e4f6e43e54c3f1da28bcb82 0x21f338444e96af31cf44958acf5764844efbddace3b823ed761c340c59ed2685d829818c83eebe8f00f783f1048a53515845536668a9e0c059ade7579a0f4204)' cost: 5960 - contract-call: contract-id: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.pyth-helper-v1 diff --git a/deployments/default.mainnet-plan.yaml b/deployments/default.mainnet-plan.yaml index 11b78b5..9b23be0 100644 --- a/deployments/default.mainnet-plan.yaml +++ b/deployments/default.mainnet-plan.yaml @@ -89,6 +89,6 @@ plan: method: update-guardians-set parameters: - 0x01000000020d00ce45474d9e1b1e7790a2d210871e195db53a70ffd6f237cfe70e2686a32859ac43c84a332267a8ef66f59719cf91cc8df0101fd7c36aa1878d5139241660edc0010375cc906156ae530786661c0cd9aef444747bc3d8d5aa84cac6a6d2933d4e1a031cffa30383d4af8131e929d9f203f460b07309a647d6cd32ab1cc7724089392c000452305156cfc90343128f97e499311b5cae174f488ff22fbc09591991a0a73d8e6af3afb8a5968441d3ab8437836407481739e9850ad5c95e6acfcc871e951bc30105a7956eefc23e7c945a1966d5ddbe9e4be376c2f54e45e3d5da88c2f8692510c7429b1ea860ae94d929bd97e84923a18187e777aa3db419813a80deb84cc8d22b00061b2a4f3d2666608e0aa96737689e3ba5793810ff3a52ff28ad57d8efb20967735dc5537a2e43ef10f583d144c12a1606542c207f5b79af08c38656d3ac40713301086b62c8e130af3411b3c0d91b5b50dcb01ed5f293963f901fc36e7b0e50114dce203373b32eb45971cef8288e5d928d0ed51cd86e2a3006b0af6a65c396c009080009e93ab4d2c8228901a5f4525934000b2c26d1dc679a05e47fdf0ff3231d98fbc207103159ff4116df2832eea69b38275283434e6cd4a4af04d25fa7a82990b707010aa643f4cf615dfff06ffd65830f7f6cf6512dabc3690d5d9e210fdc712842dc2708b8b2c22e224c99280cd25e5e8bfb40e3d1c55b8c41774e287c1e2c352aecfc010b89c1e85faa20a30601964ccc6a79c0ae53cfd26fb10863db37783428cd91390a163346558239db3cd9d420cfe423a0df84c84399790e2e308011b4b63e6b8015010ca31dcb564ac81a053a268d8090e72097f94f366711d0c5d13815af1ec7d47e662e2d1bde22678113d15963da100b668ba26c0c325970d07114b83c5698f46097010dc9fda39c0d592d9ed92cd22b5425cc6b37430e236f02d0d1f8a2ef45a00bde26223c0a6eb363c8b25fd3bf57234a1d9364976cefb8360e755a267cbbb674b39501108db01e444ab1003dd8b6c96f8eb77958b40ba7a85fefecf32ad00b7a47c0ae7524216262495977e09c0989dd50f280c21453d3756843608eacd17f4fdfe47600001261025228ef5af837cb060bcd986fcfa84ccef75b3fa100468cfd24e7fadf99163938f3b841a33496c2706d0208faab088bd155b2e20fd74c625bb1cc8c43677a0163c53c409e0c5dfa000100000000000000000000000000000000000000000000000000000000000000046c5a054d7833d1e42000000000000000000000000000000000000000000000000000000000436f7265020000000000031358cc3ae5c097b213ce3c81979e1b9f9570746aa5ff6cb952589bde862c25ef4392132fb9d4a42157114de8460193bdf3a2fcf81f86a09765f4762fd1107a0086b32d7a0977926a205131d8731d39cbeb8c82b2fd82faed2711d59af0f2499d16e726f6b211b39756c042441be6d8650b69b54ebe715e234354ce5b4d348fb74b958e8966e2ec3dbd4958a7cd15e7caf07c4e3dc8e7c469f92c8cd88fb8005a2074a3bf913953d695260d88bc1aa25a4eee363ef0000ac0076727b35fbea2dac28fee5ccb0fea768eaf45ced136b9d9e24903464ae889f5c8a723fc14f93124b7c738843cbb89e864c862c38cddcccf95d2cc37a4dc036a8d232b48f62cdd4731412f4890da798f6896a3331f64b48c12d1d57fd9cbe7081171aa1be1d36cafe3867910f99c09e347899c19c38192b6e7387ccd768277c17dab1b7a5027c0b3cf178e21ad2e77ae06711549cfbb1f9c7a9d8096e85e1487f35515d02a92753504a8d75471b9f49edb6fbebc898f403e4773e95feb15e80c9a99c8348d - - '(list 0x2a953a2e8b1052eb70c1d7b556b087deed598b55608396686c1c811b9796c763078687ce10459f4f25fb7a0fbf8727bb0fb51e00820e93a123f652ee843cf08d 0x2766db08820e311b22e109801ab8ea505b12e3df3d91ebc87c999ffb6929d1abb0ade987c74aa37db26eea4086ee738a2f34a5594edb8760da0eac5be356b731 0x54177ff4a8329520b76efd86f8bfce5c942554db16e673267dc1133b3f5e230b2d8cbf90fe274946045d4491de288d736680edc2ee9ee5b1b15416b0a34806c4 0x7fa3e98fcc2621337b217b61408a98facaabd25bad2b158438728ce863c14708cfcda1f3b50a16ca0211199079fb338d479a54546ec3c5f775af23a7d7f4fb24 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 0x 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab 0xb5943b6e284682ad2e011d6962d41febf86af2f5fc0c9c8f4b81358ff077f9c96ba0880eaf93541eae94b4fa41dba66dab7fb0201cc9af7c75681e5719b0c95f 0x0cfc9d5b5dcf702a1525f9d4ed1841e8eb8b34434cc82470dd35435f1dbdc73ffb51544b7500394eac9c7fa567868b495326075147a2d809ebbfd43273eeec91 0x0aa78894d894a15933969f5826347439e2c309f2049277a10066c9197840499498ad19ee3d1b291f932ec0890bbdafcec292c4f02a446670cd0084f997e25e2f 0x00f400e3fe40f64032485aad9240ead45a8e1fc83ec08c96db861c0eca155ac898df8673e778e3ccaae8a0f9e6af415fe40e99b0cbc88d7610e536b6041b07fb 0x604f384174c7ed3a0dc5f476569a978266a7943bd775449d1b8b27f4eb8beb99cdf095f9200a2dabb1bc5d68c3d96ea3d47f4d34499d59953669b6c8c093d578 0x4881345cbb299fa7c60ab2d16cb7fe7bf8d14675506ef6eb6037038b5b7092ea0a9e4d0b53ba3904edd99f86717d6ba81dffe44eb5b23c6fd22c91ab73c33021 0xee3d4cc17633afe7e1794fcfd728e0643325e3d130eb1daa39c0c5cb05a200b43876117a182cabdcc3795632aa529473a0c8245f9e4f6e43e54c3f1da28bcb82 0x21f338444e96af31cf44958acf5764844efbddace3b823ed761c340c59ed2685d829818c83eebe8f00f783f1048a53515845536668a9e0c059ade7579a0f4204)' + - '(list 0x2a953a2e8b1052eb70c1d7b556b087deed598b55608396686c1c811b9796c763078687ce10459f4f25fb7a0fbf8727bb0fb51e00820e93a123f652ee843cf08d 0x2766db08820e311b22e109801ab8ea505b12e3df3d91ebc87c999ffb6929d1abb0ade987c74aa37db26eea4086ee738a2f34a5594edb8760da0eac5be356b731 0x54177ff4a8329520b76efd86f8bfce5c942554db16e673267dc1133b3f5e230b2d8cbf90fe274946045d4491de288d736680edc2ee9ee5b1b15416b0a34806c4 0x7fa3e98fcc2621337b217b61408a98facaabd25bad2b158438728ce863c14708cfcda1f3b50a16ca0211199079fb338d479a54546ec3c5f775af23a7d7f4fb24 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 0x47b15c5039dcb2850b59bea323db662cc597dd7d48fe6b8dbb6cd8704c45854bf0e92fa267c844ba1a700105e157c8099d55c82316cb5e50c56a5d0920ff91c2 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab 0xb5943b6e284682ad2e011d6962d41febf86af2f5fc0c9c8f4b81358ff077f9c96ba0880eaf93541eae94b4fa41dba66dab7fb0201cc9af7c75681e5719b0c95f 0x0cfc9d5b5dcf702a1525f9d4ed1841e8eb8b34434cc82470dd35435f1dbdc73ffb51544b7500394eac9c7fa567868b495326075147a2d809ebbfd43273eeec91 0x0aa78894d894a15933969f5826347439e2c309f2049277a10066c9197840499498ad19ee3d1b291f932ec0890bbdafcec292c4f02a446670cd0084f997e25e2f 0x00f400e3fe40f64032485aad9240ead45a8e1fc83ec08c96db861c0eca155ac898df8673e778e3ccaae8a0f9e6af415fe40e99b0cbc88d7610e536b6041b07fb 0x604f384174c7ed3a0dc5f476569a978266a7943bd775449d1b8b27f4eb8beb99cdf095f9200a2dabb1bc5d68c3d96ea3d47f4d34499d59953669b6c8c093d578 0x4881345cbb299fa7c60ab2d16cb7fe7bf8d14675506ef6eb6037038b5b7092ea0a9e4d0b53ba3904edd99f86717d6ba81dffe44eb5b23c6fd22c91ab73c33021 0xee3d4cc17633afe7e1794fcfd728e0643325e3d130eb1daa39c0c5cb05a200b43876117a182cabdcc3795632aa529473a0c8245f9e4f6e43e54c3f1da28bcb82 0x21f338444e96af31cf44958acf5764844efbddace3b823ed761c340c59ed2685d829818c83eebe8f00f783f1048a53515845536668a9e0c059ade7579a0f4204)' cost: 1000000 epoch: "2.4" diff --git a/deployments/default.testnet-plan.yaml b/deployments/default.testnet-plan.yaml index b1c4e9c..0e8b6aa 100644 --- a/deployments/default.testnet-plan.yaml +++ b/deployments/default.testnet-plan.yaml @@ -113,7 +113,7 @@ plan: method: update-guardians-set parameters: - 0x01000000020d00ce45474d9e1b1e7790a2d210871e195db53a70ffd6f237cfe70e2686a32859ac43c84a332267a8ef66f59719cf91cc8df0101fd7c36aa1878d5139241660edc0010375cc906156ae530786661c0cd9aef444747bc3d8d5aa84cac6a6d2933d4e1a031cffa30383d4af8131e929d9f203f460b07309a647d6cd32ab1cc7724089392c000452305156cfc90343128f97e499311b5cae174f488ff22fbc09591991a0a73d8e6af3afb8a5968441d3ab8437836407481739e9850ad5c95e6acfcc871e951bc30105a7956eefc23e7c945a1966d5ddbe9e4be376c2f54e45e3d5da88c2f8692510c7429b1ea860ae94d929bd97e84923a18187e777aa3db419813a80deb84cc8d22b00061b2a4f3d2666608e0aa96737689e3ba5793810ff3a52ff28ad57d8efb20967735dc5537a2e43ef10f583d144c12a1606542c207f5b79af08c38656d3ac40713301086b62c8e130af3411b3c0d91b5b50dcb01ed5f293963f901fc36e7b0e50114dce203373b32eb45971cef8288e5d928d0ed51cd86e2a3006b0af6a65c396c009080009e93ab4d2c8228901a5f4525934000b2c26d1dc679a05e47fdf0ff3231d98fbc207103159ff4116df2832eea69b38275283434e6cd4a4af04d25fa7a82990b707010aa643f4cf615dfff06ffd65830f7f6cf6512dabc3690d5d9e210fdc712842dc2708b8b2c22e224c99280cd25e5e8bfb40e3d1c55b8c41774e287c1e2c352aecfc010b89c1e85faa20a30601964ccc6a79c0ae53cfd26fb10863db37783428cd91390a163346558239db3cd9d420cfe423a0df84c84399790e2e308011b4b63e6b8015010ca31dcb564ac81a053a268d8090e72097f94f366711d0c5d13815af1ec7d47e662e2d1bde22678113d15963da100b668ba26c0c325970d07114b83c5698f46097010dc9fda39c0d592d9ed92cd22b5425cc6b37430e236f02d0d1f8a2ef45a00bde26223c0a6eb363c8b25fd3bf57234a1d9364976cefb8360e755a267cbbb674b39501108db01e444ab1003dd8b6c96f8eb77958b40ba7a85fefecf32ad00b7a47c0ae7524216262495977e09c0989dd50f280c21453d3756843608eacd17f4fdfe47600001261025228ef5af837cb060bcd986fcfa84ccef75b3fa100468cfd24e7fadf99163938f3b841a33496c2706d0208faab088bd155b2e20fd74c625bb1cc8c43677a0163c53c409e0c5dfa000100000000000000000000000000000000000000000000000000000000000000046c5a054d7833d1e42000000000000000000000000000000000000000000000000000000000436f7265020000000000031358cc3ae5c097b213ce3c81979e1b9f9570746aa5ff6cb952589bde862c25ef4392132fb9d4a42157114de8460193bdf3a2fcf81f86a09765f4762fd1107a0086b32d7a0977926a205131d8731d39cbeb8c82b2fd82faed2711d59af0f2499d16e726f6b211b39756c042441be6d8650b69b54ebe715e234354ce5b4d348fb74b958e8966e2ec3dbd4958a7cd15e7caf07c4e3dc8e7c469f92c8cd88fb8005a2074a3bf913953d695260d88bc1aa25a4eee363ef0000ac0076727b35fbea2dac28fee5ccb0fea768eaf45ced136b9d9e24903464ae889f5c8a723fc14f93124b7c738843cbb89e864c862c38cddcccf95d2cc37a4dc036a8d232b48f62cdd4731412f4890da798f6896a3331f64b48c12d1d57fd9cbe7081171aa1be1d36cafe3867910f99c09e347899c19c38192b6e7387ccd768277c17dab1b7a5027c0b3cf178e21ad2e77ae06711549cfbb1f9c7a9d8096e85e1487f35515d02a92753504a8d75471b9f49edb6fbebc898f403e4773e95feb15e80c9a99c8348d - - '(list 0x2a953a2e8b1052eb70c1d7b556b087deed598b55608396686c1c811b9796c763078687ce10459f4f25fb7a0fbf8727bb0fb51e00820e93a123f652ee843cf08d 0x2766db08820e311b22e109801ab8ea505b12e3df3d91ebc87c999ffb6929d1abb0ade987c74aa37db26eea4086ee738a2f34a5594edb8760da0eac5be356b731 0x54177ff4a8329520b76efd86f8bfce5c942554db16e673267dc1133b3f5e230b2d8cbf90fe274946045d4491de288d736680edc2ee9ee5b1b15416b0a34806c4 0x7fa3e98fcc2621337b217b61408a98facaabd25bad2b158438728ce863c14708cfcda1f3b50a16ca0211199079fb338d479a54546ec3c5f775af23a7d7f4fb24 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 0x 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab 0xb5943b6e284682ad2e011d6962d41febf86af2f5fc0c9c8f4b81358ff077f9c96ba0880eaf93541eae94b4fa41dba66dab7fb0201cc9af7c75681e5719b0c95f 0x0cfc9d5b5dcf702a1525f9d4ed1841e8eb8b34434cc82470dd35435f1dbdc73ffb51544b7500394eac9c7fa567868b495326075147a2d809ebbfd43273eeec91 0x0aa78894d894a15933969f5826347439e2c309f2049277a10066c9197840499498ad19ee3d1b291f932ec0890bbdafcec292c4f02a446670cd0084f997e25e2f 0x00f400e3fe40f64032485aad9240ead45a8e1fc83ec08c96db861c0eca155ac898df8673e778e3ccaae8a0f9e6af415fe40e99b0cbc88d7610e536b6041b07fb 0x604f384174c7ed3a0dc5f476569a978266a7943bd775449d1b8b27f4eb8beb99cdf095f9200a2dabb1bc5d68c3d96ea3d47f4d34499d59953669b6c8c093d578 0x4881345cbb299fa7c60ab2d16cb7fe7bf8d14675506ef6eb6037038b5b7092ea0a9e4d0b53ba3904edd99f86717d6ba81dffe44eb5b23c6fd22c91ab73c33021 0xee3d4cc17633afe7e1794fcfd728e0643325e3d130eb1daa39c0c5cb05a200b43876117a182cabdcc3795632aa529473a0c8245f9e4f6e43e54c3f1da28bcb82 0x21f338444e96af31cf44958acf5764844efbddace3b823ed761c340c59ed2685d829818c83eebe8f00f783f1048a53515845536668a9e0c059ade7579a0f4204)' + - '(list 0x2a953a2e8b1052eb70c1d7b556b087deed598b55608396686c1c811b9796c763078687ce10459f4f25fb7a0fbf8727bb0fb51e00820e93a123f652ee843cf08d 0x2766db08820e311b22e109801ab8ea505b12e3df3d91ebc87c999ffb6929d1abb0ade987c74aa37db26eea4086ee738a2f34a5594edb8760da0eac5be356b731 0x54177ff4a8329520b76efd86f8bfce5c942554db16e673267dc1133b3f5e230b2d8cbf90fe274946045d4491de288d736680edc2ee9ee5b1b15416b0a34806c4 0x7fa3e98fcc2621337b217b61408a98facaabd25bad2b158438728ce863c14708cfcda1f3b50a16ca0211199079fb338d479a54546ec3c5f775af23a7d7f4fb24 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 0x47b15c5039dcb2850b59bea323db662cc597dd7d48fe6b8dbb6cd8704c45854bf0e92fa267c844ba1a700105e157c8099d55c82316cb5e50c56a5d0920ff91c2 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab 0xb5943b6e284682ad2e011d6962d41febf86af2f5fc0c9c8f4b81358ff077f9c96ba0880eaf93541eae94b4fa41dba66dab7fb0201cc9af7c75681e5719b0c95f 0x0cfc9d5b5dcf702a1525f9d4ed1841e8eb8b34434cc82470dd35435f1dbdc73ffb51544b7500394eac9c7fa567868b495326075147a2d809ebbfd43273eeec91 0x0aa78894d894a15933969f5826347439e2c309f2049277a10066c9197840499498ad19ee3d1b291f932ec0890bbdafcec292c4f02a446670cd0084f997e25e2f 0x00f400e3fe40f64032485aad9240ead45a8e1fc83ec08c96db861c0eca155ac898df8673e778e3ccaae8a0f9e6af415fe40e99b0cbc88d7610e536b6041b07fb 0x604f384174c7ed3a0dc5f476569a978266a7943bd775449d1b8b27f4eb8beb99cdf095f9200a2dabb1bc5d68c3d96ea3d47f4d34499d59953669b6c8c093d578 0x4881345cbb299fa7c60ab2d16cb7fe7bf8d14675506ef6eb6037038b5b7092ea0a9e4d0b53ba3904edd99f86717d6ba81dffe44eb5b23c6fd22c91ab73c33021 0xee3d4cc17633afe7e1794fcfd728e0643325e3d130eb1daa39c0c5cb05a200b43876117a182cabdcc3795632aa529473a0c8245f9e4f6e43e54c3f1da28bcb82 0x21f338444e96af31cf44958acf5764844efbddace3b823ed761c340c59ed2685d829818c83eebe8f00f783f1048a53515845536668a9e0c059ade7579a0f4204)' cost: 1000000 - contract-call: contract-id: ST3XVPDNZJ9QN0KJ327SYPKP6YS15PHJRBKWXTZ3M.pyth-helper-v1 diff --git a/deployments/utils/update-guardians.mainnet-plan.yaml b/deployments/utils/update-guardians.mainnet-plan.yaml index 5398455..b54a282 100644 --- a/deployments/utils/update-guardians.mainnet-plan.yaml +++ b/deployments/utils/update-guardians.mainnet-plan.yaml @@ -81,7 +81,7 @@ plan: 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2, # 4: Inotel 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965, # 5: HashQuark 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417, # 6: ChainLayer - 0x, # 7: xLabs + 0x47b15c5039dcb2850b59bea323db662cc597dd7d48fe6b8dbb6cd8704c45854bf0e92fa267c844ba1a700105e157c8099d55c82316cb5e50c56a5d0920ff91c2, # 7: xLabs 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033, # 8: Forbole 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f, # 9: StakingFund 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab, # 10: MoonletWallet diff --git a/deployments/v1/default.mainnet-plan.yaml b/deployments/v1/default.mainnet-plan.yaml index b6f730f..f35e8c4 100644 --- a/deployments/v1/default.mainnet-plan.yaml +++ b/deployments/v1/default.mainnet-plan.yaml @@ -141,7 +141,7 @@ plan: 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 - 0x + 0x47b15c5039dcb2850b59bea323db662cc597dd7d48fe6b8dbb6cd8704c45854bf0e92fa267c844ba1a700105e157c8099d55c82316cb5e50c56a5d0920ff91c2 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab diff --git a/deployments/v1/default.testnet-plan.yaml b/deployments/v1/default.testnet-plan.yaml index be0f69e..2cbf5d6 100644 --- a/deployments/v1/default.testnet-plan.yaml +++ b/deployments/v1/default.testnet-plan.yaml @@ -165,7 +165,7 @@ plan: 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 - 0x + 0x47b15c5039dcb2850b59bea323db662cc597dd7d48fe6b8dbb6cd8704c45854bf0e92fa267c844ba1a700105e157c8099d55c82316cb5e50c56a5d0920ff91c2 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab diff --git a/example/cbtc/deployments/default.devnet-plan.yaml b/example/cbtc/deployments/default.devnet-plan.yaml index b10f9b1..c78e93d 100644 --- a/example/cbtc/deployments/default.devnet-plan.yaml +++ b/example/cbtc/deployments/default.devnet-plan.yaml @@ -135,7 +135,7 @@ plan: 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 - 0x + 0x47b15c5039dcb2850b59bea323db662cc597dd7d48fe6b8dbb6cd8704c45854bf0e92fa267c844ba1a700105e157c8099d55c82316cb5e50c56a5d0920ff91c2 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab diff --git a/example/cbtc/deployments/default.simnet-plan.yaml b/example/cbtc/deployments/default.simnet-plan.yaml index ec008dc..0bee038 100644 --- a/example/cbtc/deployments/default.simnet-plan.yaml +++ b/example/cbtc/deployments/default.simnet-plan.yaml @@ -190,7 +190,7 @@ plan: 0x0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2 0xcfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965 0x8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417 - 0x + 0x47b15c5039dcb2850b59bea323db662cc597dd7d48fe6b8dbb6cd8704c45854bf0e92fa267c844ba1a700105e157c8099d55c82316cb5e50c56a5d0920ff91c2 0xd5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033 0xd9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f 0xcc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab diff --git a/unit-tests/pyth/fixtures.ts b/unit-tests/pyth/fixtures.ts index 235a8ed..1daba9d 100644 --- a/unit-tests/pyth/fixtures.ts +++ b/unit-tests/pyth/fixtures.ts @@ -25,3 +25,11 @@ export const p2whTestnetVaas = [ export const pnauMainnetVaas = [ "504e41550100000003b801000000030d002c9e33a703a8c86012c117474849ae41118270cf56e2db61c7af28f64ce322391d33cb738930dc3ffcfe5ae35dbd99c4e08a8ac4b390c858d94dc1f0b91e24d00101901948561c54c17b7a21a9885d3f60a85b410e18209b02ebe098b0dd422b02667565e3b5011203303a6445cf629d20cec3d4771f0b391ab03bfd54364ac049f70002a030ed0060f1ba123ddf5473bef4c1c8f4aec8737b47f11023f94d5339b72c4c3aa325515956ea702537a3950d74f86134396de437bfc97a5365fc090dbb382c0103f1f64ba806fe8ba7b7db3846d85fccbe7d803865e7b757301f4a5de6ebde40f923ee925a7df78871d39299d70fd117635263b91fe53f792bfff450d210431316000439e31501d7b661a1b075a9302b57a6fc500c1e760de7e949e30994055b061b280cefcab3eb3b5c780f56cd555e88ee3c674b798ddeb8713bd27a361b8b8f1c730008db908c61e4158d1a7a7d53b2ec14027a4a2b2f3207edf0db2fbb0f431f3cdc020ee9fc9f38e812d094dcf5dd18f3a8d1d1ee94e840f504b00e08d0fbd607ed6d0109cf5c52aed9f4a42691c3c33bc366fde4a3ad23aacdd46c14669ad321106cf8d257b9379fc45cbe91a26ee87f4800951c5ca89ff0069e4a47299f988b368c6b74000b1241dea623dd874e13135682d760ee48ac1888149bddcfac54ff3787f4b89629063d89e084350ff1168999365918f9bdf469323b817a25491e56341a0da5c498000d538baecc668df092ce3cfeebfa5968447584916cb503ce50e7f77443bbd2a3441bb1d962a7f3401bfcf30f444a3301ab72dcb87cc04b681bdada93d45001f53d010e2fd97eeac94ceb3fd87a6e4ab3b785c64db221d522e58230a6d9eb10cba3b53a086ba6989e4285ab0816a26ff64c1a3a05175d0ffa61f4f744f928d6c5b3f92600107f999fa2f5cd826520cdf36f2e3434f4619eca4c2fb944bdec79d84903f76aaa02727844ec451378ab165910140c866ebdc65aea2cc6717da4747d4ed8a7338700115ce8f97f4a39ccdf5a61c9425d8a306a35b598db9d0f936bece6f2d92e79f9b1306d4c4789fb73ba5bd29bf0d306f2e8079aae818bc70aa9db111b745f1f4ab900126933d7f1317e3e45d98687e66ae033d871e1026e92f1ad168ec197a92ad653571837b78ee8e2263f2aca1dfa112fc78de63de9e2231f62ab79db2d956704146c0165131de200000000001ae101faedac5851e32b9b23b5f9411a8c2bac4aae3ed4dd7b811dd1a72ea4aa710000000000df92280141555756000000000005e1b46c00002710dbdd79b598d499596393b24358343774fd54e63c01005500ec7a775f46379b5e943c3526b1c8d54cd49749176b0b98e02dde68d1bd335c170000000002bf687c00000000000091effffffff80000000065131de10000000065131de00000000002c073dc0000000000008d5f09014cff5b7c5413efc667d2bca5549edadde5324814fed82e330d4110d610f5d0325deddb5541eacccd70da0a613768335768226657b201a456613163b0b4a21cf17276c2be6d02280ff05d08a6d4cf481c00c544f4adff1c86c6845a21871b75b4cffdc9314a2b46bddcb2bd44861fa48d4cc429a0783cb122a3eda67b7a13ad6298995c3bddd6cfa1ba547ddd38f0da18fcb0f7ead4d1de56db6c0442b94883a78f40b3541982a58d2d400dbfb761cce7bf780c", ]; + +export const ptgmTestnetVaas = [ + "01000000030d0022d33714c7bca17f783710d1bda8b139beb78b940ea8bff1e12dccb05ec4d2a53dfff899ef41eee54b4c4539dd47a7510d2ab3984e1c27d987634789492ecd4c000271d46e78487d2d73a530a94056022cb92efc1bda8e3b688f14adbcd05ffc49b85924413e753aa3909b77ed8e7e18491399e5898d865c633303e2d8fbfba7de290106e60b51958831b91996a4a263acb59d172ce2ebbd9bb02719b9b4b2a4cab15a006156f182f764d0539971c403e74602d4417a3ea52007c03fc01f5eae9a4f57ce000719082a4f9bb48a787a05c1fd907b890aeea111f2d2a273b4892b9e51194450e230089e18ae76505aa59c93df5c46690ebfd1aed901486357f89ed9a10161106d00085706f3c17926d4fedda678e5c26b6530fb89f3f66bd618ec4863e6d155072ff871f101a29ac2e73dabbae8c119903198635429fc38b02acacacfedd1c214bd0f0109ea0b0f5e6d8c1c5295b0d679e6e66a603980efe8ed8c789b8abff0b87d62581975cddc7a964364313163c14f0763908739146be9c16ed539e48248a2137ce4a4000b4f6a21bd5e6117dd545645e9da6669e164b69afd1120b5be86cf713301d17d064e8a851833ec329ee178310010028819d5fb675937a8c5a99bcfc3365b74c8ca010dc34180b01424277bec5e972ae867d20a3ff53a6792f622fdfb15a8117473fd71782a86d076c6bde1ba5b4d306dc16e765992e56d80e44fa9362b7e08929b73f4010e039159c6ba738f177d2d9201bc015db04aed4307166915b4e64c272c34984edd3baa3dc8c0c4d6f2916771efbf4372ab53c500e9e5b884dadfc6148a264482cc000f7b6706a24044091c02375ee6106cb2e1d1afbc724ef441759afaf32af4b566666c0cd6e65e732b823aeaf465f6b6c1c93046bc68cb755a2bd9503556a3b58d2c01106662dfa46d1b28ff59794759a884f004d811caa58efd96fdb0039e6938c823980c8dd06892a0e2ba39d1354cc5442d2d819b3e8ce4cf31bf3f4b072b3946a5e80111cc8eb84417132ffdd414bcfd513ae090315317e7ee20c212cb17e9f7c4438764534600bfabc6f8d6b9ea5a43e935e820c78c40cafb973cea0a2922b3a7c7c5c701124d78e295aa1600e8314c4d28ff42d16d289749b5ebf1e52fcf6b3110fe6cd883468f6c38c54d90fad6ee3cb13ef349d992ad68d95e8ab9bb4f47b17fbcd120c000657379540000000000015635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b12e9e000000000000006c015054474d0303c37700000000000000020000000000000000" +] + +export const ptgmMainnetVaas = [ + "01000000030d004ca0e99cdda91001f74bfbf67d25eb09d704b1058066730e738c55efb37b8ac1463df88c173937503e3ebe7ab7503ad2514e12ee74fbd949eba06bf0917c60b00101f2a027549fdc4afa9ea3213b55c5104f60481d22c050122045c7ecf31b8e75c81ace3fac0aa8de80555250a4a0dd7c8d31775fca1907692a057afa419669925501025203c80d232573663a63eeb2864d797ccd4da3115685d45521982ccfe34a946f58d9591e9a2427e190fce9c09d784657cd4ac440fa7cbce773d7345339fa3b3b01040d49206142b72e4719106e8ffa2bf9a32ff6821119f83d1ec2d1ba668140e08b2a77508fbfc22084c68b39831df05684b8235585d644c6c83f7bda00e48874ce00067e8b240c40aa0b5a0101b44cd194997071adc4ebac327c7062bbe558dc6793cb6331f5539330181afe4d76000baec8981523cb3cfdc07500ff32b63c33de249f0107014002d183ab80458b56f1dedf77ebd7438bd43d7bbab0a2fdb02016d996c8160d7febf32785665e804bb4652dafd8c57faf4eb4905d1baa46975af56a8f24b900080565b49f72081fd044f9a7570d7b01f85215bd0db569c093e9f798407626568c62075c6a97c3357657ba4ee47312d319ec8593faf773000f3d0a2d95fc700b840009747ca03fd62e841b055fb5698403ed33c685079b0599be36921f51f69273fc45623351b13f037b81614d0afb3f30bf7ae64f8d2634872d88aa9428c090d46d68000b05643f72907d62fa51d113b835ce4c81fa1161af47b5f15656bb913ab442b2292f9a11b79e634b2ccd3b9d8b3238404701e128f154d9426edc69ad27b9caf6f9010f9b00cbe072e0e3504dc1fbeeef8d4aad3fc2867f3fabbc490fb39cb9e83159b86c4bc2bda774860cc14e97ec1caec3aec2aa6489b7274ef8fc92c19db3a07bf90110314070bbc23ff03d2ea9086559c404960f78ea95ffb3f677e6d640d7a430f56f4177bedaa76f97b4ddb3f2ae8301480250a2749f27e1a216712b23fd289baf820011582b65550cae7cb5f35b6f06013e71f8c1b8e6e4d5dc25bb49e7f6d153b3657e55b14d844538d542f3192b219ccd7ec11b3c8f77f5ac2f1281ee65b2f21ca99c0012af8e67c81ce9d0eec2c004de4a3b230ebf10b337552cbc3eaa6334495d97bb664837e7b33f5301cb7111fabf6ebe809858ea0b9f1063a3dd7c3037a20c523116006573b50d0000000000015635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b12e9e000000000000006d015054474d0303ea8600000000000000020000000000000000" +] \ No newline at end of file diff --git a/unit-tests/pyth/helpers.ts b/unit-tests/pyth/helpers.ts index 48f64d0..37eae9c 100644 --- a/unit-tests/pyth/helpers.ts +++ b/unit-tests/pyth/helpers.ts @@ -59,7 +59,7 @@ export namespace pyth { export const AuwvMagicBytes = new Uint8Array(Buffer.from("41555756", "hex")); export const PgtmMagicBytes = new Uint8Array(Buffer.from("5054474d", "hex")); export const InitialGovernanceDataSource = { - chain: 0, + chain: 1, address: hexToBytes( "5635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b12e9e", ), @@ -301,6 +301,32 @@ export namespace pyth { }; } + function serializePrincipal(payload: { + address: string; + contractName?: string; + }): Uint8Array[] { + const components = []; + if (payload.contractName) { + let principal = contractPrincipalCV( + payload.address, + payload.contractName, + ); + let serializedPrincipal = clarityValueToBuffer(principal); + let v = Buffer.alloc(1); + v.writeUint8(serializedPrincipal.length, 0); + components.push(v); + components.push(serializedPrincipal); + } else { + let principal = principalCV(payload.address); + let serializedPrincipal = clarityValueToBuffer(principal); + let v = Buffer.alloc(1); + v.writeUint8(serializedPrincipal.length, 0); + components.push(v); + components.push(clarityValueToBuffer(principal)); + } + return components; + } + export function serializePtgmVaaPayloadToBuffer( payload: PtgmVaaPayload, ): Uint8Array { @@ -324,40 +350,15 @@ export namespace pyth { components.push(bigintToBuffer(payload.updateFeeValue.mantissa, 8)); components.push(bigintToBuffer(payload.updateFeeValue.exponent, 8)); } else if (payload.updateFeeRecipient) { - if (payload.updateFeeRecipient.contractName) { - let principal = contractPrincipalCV( - payload.updateFeeRecipient.address, - payload.updateFeeRecipient.contractName, - ); - components.push(clarityValueToBuffer(principal)); - } else { - let principal = principalCV(payload.updateFeeRecipient.address); - components.push(clarityValueToBuffer(principal)); - } + components.push(...serializePrincipal(payload.updateFeeRecipient)); } else if (payload.updateOracleContract) { - let principal = contractPrincipalCV( - payload.updateOracleContract.address, - payload.updateOracleContract.contractName, - ); - components.push(clarityValueToBuffer(principal)); + components.push(...serializePrincipal(payload.updateOracleContract)); } else if (payload.updateWormholeContract) { - let principal = contractPrincipalCV( - payload.updateWormholeContract.address, - payload.updateWormholeContract.contractName, - ); - components.push(clarityValueToBuffer(principal)); + components.push(...serializePrincipal(payload.updateWormholeContract)); } else if (payload.updateStoreContract) { - let principal = contractPrincipalCV( - payload.updateStoreContract.address, - payload.updateStoreContract.contractName, - ); - components.push(clarityValueToBuffer(principal)); + components.push(...serializePrincipal(payload.updateStoreContract)); } else if (payload.updateDecoderContract) { - let principal = contractPrincipalCV( - payload.updateDecoderContract.address, - payload.updateDecoderContract.contractName, - ); - components.push(clarityValueToBuffer(principal)); + components.push(...serializePrincipal(payload.updateDecoderContract)); } else if (payload.updateStalePriceThreshold) { components.push( bigintToBuffer(payload.updateStalePriceThreshold.threshold, 8), diff --git a/unit-tests/pyth/ptgm.test.ts b/unit-tests/pyth/ptgm.test.ts index 1d20180..99d853f 100644 --- a/unit-tests/pyth/ptgm.test.ts +++ b/unit-tests/pyth/ptgm.test.ts @@ -1,19 +1,80 @@ -import { Cl } from "@stacks/transactions"; +import { Cl, ClarityType } from "@stacks/transactions"; import { beforeEach, describe, expect, it } from "vitest"; import { wormhole } from "../wormhole/helpers"; import { pyth } from "./helpers"; import { hexToBytes } from "@noble/hashes/utils"; +import { ParsedTransactionResult } from "@hirosystems/clarinet-sdk"; +import { ptgmTestnetVaas } from "./fixtures"; const pythOracleContractName = "pyth-oracle-v1"; const pythStorageContractName = "pyth-store-v1"; const pythDecoderPnauContractName = "pyth-pnau-decoder-v1"; const pythGovernanceContractName = "pyth-governance-v1"; const wormholeCoreContractName = "wormhole-core-v1"; +const initialFeeRecipient = "ST3CRXBDXQ2N5P7E25Q39MEX1HSMRDSEAP1JST19D"; + +describe("pyth-governance-v1::update-fee-value mainnet VAAs", () => { + const accounts = simnet.getAccounts(); + const sender = accounts.get("wallet_1")!; + + let block: ParsedTransactionResult[] | undefined = undefined; + + // Before starting the test suite, we have to setup the guardian set. + beforeEach(async () => { + block = wormhole.applyMainnetGuardianSetUpdates( + sender, + wormholeCoreContractName, + ); + }); + + it("should succeed handling the 3 guardians rotations", () => { + expect(block!).toHaveLength(3); + block!.forEach((b: ParsedTransactionResult) => { + expect(b.result).toHaveClarityType(ClarityType.ResponseOk); + }); + }); + + it("should succeed handling PNAU mainnet payloads", () => { + const pnauBytes = Cl.bufferFromHex(ptgmTestnetVaas[0]); + + const wormholeContract = Cl.contractPrincipal( + simnet.deployer, + wormholeCoreContractName, + ); + + let res = simnet.callPublicFn( + pythGovernanceContractName, + "update-fee-value", + [pnauBytes, wormholeContract], + sender, + ).result; + + expect(res).toBeOk(Cl.tuple({ + exponent: Cl.uint(0), + mantissa: Cl.uint(2), + })); + + let read = simnet.callReadOnlyFn( + pythGovernanceContractName, + `get-fee-info`, + [], + sender, + ); + + expect(Cl.ok(read.result)).toBeOk( + Cl.tuple({ + address: Cl.standardPrincipal(initialFeeRecipient), + exponent: Cl.uint(0), + mantissa: Cl.uint(2), + }), + ); + }); +}); + describe("pyth-governance-v1::update-fee-value", () => { const accounts = simnet.getAccounts(); const sender = accounts.get("wallet_1")!; - const initialFeeRecipient = "ST3CRXBDXQ2N5P7E25Q39MEX1HSMRDSEAP1JST19D"; const guardianSet = wormhole.generateGuardianSetKeychain(19); let updateFeeValue = { mantissa: 2n, diff --git a/unit-tests/wormhole/fixtures.ts b/unit-tests/wormhole/fixtures.ts index c308c31..a9e07d1 100644 --- a/unit-tests/wormhole/fixtures.ts +++ b/unit-tests/wormhole/fixtures.ts @@ -57,7 +57,7 @@ export const gsuMainnetVaas = [ "0bdcbccc0297c2a4f92a7c39358c42f22a8ed700a78bd05c39c8b61aaf2338e825b6c0d26d1f2a2ae4129cd751201f73d7234c753bd0735212a5288b19748fd2", "cfd90084be68de514fe14a7c281f492223f045566f859ea5c166d6e60bc650c23940909a8e96c2fbffbd15a598b4e6a5b5aa14c126bf58cc1a9e396fe7771965", "8edf3f9d997357a0e2c916ee090392c3a645ebac4f6cd8f826d3ecc0173b33bf06b7c14e8002fc9a5d01af9824a5cb3778472cd477e0ab378091448bca6f0417", - /**/ "6200deeadd3b4e2cd0a168d42e720a3b88d3ce4769ff2808086e6fd36110fc05c591ccbf91368609dc3b21203e58c9883d4f580085469bef8d5bdcd26eb8ad69", + "47b15c5039dcb2850b59bea323db662cc597dd7d48fe6b8dbb6cd8704c45854bf0e92fa267c844ba1a700105e157c8099d55c82316cb5e50c56a5d0920ff91c2", "d5225476d7849b362226952ffc561bab99832f3f8b99741f6d81bbeaffa8e7f6e54a85e5029a3b510707eaa9684df496e4b1268075ad0328693a30bf1b1e0033", "d9fa78b5b958bea1929080b8ad96dc555d34b051a27aebf711eb1186b807b0448316d994606ac807121838d6c41a58f308bc6307acdf69491fa4b17282f3e66f", "cc64af75ec2e2741fb9af9f6191cb9ee187d6d26af4d1e96d7bab47e6ec09be12d3192030dc4bbf54d1da319a7a2acfc7a9dd4c644af6646a4aaa02b1024bbab",