diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 11d46b9da1..cc874b66c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -408,7 +408,7 @@ importers: version: 4.9.1 '@cprussin/eslint-config': specifier: ^3.0.0 - version: 3.0.0(@typescript-eslint/eslint-plugin@7.13.1(eslint@9.9.0(jiti@1.21.0))(typescript@5.5.4))(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4))(typescript@5.5.4) + version: 3.0.0(@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@8.3.0(eslint@9.9.0(jiti@1.21.0))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.0))(typescript@5.5.4))(@typescript-eslint/parser@8.3.0(eslint@9.9.0(jiti@1.21.0))(typescript@5.5.4))(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4))(typescript@5.5.4) '@cprussin/jest-config': specifier: ^1.4.1 version: 1.4.1(@babel/core@7.24.7)(@jest/globals@29.7.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(@types/jest@29.5.12)(@types/node@22.2.0)(babel-jest@29.7.0(@babel/core@7.24.7))(bufferutil@4.0.8)(eslint@9.9.0(jiti@1.21.0))(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4))(utf-8-validate@5.0.10) @@ -644,7 +644,7 @@ importers: version: 5.0.0(ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) openapi-client-axios: specifier: ^7.5.5 - version: 7.5.5(axios@1.7.3)(js-yaml@4.1.0) + version: 7.5.5(axios@1.7.4)(js-yaml@4.1.0) openapi-fetch: specifier: ^0.8.2 version: 0.8.2 @@ -965,13 +965,13 @@ importers: version: 3.10.0 jest: specifier: ^29.3.1 - version: 29.7.0(ts-node@10.9.2(typescript@4.9.5)) + version: 29.7.0(@types/node@22.5.1)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5)) prettier: specifier: ^2.8.1 version: 2.8.8 ts-jest: specifier: ^29.0.3 - version: 29.1.2(@babel/core@7.24.7)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.7))(jest@29.7.0(ts-node@10.9.2(typescript@4.9.5)))(typescript@4.9.5) + version: 29.1.2(@babel/core@7.24.7)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.7))(jest@29.7.0(@types/node@22.5.1)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5)))(typescript@4.9.5) governance/xc_admin/packages/xc_admin_frontend: dependencies: @@ -1144,13 +1144,13 @@ importers: version: 8.57.0 jest: specifier: ^29.4.0 - version: 29.7.0(ts-node@10.9.2(typescript@4.9.5)) + version: 29.7.0(@types/node@22.5.1)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5)) prettier: specifier: ^2.6.2 version: 2.8.8 ts-jest: specifier: ^29.0.5 - version: 29.1.2(@babel/core@7.24.7)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.7))(jest@29.7.0(ts-node@10.9.2(typescript@4.9.5)))(typescript@4.9.5) + version: 29.1.2(@babel/core@7.24.7)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.7))(jest@29.7.0(@types/node@22.5.1)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5)))(typescript@4.9.5) typescript: specifier: ^4.6.3 version: 4.9.5 @@ -1202,7 +1202,7 @@ importers: version: 0.27.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@lumina-dev/test': specifier: ^0.0.12 - version: 0.0.12(eslint@9.9.0)(typescript@4.9.5)(webpack@5.91.0) + version: 0.0.12(eslint@9.9.0(jiti@1.21.0))(typescript@4.9.5)(webpack@5.91.0) '@pythnetwork/client': specifier: ^2.17.0 version: 2.21.0(@solana/web3.js@1.92.3(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -1959,6 +1959,9 @@ importers: '@types/node': specifier: ^20.14.10 version: 20.14.15 + '@wormhole-foundation/sdk-definitions': + specifier: ^0.10.7 + version: 0.10.7 jest: specifier: ^29.7.0 version: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@types/node@20.14.15)(typescript@5.5.4)) @@ -4431,6 +4434,7 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -6023,6 +6027,7 @@ packages: '@openzeppelin/test-helpers@0.5.16': resolution: {integrity: sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg==} + deprecated: Package no longer maintained. Consider using @nomicfoundation/hardhat-chai-matchers and @nomicfoundation/hardhat-network-helpers instead. '@openzeppelin/truffle-upgrades@1.21.0': resolution: {integrity: sha512-MKl0mSCLio4wNvKvSpXou0SEclbWfgLVJB1S2QXEP9bv55BB7+C+Iytc10Cx4JoKA+5Dup7c9C8g8H43yBD+lg==} @@ -8401,21 +8406,12 @@ packages: '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} - '@types/istanbul-lib-coverage@2.0.4': - resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} - '@types/istanbul-lib-coverage@2.0.6': resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} - '@types/istanbul-lib-report@3.0.0': - resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} - '@types/istanbul-lib-report@3.0.3': resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} - '@types/istanbul-reports@3.0.1': - resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} - '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} @@ -8567,9 +8563,6 @@ packages: '@types/responselike@1.0.0': resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} - '@types/secp256k1@4.0.3': - resolution: {integrity: sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==} - '@types/secp256k1@4.0.6': resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} @@ -8631,9 +8624,6 @@ packages: '@types/ws@8.5.4': resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} - '@types/yargs-parser@21.0.0': - resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} - '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -9287,6 +9277,12 @@ packages: '@webassemblyjs/wast-printer@1.12.1': resolution: {integrity: sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==} + '@wormhole-foundation/sdk-base@0.10.7': + resolution: {integrity: sha512-2UEy0BREBT8mtJFzkTx8zsBtw8s1LppHQ8r+1CPT1McMLPYcHSVRAg8OBOYsdhx2N2iyvMjJgGIeE1I0Y6c8Vg==} + + '@wormhole-foundation/sdk-definitions@0.10.7': + resolution: {integrity: sha512-9FUVqxbp91TjWofp2/3C/wCYlkdkt0ceM6Copc0zVDvD7sW8RpKVceWCttTZs843aKkRnGAkM+zLdT8kW/UUSw==} + '@wry/context@0.7.0': resolution: {integrity: sha512-LcDAiYWRtwAoSOArfk7cuYvFXytxfVrdX7yxoUmK7pPITLk5jYh2F8knCwS7LjgYL8u1eidPlKKV6Ikqq0ODqQ==} engines: {node: '>=8'} @@ -9982,6 +9978,9 @@ packages: axios@1.7.3: resolution: {integrity: sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==} + axios@1.7.4: + resolution: {integrity: sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==} + axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} @@ -10795,9 +10794,6 @@ packages: code-red@1.0.4: resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} - collect-v8-coverage@1.0.1: - resolution: {integrity: sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==} - collect-v8-coverage@1.0.2: resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} @@ -13294,10 +13290,6 @@ packages: resolution: {integrity: sha512-UzcJi88Hw//CurUIRa9Jxb0vgOCcuD/MNjwmXp633cyaRKkCWACkoqHCtfZv43b1kqXGg/fpOa8bwgacCeXsVg==} engines: {node: '>=18'} - globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} - engines: {node: '>= 0.4'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -17104,6 +17096,10 @@ packages: q@1.5.1: resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} engines: {node: '>=0.6.0', teleport: '>=0.2.0'} + deprecated: |- + You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qr-code-styling@1.6.0-rc.1: resolution: {integrity: sha512-ModRIiW6oUnsP18QzrRYZSc/CFKFKIdj7pUs57AEVH20ajlglRpN3HukjHk0UbNMTlKGuaYl7Gt6/O5Gg2NU2Q==} @@ -19800,6 +19796,10 @@ packages: resolution: {integrity: sha512-sN1AkhTAFI89anOeCaO0c3GtiGeWtOGVc2tmTdQs2Rd14HuxLyDuLIF3/WwjtkDFRM2189uYy8HJJSWJvW2mYA==} engines: {node: '>=14', npm: '>=6.12.0'} + web3-core@4.5.1: + resolution: {integrity: sha512-mFMOO/IWdKsLL1o2whh3oJ0LCG9P3l5c4lpiMoVsVln3QXh/B0Gf8gW3aY8S+Ixm0OHyzFDXJVc2CodxqmI4Gw==} + engines: {node: '>=14', npm: '>=6.12.0'} + web3-errors@1.1.4: resolution: {integrity: sha512-WahtszSqILez+83AxGecVroyZsMuuRT+KmQp4Si5P4Rnqbczno1k748PCrZTS1J4UCPmXMG2/Vt+0Bz2zwXkwQ==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -19812,6 +19812,10 @@ packages: resolution: {integrity: sha512-dIsi8SFC9TCAWpPmacXeVMk/F8tDNa1Bvg8/Cc2cvJo8LRSWd099szEyb+/SiMYcLlEbwftiT9Rpukz7ql4hBg==} engines: {node: '>=14', npm: '>=6.12.0'} + web3-errors@1.3.0: + resolution: {integrity: sha512-j5JkAKCtuVMbY3F5PYXBqg1vWrtF4jcyyMY1rlw8a4PV67AkqlepjGgpzWJZd56Mt+TvHy6DA1F/3Id8LatDSQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + web3-eth-abi@1.10.0: resolution: {integrity: sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg==} engines: {node: '>=8.0.0'} @@ -19852,6 +19856,10 @@ packages: resolution: {integrity: sha512-y0JynDeTDnclyuE9mShXLeEj+BCrPHxPHOyPCgTchUBQsALF9+0OhP7WiS3IqUuu0Hle5bjG2f5ddeiPtNEuLg==} engines: {node: '>=14', npm: '>=6.12.0'} + web3-eth-accounts@4.2.1: + resolution: {integrity: sha512-aOlEZFzqAgKprKs7+DGArU4r9b+ILBjThpeq42aY7LAQcP+mSpsWcQgbIRK3r/n3OwTYZ3aLPk0Ih70O/LwnYA==} + engines: {node: '>=14', npm: '>=6.12.0'} + web3-eth-contract@1.10.0: resolution: {integrity: sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w==} engines: {node: '>=8.0.0'} @@ -20001,6 +20009,10 @@ packages: resolution: {integrity: sha512-6qRUGAhJfVQM41E5t+re5IHYmb5hSaLc02BE2MaRQsz2xKA6RjmHpOA5h/+ojJxEpI9NI2CrfDKOAgtJfoUJQg==} engines: {node: '>=14', npm: '>=6.12.0'} + web3-providers-http@4.2.0: + resolution: {integrity: sha512-IPMnDtHB7dVwaB7/mMxAZzyq7d5ezfO1+Vw0bNfAeIi7gaDlJiggp85SdyAfOgov8AMUA/dyiY72kQ0KmjXKvQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + web3-providers-ipc@1.10.0: resolution: {integrity: sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA==} engines: {node: '>=8.0.0'} @@ -20041,6 +20053,10 @@ packages: resolution: {integrity: sha512-n4Dal9/rQWjS7d6LjyEPM2R458V8blRm0eLJupDEJOOIBhGYlxw5/4FthZZ/cqB7y/sLVi7K09DdYx2MeRtU5w==} engines: {node: '>=14', npm: '>=6.12.0'} + web3-providers-ws@4.0.8: + resolution: {integrity: sha512-goJdgata7v4pyzHRsg9fSegUG4gVnHZSHODhNnn6J93ykHkBI1nz4fjlGpcQLUMi4jAMz6SHl9Ibzs2jj9xqPw==} + engines: {node: '>=14', npm: '>=6.12.0'} + web3-rpc-methods@1.2.0: resolution: {integrity: sha512-CWJ/g4I4WyYvLkf21wCZAehdhU/VjX/OAPHnqF5/FPDJlogOsOnGXHqi1Z5AP+ocdt395PNubd8jyMMJoYGSBA==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -20985,16 +21001,16 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.7 - '@babel/helper-compilation-targets': 7.24.7 - '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.7) + '@babel/generator': 7.25.0 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.24.7) '@babel/helpers': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/template': 7.24.7 - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.25.3 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.3 + '@babel/types': 7.25.2 convert-source-map: 2.0.0 - debug: 4.3.5 + debug: 4.3.6(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -21432,8 +21448,8 @@ snapshots: '@babel/helper-simple-access@7.24.7': dependencies: - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/traverse': 7.25.3 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color @@ -21492,8 +21508,8 @@ snapshots: '@babel/helpers@7.24.7': dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.7 + '@babel/template': 7.25.0 + '@babel/types': 7.25.2 '@babel/highlight@7.24.7': dependencies: @@ -21769,27 +21785,27 @@ snapshots: '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.24.0)': dependencies: @@ -21869,22 +21885,22 @@ snapshots: '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.0)': dependencies: @@ -21899,72 +21915,72 @@ snapshots: '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.0)': dependencies: @@ -21979,22 +21995,22 @@ snapshots: '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.24.0)': dependencies: @@ -24486,7 +24502,7 @@ snapshots: '@cosmjs/socket': 0.32.3(bufferutil@4.0.7)(utf-8-validate@5.0.10) '@cosmjs/stream': 0.32.3 '@cosmjs/utils': 0.32.3 - axios: 1.7.3(debug@4.3.6) + axios: 1.7.4(debug@4.3.6) readonly-date: 1.0.0 xstream: 11.14.0 transitivePeerDependencies: @@ -24616,45 +24632,6 @@ snapshots: - ts-node - typescript - '@cprussin/eslint-config@3.0.0(@typescript-eslint/eslint-plugin@7.13.1(eslint@9.9.0(jiti@1.21.0))(typescript@5.5.4))(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4))(typescript@5.5.4)': - dependencies: - '@babel/core': 7.24.7 - '@babel/eslint-parser': 7.24.7(@babel/core@7.24.7)(eslint@9.5.0) - '@babel/plugin-syntax-import-assertions': 7.24.7(@babel/core@7.24.7) - '@eslint/compat': 1.1.0 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.5.0 - '@next/eslint-plugin-next': 14.2.3 - eslint: 9.5.0 - eslint-config-prettier: 9.1.0(eslint@9.5.0) - eslint-config-turbo: 1.13.4(eslint@9.5.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.5.2))(eslint@9.5.0) - eslint-plugin-jest: 28.6.0(@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@8.3.0(eslint@9.9.0(jiti@1.21.0))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.0))(typescript@5.5.4))(eslint@9.5.0)(jest@29.7.0(@types/node@22.2.0)(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)))(typescript@5.5.4) - eslint-plugin-jest-dom: 5.4.0(eslint@9.5.0) - eslint-plugin-jsonc: 2.16.0(eslint@9.5.0) - eslint-plugin-jsx-a11y: 6.8.0(eslint@9.5.0) - eslint-plugin-n: 17.9.0(eslint@9.5.0) - eslint-plugin-react: 7.34.2(eslint@9.5.0) - eslint-plugin-react-hooks: 4.6.2(eslint@9.5.0) - eslint-plugin-storybook: 0.8.0(eslint@9.5.0)(typescript@5.5.4) - eslint-plugin-tailwindcss: 3.17.3(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4))) - eslint-plugin-testing-library: 6.2.2(eslint@9.5.0)(typescript@5.5.4) - eslint-plugin-tsdoc: 0.3.0 - eslint-plugin-unicorn: 53.0.0(eslint@9.5.0) - globals: 15.6.0 - tailwindcss: 3.4.4(ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4)) - typescript-eslint: 7.13.1(eslint@9.5.0)(typescript@5.5.4) - transitivePeerDependencies: - - '@testing-library/dom' - - '@typescript-eslint/eslint-plugin' - - '@typescript-eslint/parser' - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - jest - - supports-color - - ts-node - - typescript - '@cprussin/jest-config@1.4.1(@babel/core@7.24.7)(@jest/globals@29.7.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(@types/jest@29.5.12)(@types/node@20.14.7)(babel-jest@29.7.0(@babel/core@7.24.7))(bufferutil@4.0.8)(eslint@9.5.0)(ts-node@10.9.2(@types/node@20.14.7)(typescript@5.5.2))(utf-8-validate@5.0.10)': dependencies: '@cprussin/jest-runner-prettier': 1.0.0(jest@29.7.0(@types/node@20.14.7)(ts-node@10.9.2(@types/node@20.14.7)(typescript@5.5.2)))(prettier@3.3.2) @@ -24939,12 +24916,6 @@ snapshots: eslint: 9.9.0(jiti@1.21.0) eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': - dependencies: - eslint: 9.9.0 - eslint-visitor-keys: 3.4.3 - optional: true - '@eslint-community/regexpp@4.10.0': {} '@eslint-community/regexpp@4.11.0': {} @@ -26112,10 +26083,10 @@ snapshots: '@injectivelabs/core-proto-ts@0.0.21': dependencies: - '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.2) - google-protobuf: 3.21.2 + '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) + google-protobuf: 3.21.4 protobufjs: 7.2.6 - rxjs: 7.8.0 + rxjs: 7.8.1 '@injectivelabs/dmm-proto-ts@1.0.19': dependencies: @@ -27101,41 +27072,6 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(ts-node@10.9.2(typescript@4.9.5))': - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.14.15 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.9.0 - exit: 0.1.2 - graceful-fs: 4.2.10 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(typescript@4.9.5)) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.5 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - '@jest/create-cache-key-function@29.7.0': dependencies: '@jest/types': 29.6.3 @@ -27285,7 +27221,7 @@ snapshots: '@jest/console': 29.7.0 '@jest/types': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 '@jest/test-sequencer@27.5.1': dependencies: @@ -27362,8 +27298,8 @@ snapshots: '@jest/types@29.6.3': dependencies: '@jest/schemas': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 '@types/node': 20.14.15 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -28157,13 +28093,13 @@ snapshots: '@ltd/j-toml@1.38.0': {} - '@lumina-dev/test@0.0.12(eslint@9.9.0)(typescript@4.9.5)(webpack@5.91.0)': + '@lumina-dev/test@0.0.12(eslint@9.9.0(jiti@1.21.0))(typescript@4.9.5)(webpack@5.91.0)': dependencies: bs58: 5.0.0 cors: 2.8.5 express: 4.19.2 nanoid: 3.3.7 - react-dev-utils: 12.0.1(eslint@9.9.0)(typescript@4.9.5)(webpack@5.91.0) + react-dev-utils: 12.0.1(eslint@9.9.0(jiti@1.21.0))(typescript@4.9.5)(webpack@5.91.0) zod: 3.23.8 transitivePeerDependencies: - eslint @@ -28231,7 +28167,7 @@ snapshots: - encoding - supports-color - '@matterlabs/hardhat-zksync-deploy@1.5.0(encoding@0.1.13)(ethers@6.13.2(bufferutil@4.0.7)(utf-8-validate@6.0.3))(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3))(zksync-ethers@6.11.2(ethers@6.13.2(bufferutil@4.0.7)(utf-8-validate@6.0.3)))': + '@matterlabs/hardhat-zksync-deploy@1.5.0(encoding@0.1.13)(ethers@6.13.2(bufferutil@4.0.7)(utf-8-validate@6.0.3))(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3))(zksync-ethers@6.11.2(ethers@5.7.2(bufferutil@4.0.7)(utf-8-validate@6.0.3)))': dependencies: '@matterlabs/hardhat-zksync-solc': 1.2.1(encoding@0.1.13)(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3)) chai: 4.5.0 @@ -28244,7 +28180,7 @@ snapshots: sinon: 18.0.0 sinon-chai: 3.7.0(chai@4.5.0)(sinon@18.0.0) ts-morph: 22.0.0 - zksync-ethers: 6.11.2(ethers@6.13.2(bufferutil@4.0.7)(utf-8-validate@6.0.3)) + zksync-ethers: 6.11.2(ethers@5.7.2(bufferutil@4.0.7)(utf-8-validate@6.0.3)) transitivePeerDependencies: - encoding - supports-color @@ -28270,7 +28206,7 @@ snapshots: '@matterlabs/hardhat-zksync-node@1.1.1(encoding@0.1.13)(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3))': dependencies: '@matterlabs/hardhat-zksync-solc': 1.2.1(encoding@0.1.13)(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3)) - axios: 1.7.3(debug@4.3.6) + axios: 1.7.4(debug@4.3.6) chai: 4.5.0 chalk: 4.1.2 fs-extra: 11.2.0 @@ -28327,7 +28263,7 @@ snapshots: '@matterlabs/hardhat-zksync-upgradable@1.5.2(bufferutil@4.0.7)(encoding@0.1.13)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3)': dependencies: - '@matterlabs/hardhat-zksync-deploy': 1.5.0(encoding@0.1.13)(ethers@6.13.2(bufferutil@4.0.7)(utf-8-validate@6.0.3))(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3))(zksync-ethers@6.11.2(ethers@6.13.2(bufferutil@4.0.7)(utf-8-validate@6.0.3))) + '@matterlabs/hardhat-zksync-deploy': 1.5.0(encoding@0.1.13)(ethers@6.13.2(bufferutil@4.0.7)(utf-8-validate@6.0.3))(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3))(zksync-ethers@6.11.2(ethers@5.7.2(bufferutil@4.0.7)(utf-8-validate@6.0.3))) '@matterlabs/hardhat-zksync-solc': 1.2.1(encoding@0.1.13)(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3)) '@openzeppelin/contracts-hardhat-zksync-upgradable': '@openzeppelin/contracts@4.9.6' '@openzeppelin/upgrades-core': 1.35.0 @@ -28356,7 +28292,7 @@ snapshots: '@ethersproject/address': 5.7.0 '@matterlabs/hardhat-zksync-solc': 1.2.1(encoding@0.1.13)(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3)) '@nomicfoundation/hardhat-verify': 2.0.9(hardhat@2.22.8(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@22.5.1)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@6.0.3)) - axios: 1.7.3(debug@4.3.6) + axios: 1.7.4(debug@4.3.6) cbor: 9.0.2 chai: 4.5.0 chalk: 4.1.2 @@ -29377,7 +29313,7 @@ snapshots: dependencies: amazon-cognito-identity-js: 6.3.12(encoding@0.1.13) async-retry: 1.3.3 - axios: 1.7.3(debug@4.3.6) + axios: 1.7.4(debug@4.3.6) lodash: 4.17.21 node-fetch: 2.7.0(encoding@0.1.13) transitivePeerDependencies: @@ -31407,7 +31343,7 @@ snapshots: dependencies: '@noble/curves': 1.2.0 '@noble/hashes': 1.3.3 - '@scure/base': 1.1.6 + '@scure/base': 1.1.7 '@scure/bip32@1.3.3': dependencies: @@ -31434,7 +31370,7 @@ snapshots: '@scure/bip39@1.2.1': dependencies: '@noble/hashes': 1.3.3 - '@scure/base': 1.1.6 + '@scure/base': 1.1.7 '@scure/bip39@1.2.2': dependencies: @@ -31725,7 +31661,7 @@ snapshots: '@solana/spl-governance@0.3.28(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)': dependencies: '@solana/web3.js': 1.92.3(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) - axios: 1.7.3(debug@4.3.6) + axios: 1.7.3 bignumber.js: 9.1.2 bn.js: 5.2.1 borsh: 0.3.1 @@ -33181,7 +33117,7 @@ snapshots: dependencies: '@ton/core': 0.57.0(@ton/crypto@3.3.0) '@ton/crypto': 3.3.0 - axios: 1.7.3(debug@4.3.6) + axios: 1.7.3 dataloader: 2.1.0 symbol.inspect: 1.0.1 teslabot: 1.5.0 @@ -33747,24 +33683,24 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@types/bn.js@4.11.6': dependencies: @@ -33924,22 +33860,12 @@ snapshots: '@types/http-errors@2.0.4': optional: true - '@types/istanbul-lib-coverage@2.0.4': {} - '@types/istanbul-lib-coverage@2.0.6': {} - '@types/istanbul-lib-report@3.0.0': - dependencies: - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-lib-report@3.0.3': dependencies: '@types/istanbul-lib-coverage': 2.0.6 - '@types/istanbul-reports@3.0.1': - dependencies: - '@types/istanbul-lib-report': 3.0.0 - '@types/istanbul-reports@3.0.4': dependencies: '@types/istanbul-lib-report': 3.0.3 @@ -34096,10 +34022,6 @@ snapshots: dependencies: '@types/node': 20.14.15 - '@types/secp256k1@4.0.3': - dependencies: - '@types/node': 20.14.15 - '@types/secp256k1@4.0.6': dependencies: '@types/node': 20.14.15 @@ -34172,8 +34094,6 @@ snapshots: dependencies: '@types/node': 20.14.15 - '@types/yargs-parser@21.0.0': {} - '@types/yargs-parser@21.0.3': {} '@types/yargs@15.0.19': @@ -34186,7 +34106,7 @@ snapshots: '@types/yargs@17.0.32': dependencies: - '@types/yargs-parser': 21.0.0 + '@types/yargs-parser': 21.0.3 '@typescript-eslint/eslint-plugin@5.49.0(@typescript-eslint/parser@5.49.0(eslint@8.56.0)(typescript@4.9.5))(eslint@8.56.0)(typescript@4.9.5)': dependencies: @@ -35295,7 +35215,7 @@ snapshots: '@vue/compiler-core@3.4.34': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.3 '@vue/shared': 3.4.34 entities: 4.5.0 estree-walker: 2.0.2 @@ -36116,6 +36036,16 @@ snapshots: '@webassemblyjs/ast': 1.12.1 '@xtuc/long': 4.2.2 + '@wormhole-foundation/sdk-base@0.10.7': + dependencies: + '@scure/base': 1.1.7 + + '@wormhole-foundation/sdk-definitions@0.10.7': + dependencies: + '@noble/curves': 1.4.2 + '@noble/hashes': 1.4.0 + '@wormhole-foundation/sdk-base': 0.10.7 + '@wry/context@0.7.0': dependencies: tslib: 2.6.3 @@ -36955,7 +36885,15 @@ snapshots: transitivePeerDependencies: - debug - axios@1.7.3(debug@4.3.6): + axios@1.7.3: + dependencies: + follow-redirects: 1.15.6(debug@4.3.6) + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + + axios@1.7.4(debug@4.3.6): dependencies: follow-redirects: 1.15.6(debug@4.3.6) form-data: 4.0.0 @@ -37002,7 +36940,7 @@ snapshots: babel-plugin-istanbul@6.1.1: dependencies: - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.2.1 @@ -37019,8 +36957,8 @@ snapshots: babel-plugin-jest-hoist@29.6.3: dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.7 + '@babel/template': 7.25.0 + '@babel/types': 7.25.2 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.6 @@ -38068,8 +38006,6 @@ snapshots: estree-walker: 3.0.3 periscopic: 3.1.0 - collect-v8-coverage@1.0.1: {} - collect-v8-coverage@1.0.2: {} collection-utils@1.0.1: {} @@ -38619,21 +38555,6 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(ts-node@10.9.2(typescript@4.9.5)): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(typescript@4.9.5)) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - create-lite-jest-runner@1.1.0(jest@29.7.0(@types/node@20.14.7)(ts-node@10.9.2(@types/node@20.14.7)(typescript@5.5.2))): dependencies: jest: 29.7.0(@types/node@20.14.7)(ts-node@10.9.2(@types/node@20.14.7)(typescript@5.5.2)) @@ -40336,46 +40257,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.9.0: - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) - '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.9.0 - '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 - '@nodelib/fs.walk': 1.2.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.6(supports-color@8.1.1) - escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 - find-up: 5.0.0 - glob-parent: 6.0.2 - ignore: 5.3.1 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.3 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - optional: true - eslint@9.9.0(jiti@1.21.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0(jiti@1.21.0)) @@ -40666,7 +40547,7 @@ snapshots: ethereum-cryptography@0.1.3: dependencies: '@types/pbkdf2': 3.1.0 - '@types/secp256k1': 4.0.3 + '@types/secp256k1': 4.0.6 blakejs: 1.2.1 browserify-aes: 1.2.0 bs58check: 2.1.2 @@ -41358,7 +41239,7 @@ snapshots: forever-agent@0.6.1: {} - fork-ts-checker-webpack-plugin@6.5.3(eslint@9.9.0)(typescript@4.9.5)(webpack@5.91.0): + fork-ts-checker-webpack-plugin@6.5.3(eslint@9.9.0(jiti@1.21.0))(typescript@4.9.5)(webpack@5.91.0): dependencies: '@babel/code-frame': 7.24.7 '@types/json-schema': 7.0.15 @@ -41376,7 +41257,7 @@ snapshots: typescript: 4.9.5 webpack: 5.91.0 optionalDependencies: - eslint: 9.9.0 + eslint: 9.9.0(jiti@1.21.0) form-data-encoder@1.7.1: {} @@ -41868,10 +41749,6 @@ snapshots: globals@15.6.0: {} - globalthis@1.0.3: - dependencies: - define-properties: 1.2.1 - globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -42457,7 +42334,7 @@ snapshots: mute-stream: 0.0.8 ora: 5.4.1 run-async: 2.4.1 - rxjs: 7.8.0 + rxjs: 7.8.1 string-width: 4.2.3 strip-ansi: 6.0.1 through: 2.3.8 @@ -42856,7 +42733,7 @@ snapshots: istanbul-lib-instrument@5.2.1: dependencies: '@babel/core': 7.24.7 - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.3 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 6.3.1 @@ -42866,7 +42743,7 @@ snapshots: istanbul-lib-instrument@6.0.2: dependencies: '@babel/core': 7.24.7 - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.3 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 7.6.3 @@ -43373,25 +43250,6 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(ts-node@10.9.2(typescript@4.9.5)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(typescript@4.9.5)) - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0(ts-node@10.9.2(typescript@4.9.5)) - exit: 0.1.2 - import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.14.15)(ts-node@10.9.2(typescript@4.9.5)) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.7.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest-config@27.5.1(bufferutil@4.0.8)(ts-node@10.9.2(@types/node@20.14.9)(typescript@5.5.2))(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.24.7 @@ -43860,37 +43718,6 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(typescript@4.9.5)): - dependencies: - '@babel/core': 7.24.7 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.24.7) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.7 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.14.15 - ts-node: 10.9.2(@types/node@18.19.34)(typescript@4.9.5) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - jest-config@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@4.9.5)): dependencies: '@babel/core': 7.24.7 @@ -44234,7 +44061,7 @@ snapshots: '@types/stack-utils': 2.0.3 chalk: 4.1.2 graceful-fs: 4.2.11 - micromatch: 4.0.5 + micromatch: 4.0.7 pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 @@ -44470,10 +44297,10 @@ snapshots: jest-snapshot@29.7.0: dependencies: '@babel/core': 7.24.7 - '@babel/generator': 7.24.7 + '@babel/generator': 7.25.0 '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.24.7) '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.24.7) - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@jest/expect-utils': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 @@ -44700,18 +44527,6 @@ snapshots: - supports-color - ts-node - jest@29.7.0(ts-node@10.9.2(typescript@4.9.5)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(typescript@4.9.5)) - '@jest/types': 29.6.3 - import-local: 3.1.0 - jest-cli: 29.7.0(ts-node@10.9.2(typescript@4.9.5)) - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jiti@1.21.0: {} jito-ts@3.0.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10): @@ -46844,7 +46659,7 @@ snapshots: '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.0-rc.37 '@zkochan/js-yaml': 0.0.6 - axios: 1.7.3(debug@4.3.6) + axios: 1.7.4(debug@4.3.6) chalk: 4.1.2 cli-cursor: 3.1.0 cli-spinners: 2.6.1 @@ -47040,9 +46855,9 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - openapi-client-axios@7.5.5(axios@1.7.3)(js-yaml@4.1.0): + openapi-client-axios@7.5.5(axios@1.7.4)(js-yaml@4.1.0): dependencies: - axios: 1.7.3(debug@4.3.6) + axios: 1.7.4(debug@4.3.6) bath-es5: 3.0.3 dereference-json-schema: 0.2.1 js-yaml: 4.1.0 @@ -48371,7 +48186,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-dev-utils@12.0.1(eslint@9.9.0)(typescript@4.9.5)(webpack@5.91.0): + react-dev-utils@12.0.1(eslint@9.9.0(jiti@1.21.0))(typescript@4.9.5)(webpack@5.91.0): dependencies: '@babel/code-frame': 7.23.5 address: 1.2.2 @@ -48382,7 +48197,7 @@ snapshots: escape-string-regexp: 4.0.0 filesize: 8.0.7 find-up: 5.0.0 - fork-ts-checker-webpack-plugin: 6.5.3(eslint@9.9.0)(typescript@4.9.5)(webpack@5.91.0) + fork-ts-checker-webpack-plugin: 6.5.3(eslint@9.9.0(jiti@1.21.0))(typescript@4.9.5)(webpack@5.91.0) global-modules: 2.0.0 globby: 11.1.0 gzip-size: 6.0.0 @@ -49437,7 +49252,7 @@ snapshots: shx@0.3.4: dependencies: - minimist: 1.2.7 + minimist: 1.2.8 shelljs: 0.8.5 side-channel@1.0.6: @@ -50769,23 +50584,6 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.24.7) - ts-jest@29.1.2(@babel/core@7.24.7)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.7))(jest@29.7.0(ts-node@10.9.2(typescript@4.9.5)))(typescript@4.9.5): - dependencies: - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(ts-node@10.9.2(typescript@4.9.5)) - jest-util: 29.7.0 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.6.0 - typescript: 4.9.5 - yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.24.7 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.24.7) - ts-jest@29.2.4(@babel/core@7.24.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.7))(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@types/node@20.14.15)(typescript@5.5.4)))(typescript@5.5.4): dependencies: bs-logger: 0.2.6 @@ -52177,6 +51975,23 @@ snapshots: - encoding - utf-8-validate + web3-core@4.5.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10): + dependencies: + web3-errors: 1.3.0 + web3-eth-accounts: 4.2.1 + web3-eth-iban: 4.0.7 + web3-providers-http: 4.2.0(encoding@0.1.13) + web3-providers-ws: 4.0.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + web3-types: 1.7.0 + web3-utils: 4.3.1 + web3-validator: 2.0.6 + optionalDependencies: + web3-providers-ipc: 4.0.7 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + web3-errors@1.1.4: dependencies: web3-types: 1.6.0 @@ -52189,6 +52004,10 @@ snapshots: dependencies: web3-types: 1.7.0 + web3-errors@1.3.0: + dependencies: + web3-types: 1.7.0 + web3-eth-abi@1.10.0: dependencies: '@ethersproject/abi': 5.7.0 @@ -52295,6 +52114,16 @@ snapshots: web3-utils: 4.3.1 web3-validator: 2.0.6 + web3-eth-accounts@4.2.1: + dependencies: + '@ethereumjs/rlp': 4.0.1 + crc-32: 1.2.2 + ethereum-cryptography: 2.2.1 + web3-errors: 1.3.0 + web3-types: 1.7.0 + web3-utils: 4.3.1 + web3-validator: 2.0.6 + web3-eth-contract@1.10.0(encoding@0.1.13): dependencies: '@types/bn.js': 5.1.5 @@ -52463,7 +52292,7 @@ snapshots: web3-eth-iban@4.0.7: dependencies: - web3-errors: 1.2.0 + web3-errors: 1.3.0 web3-types: 1.7.0 web3-utils: 4.3.1 web3-validator: 2.0.6 @@ -52672,7 +52501,7 @@ snapshots: web3-net@4.1.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10): dependencies: - web3-core: 4.4.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) + web3-core: 4.5.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) web3-rpc-methods: 1.3.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) web3-types: 1.7.0 web3-utils: 4.3.1 @@ -52788,6 +52617,15 @@ snapshots: transitivePeerDependencies: - encoding + web3-providers-http@4.2.0(encoding@0.1.13): + dependencies: + cross-fetch: 4.0.0(encoding@0.1.13) + web3-errors: 1.3.0 + web3-types: 1.7.0 + web3-utils: 4.3.1 + transitivePeerDependencies: + - encoding + web3-providers-ipc@1.10.0: dependencies: oboe: 2.1.5 @@ -52810,8 +52648,8 @@ snapshots: web3-providers-ipc@4.0.7: dependencies: - web3-errors: 1.2.0 - web3-types: 1.6.0 + web3-errors: 1.3.0 + web3-types: 1.7.0 web3-utils: 4.3.1 optional: true @@ -52859,6 +52697,18 @@ snapshots: - bufferutil - utf-8-validate + web3-providers-ws@4.0.8(bufferutil@4.0.8)(utf-8-validate@5.0.10): + dependencies: + '@types/ws': 8.5.3 + isomorphic-ws: 5.0.0(ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + web3-errors: 1.3.0 + web3-types: 1.7.0 + web3-utils: 4.3.1 + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + web3-rpc-methods@1.2.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10): dependencies: web3-core: 4.4.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -52871,7 +52721,7 @@ snapshots: web3-rpc-methods@1.3.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10): dependencies: - web3-core: 4.4.0(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) + web3-core: 4.5.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) web3-types: 1.7.0 web3-validator: 2.0.6 transitivePeerDependencies: @@ -52966,9 +52816,9 @@ snapshots: web3-utils@4.3.1: dependencies: - ethereum-cryptography: 2.1.3 + ethereum-cryptography: 2.2.1 eventemitter3: 5.0.1 - web3-errors: 1.2.1 + web3-errors: 1.3.0 web3-types: 1.7.0 web3-validator: 2.0.6 @@ -52984,7 +52834,7 @@ snapshots: dependencies: ethereum-cryptography: 2.2.1 util: 0.12.5 - web3-errors: 1.2.0 + web3-errors: 1.3.0 web3-types: 1.7.0 zod: 3.23.8 @@ -53546,7 +53396,7 @@ snapshots: xstream@11.14.0: dependencies: - globalthis: 1.0.3 + globalthis: 1.0.4 symbol-observable: 2.0.3 xtend@2.1.2: diff --git a/target_chains/ton/contracts/contracts/Main.fc b/target_chains/ton/contracts/contracts/Main.fc index 2dfa0956ad..e9a2e3bd01 100644 --- a/target_chains/ton/contracts/contracts/Main.fc +++ b/target_chains/ton/contracts/contracts/Main.fc @@ -13,14 +13,16 @@ ;; * A 32-bit (big-endian) unsigned integer `op`, identifying the `operation` to be performed, or the `method` of the smart contract to be invoked. int op = in_msg_body~load_uint(32); - ;; * A 64-bit (big-endian) unsigned integer `query_id`, used in all query-response internal messages to indicate that a response is related to a query (the `query_id` of a response must be equal to the `query_id` of the corresponding query). If `op` is not a query-response method (e.g., it invokes a method that is not expected to send an answer), then `query_id` may be omitted. - int query_id = in_msg_body~load_uint(64); + cell data = in_msg_body~load_ref(); + slice data_slice = data.begin_parse(); ;; * The remainder of the message body is specific for each supported value of `op`. if (op == OP_UPDATE_GUARDIAN_SET) { - update_guardian_set(in_msg_body); + update_guardian_set(data_slice); } elseif (op == OP_EXECUTE_GOVERNANCE_ACTION) { - execute_governance_action(in_msg_body); + execute_governance_action(data_slice); + } elseif (op == OP_UPGRADE_CONTRACT) { + execute_upgrade_contract(data); } else { throw(0xffff); ;; Throw exception for unknown op } diff --git a/target_chains/ton/contracts/contracts/Pyth.fc b/target_chains/ton/contracts/contracts/Pyth.fc index 624dac3315..69d9f39d67 100644 --- a/target_chains/ton/contracts/contracts/Pyth.fc +++ b/target_chains/ton/contracts/contracts/Pyth.fc @@ -254,8 +254,25 @@ int apply_decimal_expo(int value, int expo) { return result; } -() execute_upgrade_contract(slice payload) impure { - ;; TODO: Implement +() execute_upgrade_contract(cell new_code) impure { + load_data(); + int hash_code = cell_hash(new_code); + throw_unless(ERROR_INVALID_CODE_HASH, upgrade_code_hash == hash_code); + + ;; Set the new code + set_code(new_code); + + ;; Set the code continuation to the new code + set_c3(new_code.begin_parse().bless()); + + ;; Throw an exception to end the current execution + ;; The contract will be restarted with the new code + throw(0); +} + +() execute_authorize_upgrade_contract(slice payload) impure { + int code_hash = payload~load_uint(256); + upgrade_code_hash = code_hash; } () execute_authorize_governance_data_source_transfer(slice payload) impure { @@ -317,8 +334,8 @@ int apply_decimal_expo(int value, int expo) { } () execute_governance_payload(int action, slice payload) impure { - if (action == UPGRADE_CONTRACT) { - execute_upgrade_contract(payload); + if (action == AUTHORIZE_UPGRADE_CONTRACT) { + execute_authorize_upgrade_contract(payload); } elseif (action == AUTHORIZE_GOVERNANCE_DATA_SOURCE_TRANSFER) { execute_authorize_governance_data_source_transfer(payload); } elseif (action == SET_DATA_SOURCES) { diff --git a/target_chains/ton/contracts/contracts/common/errors.fc b/target_chains/ton/contracts/contracts/common/errors.fc index d91fd5e60b..11cb56e67b 100644 --- a/target_chains/ton/contracts/contracts/common/errors.fc +++ b/target_chains/ton/contracts/contracts/common/errors.fc @@ -40,6 +40,7 @@ const int ERROR_OLD_GOVERNANCE_MESSAGE = 1033; const int ERROR_INVALID_GOVERNANCE_TARGET = 1034; const int ERROR_INVALID_GOVERNANCE_MAGIC = 1035; const int ERROR_INVALID_GOVERNANCE_MODULE = 1036; +const int ERROR_INVALID_CODE_HASH = 1037; ;; Common -const int ERROR_INSUFFICIENT_GAS = 1037; +const int ERROR_INSUFFICIENT_GAS = 1038; diff --git a/target_chains/ton/contracts/contracts/common/governance_actions.fc b/target_chains/ton/contracts/contracts/common/governance_actions.fc index 94d2580c3b..adf2d29189 100644 --- a/target_chains/ton/contracts/contracts/common/governance_actions.fc +++ b/target_chains/ton/contracts/contracts/common/governance_actions.fc @@ -1,4 +1,4 @@ -const int UPGRADE_CONTRACT = 0; +const int AUTHORIZE_UPGRADE_CONTRACT = 0; const int AUTHORIZE_GOVERNANCE_DATA_SOURCE_TRANSFER = 1; const int SET_DATA_SOURCES = 2; const int SET_FEE = 3; diff --git a/target_chains/ton/contracts/contracts/common/op.fc b/target_chains/ton/contracts/contracts/common/op.fc index b5dac268e7..87471657f2 100644 --- a/target_chains/ton/contracts/contracts/common/op.fc +++ b/target_chains/ton/contracts/contracts/common/op.fc @@ -1,3 +1,4 @@ const int OP_UPDATE_GUARDIAN_SET = 1; const int OP_UPDATE_PRICE_FEEDS = 2; const int OP_EXECUTE_GOVERNANCE_ACTION = 3; +const int OP_UPGRADE_CONTRACT = 4; diff --git a/target_chains/ton/contracts/contracts/common/storage.fc b/target_chains/ton/contracts/contracts/common/storage.fc index db87edf313..e7e947b656 100644 --- a/target_chains/ton/contracts/contracts/common/storage.fc +++ b/target_chains/ton/contracts/contracts/common/storage.fc @@ -11,6 +11,7 @@ global int single_update_fee; global cell data_sources; ;; Dictionary of DataSource tuples, keyed by u8 global int num_data_sources; global cell is_valid_data_source; ;; Dictionary of int (0 as false, -1 as true), keyed by DataSource cell_hash +global int upgrade_code_hash; ;; 256-bit unsigned integer ;; Wormhole @@ -54,6 +55,7 @@ global int governance_data_source_index; ;; u32 .store_ref(governance_data_source) .store_uint(last_executed_governance_sequence, 64) .store_uint(governance_data_source_index, 32) + .store_uint(upgrade_code_hash, 256) .end_cell(); begin_cell() @@ -94,6 +96,7 @@ global int governance_data_source_index; ;; u32 governance_data_source = governance_slice~load_ref(); last_executed_governance_sequence = governance_slice~load_uint(64); governance_data_source_index = governance_slice~load_uint(32); + upgrade_code_hash = governance_slice~load_uint(256); ds.end_parse(); } diff --git a/target_chains/ton/contracts/contracts/tests/PythTest.fc b/target_chains/ton/contracts/contracts/tests/PythTest.fc index 579e1f2d9c..d65bab5c40 100644 --- a/target_chains/ton/contracts/contracts/tests/PythTest.fc +++ b/target_chains/ton/contracts/contracts/tests/PythTest.fc @@ -20,12 +20,15 @@ int op = in_msg_body~load_uint(32); cell data = in_msg_body~load_ref(); + slice data_slice = data.begin_parse(); if (op == OP_UPDATE_GUARDIAN_SET) { - update_guardian_set(data.begin_parse()); + update_guardian_set(data_slice); } elseif (op == OP_UPDATE_PRICE_FEEDS) { - update_price_feeds(msg_value, data.begin_parse()); + update_price_feeds(msg_value, data_slice); } elseif (op == OP_EXECUTE_GOVERNANCE_ACTION) { - execute_governance_action(data.begin_parse()); + execute_governance_action(data_slice); + } elseif (op == OP_UPGRADE_CONTRACT) { + execute_upgrade_contract(data); } else { throw(0xffff); ;; Throw exception for unknown op } diff --git a/target_chains/ton/contracts/contracts/tests/PythTestUpgraded.fc b/target_chains/ton/contracts/contracts/tests/PythTestUpgraded.fc new file mode 100644 index 0000000000..eb2ba19111 --- /dev/null +++ b/target_chains/ton/contracts/contracts/tests/PythTestUpgraded.fc @@ -0,0 +1,78 @@ +{- + This test contract is an upgraded version of PythTest.fc. This is used to test the upgrade functionality of the Pyth contract. +-} + +#include "../imports/stdlib.fc"; +#include "../Pyth.fc"; +#include "../Wormhole.fc"; +#include "../common/op.fc"; + +() recv_internal(int balance, int msg_value, cell in_msg_full, slice in_msg_body) impure { + if (in_msg_body.slice_empty?()) { + return (); + } + + int op = in_msg_body~load_uint(32); + cell data = in_msg_body~load_ref(); + slice data_slice = data.begin_parse(); + if (op == OP_UPDATE_GUARDIAN_SET) { + update_guardian_set(data_slice); + } elseif (op == OP_UPDATE_PRICE_FEEDS) { + update_price_feeds(msg_value, data_slice); + } elseif (op == OP_EXECUTE_GOVERNANCE_ACTION) { + execute_governance_action(data_slice); + } elseif (op == OP_UPGRADE_CONTRACT) { + execute_upgrade_contract(data); + } else { + throw(0xffff); ;; Throw exception for unknown op + } +} + +(int, int, int, int) test_get_price_unsafe(int price_feed_id) method_id { + return get_price_unsafe(price_feed_id); +} + +(int, int, int, int) test_get_price_no_older_than(int time_period, int price_feed_id) method_id { + return get_price_no_older_than(time_period, price_feed_id); +} + +(int, int, int, int) test_get_ema_price_unsafe(int price_feed_id) method_id { + return get_ema_price_unsafe(price_feed_id); +} + +(int, int, int, int) test_get_ema_price_no_older_than(int time_period, int price_feed_id) method_id { + return get_ema_price_no_older_than(time_period, price_feed_id); +} + +(int) test_get_update_fee(slice in_msg_body) method_id { + return get_update_fee(in_msg_body); +} + +(int) test_get_single_update_fee() method_id { + return get_single_update_fee(); +} + +(int) test_get_chain_id() method_id { + return get_chain_id(); +} + +(int) test_get_last_executed_governance_sequence() method_id { + return get_last_executed_governance_sequence(); +} + +(int) test_get_governance_data_source_index() method_id { + return get_governance_data_source_index(); +} + +(cell) test_get_governance_data_source() method_id { + return get_governance_data_source(); +} + +(int) test_get_is_valid_data_source(cell data_source) method_id { + return get_is_valid_data_source(data_source); +} + +;; Add a new function to demonstrate the upgrade +(int) test_new_function() method_id { + return 1; +} diff --git a/target_chains/ton/contracts/contracts/tests/WormholeTest.fc b/target_chains/ton/contracts/contracts/tests/WormholeTest.fc index 475ec1d584..249444f112 100644 --- a/target_chains/ton/contracts/contracts/tests/WormholeTest.fc +++ b/target_chains/ton/contracts/contracts/tests/WormholeTest.fc @@ -19,8 +19,9 @@ int op = in_msg_body~load_uint(32); cell data = in_msg_body~load_ref(); + slice data_slice = data.begin_parse(); if (op == OP_UPDATE_GUARDIAN_SET) { - update_guardian_set(data.begin_parse()); + update_guardian_set(data_slice); } else { throw(0xffff); ;; Throw exception for unknown op } diff --git a/target_chains/ton/contracts/package.json b/target_chains/ton/contracts/package.json index 7948c04a43..b7e2f21ac5 100644 --- a/target_chains/ton/contracts/package.json +++ b/target_chains/ton/contracts/package.json @@ -18,6 +18,7 @@ "@ton/ton": "^13.11.2", "@types/jest": "^29.5.12", "@types/node": "^20.14.10", + "@wormhole-foundation/sdk-definitions": "^0.10.7", "jest": "^29.7.0", "prettier": "^3.3.2", "ts-jest": "^29.2.0", diff --git a/target_chains/ton/contracts/tests/PythTest.spec.ts b/target_chains/ton/contracts/tests/PythTest.spec.ts index 41df313bbf..34be57a879 100644 --- a/target_chains/ton/contracts/tests/PythTest.spec.ts +++ b/target_chains/ton/contracts/tests/PythTest.spec.ts @@ -12,10 +12,17 @@ import { TEST_GUARDIAN_ADDRESS1, PYTH_AUTHORIZE_GOVERNANCE_DATA_SOURCE_TRANSFER, PYTH_REQUEST_GOVERNANCE_DATA_SOURCE_TRANSFER, + TEST_GUARDIAN_ADDRESS2, } from "./utils/pyth"; import { GUARDIAN_SET_0, MAINNET_UPGRADE_VAAS } from "./utils/wormhole"; import { DataSource } from "@pythnetwork/xc-admin-common"; -import { parseDataSource } from "./utils"; +import { parseDataSource, createAuthorizeUpgradePayload } from "./utils"; +import { + UniversalAddress, + createVAA, + serialize, +} from "@wormhole-foundation/sdk-definitions"; +import { mocks } from "@wormhole-foundation/sdk-definitions/testing"; const TIME_PERIOD = 60; const PRICE = new Price({ @@ -49,6 +56,11 @@ const TEST_GOVERNANCE_DATA_SOURCES: DataSource[] = [ emitterAddress: "000000000000000000000000000000000000000000000000000000000000002b", }, + { + emitterChain: 1, + emitterAddress: + "0000000000000000000000000000000000000000000000000000000000000000", + }, ]; describe("PythTest", () => { @@ -343,7 +355,7 @@ describe("PythTest", () => { from: deployer.address, to: pythTest.address, success: false, - exitCode: 1037, // ERROR_INSUFFICIENT_GAS + exitCode: 1038, // ERROR_INSUFFICIENT_GAS }); }); @@ -719,4 +731,144 @@ describe("PythTest", () => { exitCode: 1033, // ERROR_OLD_GOVERNANCE_MESSAGE }); }); + + it("should successfully upgrade the contract", async () => { + // Compile the upgraded contract + const upgradedCode = await compile("PythTestUpgraded"); + const upgradedCodeHash = upgradedCode.hash(); + + // Create the authorize upgrade payload + const authorizeUpgradePayload = + createAuthorizeUpgradePayload(upgradedCodeHash); + + const authorizeUpgradeVaa = createVAA("Uint8Array", { + guardianSet: 0, + timestamp: 0, + nonce: 0, + emitterChain: "Solana", + emitterAddress: new UniversalAddress(new Uint8Array(32)), + sequence: 1n, + consistencyLevel: 0, + signatures: [], + payload: authorizeUpgradePayload, + }); + + const guardianSet = mocks.devnetGuardianSet(); + guardianSet.setSignatures(authorizeUpgradeVaa); + + await deployContract( + BTC_PRICE_FEED_ID, + TIME_PERIOD, + PRICE, + EMA_PRICE, + SINGLE_UPDATE_FEE, + DATA_SOURCES, + 0, + [TEST_GUARDIAN_ADDRESS2], + 1, + 1, + "0000000000000000000000000000000000000000000000000000000000000000", + TEST_GOVERNANCE_DATA_SOURCES[2] + ); + + // Execute the upgrade + const sendExecuteGovernanceActionResult = + await pythTest.sendExecuteGovernanceAction( + deployer.getSender(), + Buffer.from(serialize(authorizeUpgradeVaa)) + ); + + expect(sendExecuteGovernanceActionResult.transactions).toHaveTransaction({ + from: deployer.address, + to: pythTest.address, + success: true, + }); + + // Execute the upgrade + const sendUpgradeContractResult = await pythTest.sendUpgradeContract( + deployer.getSender(), + upgradedCode + ); + + expect(sendUpgradeContractResult.transactions).toHaveTransaction({ + from: deployer.address, + to: pythTest.address, + success: true, + }); + + // Verify that the contract has been upgraded by calling a new method + const newMethodResult = await pythTest.getNewFunction(); + expect(newMethodResult).toBe(1); + }); + + it("should fail to upgrade the contract with modified code", async () => { + // Compile the upgraded contract + const upgradedCode = await compile("PythTestUpgraded"); + const upgradedCodeHash = upgradedCode.hash(); + + // Create the authorize upgrade payload + const authorizeUpgradePayload = + createAuthorizeUpgradePayload(upgradedCodeHash); + + const authorizeUpgradeVaa = createVAA("Uint8Array", { + guardianSet: 0, + timestamp: 0, + nonce: 0, + emitterChain: "Solana", + emitterAddress: new UniversalAddress(new Uint8Array(32)), + sequence: 1n, + consistencyLevel: 0, + signatures: [], + payload: authorizeUpgradePayload, + }); + + const guardianSet = mocks.devnetGuardianSet(); + guardianSet.setSignatures(authorizeUpgradeVaa); + + await deployContract( + BTC_PRICE_FEED_ID, + TIME_PERIOD, + PRICE, + EMA_PRICE, + SINGLE_UPDATE_FEE, + DATA_SOURCES, + 0, + [TEST_GUARDIAN_ADDRESS2], + 1, + 1, + "0000000000000000000000000000000000000000000000000000000000000000", + TEST_GOVERNANCE_DATA_SOURCES[2] + ); + + // Execute the upgrade authorization + const sendExecuteGovernanceActionResult = + await pythTest.sendExecuteGovernanceAction( + deployer.getSender(), + Buffer.from(serialize(authorizeUpgradeVaa)) + ); + + expect(sendExecuteGovernanceActionResult.transactions).toHaveTransaction({ + from: deployer.address, + to: pythTest.address, + success: true, + }); + + // Attempt to execute the upgrade with a different code + const wormholeTestCode = await compile("WormholeTest"); + const sendUpgradeContractResult = await pythTest.sendUpgradeContract( + deployer.getSender(), + wormholeTestCode + ); + + // Expect the transaction to fail + expect(sendUpgradeContractResult.transactions).toHaveTransaction({ + from: deployer.address, + to: pythTest.address, + success: false, + exitCode: 1037, // ERROR_INVALID_CODE_HASH + }); + + // Verify that the contract has not been upgraded by attempting to call the new method + await expect(pythTest.getNewFunction()).rejects.toThrow(); + }); }); diff --git a/target_chains/ton/contracts/tests/utils.ts b/target_chains/ton/contracts/tests/utils.ts index 36bba5f7ea..bd94fd8789 100644 --- a/target_chains/ton/contracts/tests/utils.ts +++ b/target_chains/ton/contracts/tests/utils.ts @@ -1,5 +1,11 @@ import { DataSource } from "@pythnetwork/xc-admin-common"; import { Cell, Transaction, beginCell } from "@ton/core"; +import { Buffer } from "buffer"; + +const GOVERNANCE_MAGIC = 0x5054474d; +const GOVERNANCE_MODULE = 1; +const AUTHORIZE_UPGRADE_CONTRACT_ACTION = 0; +const TARGET_CHAIN_ID = 1; export function createCellChain(buffer: Buffer): Cell { let chunks = bufferToChunks(buffer, 127); @@ -67,3 +73,13 @@ export function printTxGasStats(name: string, transaction: Transaction) { console.log(`${name} gas cost: ${txComputed.gasFees}`); return txComputed.gasFees; } + +export function createAuthorizeUpgradePayload(newCodeHash: Buffer): Buffer { + const payload = Buffer.alloc(8); + payload.writeUInt32BE(GOVERNANCE_MAGIC, 0); + payload.writeUInt8(GOVERNANCE_MODULE, 4); + payload.writeUInt8(AUTHORIZE_UPGRADE_CONTRACT_ACTION, 5); + payload.writeUInt16BE(TARGET_CHAIN_ID, 6); + + return Buffer.concat([payload, newCodeHash]); +} diff --git a/target_chains/ton/contracts/tests/utils/pyth.ts b/target_chains/ton/contracts/tests/utils/pyth.ts index f57e27945f..e631bccc1b 100644 --- a/target_chains/ton/contracts/tests/utils/pyth.ts +++ b/target_chains/ton/contracts/tests/utils/pyth.ts @@ -40,6 +40,9 @@ export const BTC_PRICE_FEED_ID = export const TEST_GUARDIAN_ADDRESS1 = "0x686b9ea8e3237110eaaba1f1b7467559a3273819"; +export const TEST_GUARDIAN_ADDRESS2 = + "0xbefa429d57cd18b7f8a4d91a2da9ab4af05d0fbe"; + // A Pyth governance instruction to authorize governance data source transfer signed by the test guardian #1. // From: target_chains/starknet/contracts/tests/data.cairo::pyth_auth_transfer() export const PYTH_AUTHORIZE_GOVERNANCE_DATA_SOURCE_TRANSFER = diff --git a/target_chains/ton/contracts/wrappers/PythTest.ts b/target_chains/ton/contracts/wrappers/PythTest.ts index 4054d72529..302b1230ff 100644 --- a/target_chains/ton/contracts/wrappers/PythTest.ts +++ b/target_chains/ton/contracts/wrappers/PythTest.ts @@ -156,8 +156,9 @@ export class PythTest implements Contract { .endCell() : beginCell().endCell() ) // governance_data_source - .storeUint(0, 64) // last_executed_governance_sequence - .storeUint(0, 32) // governance_data_source_index + .storeUint(0, 64) // last_executed_governance_sequence, set to 0 for initial state + .storeUint(0, 32) // governance_data_source_index, set to 0 for initial state + .storeUint(0, 256) // upgrade_code_hash, set to 0 for initial state .endCell(); // Create the main cell with references to grouped data @@ -350,6 +351,23 @@ export class PythTest implements Contract { }); } + async sendUpgradeContract( + provider: ContractProvider, + via: Sender, + newCode: Cell + ) { + const messageBody = beginCell() + .storeUint(4, 32) // OP_UPGRADE_CONTRACT + .storeRef(newCode) + .endCell(); + + await provider.internal(via, { + value: toNano("0.1"), + sendMode: SendMode.PAY_GAS_SEPARATELY, + body: messageBody, + }); + } + async getIsValidDataSource( provider: ContractProvider, dataSource: DataSource @@ -365,4 +383,9 @@ export class PythTest implements Contract { ]); return result.stack.readBoolean(); } + + async getNewFunction(provider: ContractProvider) { + const result = await provider.get("test_new_function", []); + return result.stack.readNumber(); + } } diff --git a/target_chains/ton/contracts/wrappers/PythTestUpgraded.compile.ts b/target_chains/ton/contracts/wrappers/PythTestUpgraded.compile.ts new file mode 100644 index 0000000000..7d3d8adf15 --- /dev/null +++ b/target_chains/ton/contracts/wrappers/PythTestUpgraded.compile.ts @@ -0,0 +1,6 @@ +import { CompilerConfig } from "@ton/blueprint"; + +export const compile: CompilerConfig = { + lang: "func", + targets: ["contracts/tests/PythTestUpgraded.fc"], +}; diff --git a/target_chains/ton/contracts/wrappers/WormholeTest.ts b/target_chains/ton/contracts/wrappers/WormholeTest.ts index 8e161cc32d..fed414792b 100644 --- a/target_chains/ton/contracts/wrappers/WormholeTest.ts +++ b/target_chains/ton/contracts/wrappers/WormholeTest.ts @@ -85,6 +85,7 @@ export class WormholeTest implements Contract { .storeRef(beginCell()) // governance_data_source, empty for initial state .storeUint(0, 64) // last_executed_governance_sequence, set to 0 for initial state .storeUint(0, 32) // governance_data_source_index, set to 0 for initial state + .storeUint(0, 256) // upgrade_code_hash, set to 0 for initial state .endCell(); // Create the main cell with references to grouped data