diff --git a/package-lock.json b/package-lock.json index 476ea5d..66dd385 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simbolik", - "version": "3.1.1", + "version": "4.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "simbolik", - "version": "3.1.1", + "version": "4.0.0", "dependencies": { "@solidity-parser/parser": "^0.18.0", "@types/ws": "^8.5.10", @@ -35,9 +35,9 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.0.tgz", - "integrity": "sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", @@ -635,6 +635,28 @@ "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.18.0.tgz", "integrity": "sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==" }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "peer": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "peer": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -703,9 +725,9 @@ "dev": true }, "node_modules/@types/ws": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", - "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", "dependencies": { "@types/node": "*" } @@ -921,73 +943,73 @@ } }, "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", "dev": true, "peer": true, "dependencies": { @@ -995,9 +1017,9 @@ } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", "dev": true, "peer": true, "dependencies": { @@ -1005,79 +1027,79 @@ } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" } }, @@ -1107,16 +1129,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, - "peer": true, - "peerDependencies": { - "acorn": "^8" - } - }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -1461,9 +1473,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001675", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001675.tgz", - "integrity": "sha512-/wV1bQwPrkLiQMjaJF5yUMVM/VdRPOCU8QZ+PmG6uW6DvYSrNY1bpwHI/3mOcUosLaJCzYDi5o91IQB51ft6cg==", + "version": "1.0.30001679", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001679.tgz", + "integrity": "sha512-j2YqID/YwpLnKzCmBOS4tlZdWprXm3ZmQLBH9ZBXFOhoxLA46fwyBvx6toCBWBmnuwUY/qB3kEU6gFx8qgCroA==", "dev": true, "funding": [ { @@ -1631,9 +1643,9 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -1741,9 +1753,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.5.49", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.49.tgz", - "integrity": "sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A==", + "version": "1.5.55", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.55.tgz", + "integrity": "sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg==", "dev": true, "peer": true }, @@ -3356,9 +3368,9 @@ } }, "node_modules/mocha": { - "version": "10.8.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.1.tgz", - "integrity": "sha512-WxSpEWgF03HfgNKBuysfK40DUaOSVX5zxgLDoieMGO+zyE69iq2eQ1vBypvIJ5mOPKpuVAqWiTbt4Orj7L6wVw==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", "dev": true, "dependencies": { "ansi-colors": "^4.1.3", @@ -4547,9 +4559,9 @@ } }, "node_modules/synckit/node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true }, "node_modules/tapable": { @@ -4814,19 +4826,19 @@ } }, "node_modules/webpack": { - "version": "5.95.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", - "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", + "version": "5.96.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", + "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", "dev": true, "peer": true, "dependencies": { - "@types/estree": "^1.0.5", + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", diff --git a/package.json b/package.json index f5b6a55..8e4f1b3 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "publisher": "runtimeverification", "description": "Advanced Solidity and EVM Debugger", - "version": "3.1.1", + "version": "4.0.0", "engines": { "vscode": "^1.79.0" }, @@ -94,7 +94,7 @@ "simbolik.auto-open-disassembly-view": { "type": "boolean", "description": "If set to true, the debugger will automatically open the disassembly view when starting a debugging session.", - "default": true, + "default": false, "order": 8 }, "simbolik.json-rpc-url": { @@ -210,7 +210,7 @@ "build": "npm run vscode:prepublish", "vscode:prepublish": "npm run esbuild-base -- --minify && npm run esbuild-base-web -- --minify", "esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=build/extension.js --external:vscode --format=cjs --platform=node", - "esbuild-base-web": "esbuild ./src/extension.web.ts --bundle --outfile=build/extension.web.js --external:vscode --format=esm --platform=browser", + "esbuild-base-web": "esbuild ./src/extension.web.ts --bundle --outfile=build/extension.web.js --external:vscode --format=cjs --platform=browser --target=es2020 --minify", "esbuild": "npm run esbuild-base -- --sourcemap", "compile": "tsc -p ./tsconfig.json", "compile-web": "tsc -p ./tsconfig.web.json", diff --git a/src/DebugAdapter.ts b/src/DebugAdapter.ts index 8b49e4c..0ec1ba3 100644 --- a/src/DebugAdapter.ts +++ b/src/DebugAdapter.ts @@ -56,8 +56,8 @@ class WebsocketDebugAdapter implements vscode.DebugAdapter { websocket.onmessage = (message: MessageEvent) => { const payload = message.data.toString(); const data = JSON.parse(payload); - const dataWithAbsolutePaht = this.prependPaths(data); - this._onDidSendMessage.fire(dataWithAbsolutePaht); + const dataWithAbsolutePaths = this.prependPaths(data); + this._onDidSendMessage.fire(dataWithAbsolutePaths); }; } @@ -75,8 +75,12 @@ class WebsocketDebugAdapter implements vscode.DebugAdapter { this.websocket.close(); } - foundryRoot() : string { - return this.configuration['clientMount'] + foundryRoot() : vscode.Uri { + if (!this.configuration['clientMount']) { + return vscode.Uri.parse('file:///'); + } + const uri = vscode.Uri.from(this.configuration['clientMount']); + return uri; } /** @@ -91,9 +95,11 @@ class WebsocketDebugAdapter implements vscode.DebugAdapter { const result = Object.assign({}, message); for (const key in message) { if (['path', 'symbolFilePath'].includes(key) && typeof message[key] === 'string') { - result[key] = stripPrefix(message[key], `${this.foundryRoot()}/`); + const uri = vscode.Uri.parse(message[key]); + result[key] = relativeTo(uri, this.foundryRoot()); } else if (key == 'file' && typeof message[key] === 'string') { - result[key] = stripPrefix(message[key], `file://${this.foundryRoot()}/`); + const uri = vscode.Uri.parse(message[key]); + result[key] = relativeTo(uri, this.foundryRoot()); } else if (typeof message[key] === 'object') { result[key] = this.trimPaths(message[key]); } @@ -117,7 +123,7 @@ class WebsocketDebugAdapter implements vscode.DebugAdapter { if (['path', 'symbolFilePath', 'file'].includes(key) && typeof message[key] === 'string') { result[key] = `${this.foundryRoot()}/${message[key]}`; } else if (key == 'file' && typeof message[key] === 'string') { - result[key] = `file://${this.foundryRoot()}/${message[key]}`; + result[key] = `${this.foundryRoot()}/${message[key]}`; } else if (typeof message[key] === 'object') { result[key] = this.prependPaths(message[key]); } @@ -129,6 +135,14 @@ class WebsocketDebugAdapter implements vscode.DebugAdapter { } +function relativeTo(uri: vscode.Uri, prefixUri: vscode.Uri): string { + const s = uri.path; + const prefix = prefixUri.path + '/'; + const relative = stripPrefix(s, prefix); + const result = stripPrefix(relative, '/'); + return result; +} + function stripPrefix(s: string, prefix: string): string { if (s.startsWith(prefix)) { return s.slice(prefix.length); diff --git a/src/DebugAdapter.web.ts b/src/DebugAdapter.web.ts index 4d45cda..fbd4e34 100644 --- a/src/DebugAdapter.web.ts +++ b/src/DebugAdapter.web.ts @@ -15,7 +15,7 @@ export class SolidityDebugAdapterDescriptorFactory const server = getConfigValue('server', 'wss://beta.simbolik.runtimeverification.com'); const websocket = new WebSocket(server); websocket.onopen = () => { - const websocketAdapter = new WebsocketDebugAdapter(websocket); + const websocketAdapter = new WebsocketDebugAdapter(websocket, session.configuration); const implementation = new vscode.DebugAdapterInlineImplementation(websocketAdapter); resolve(implementation); }; @@ -42,25 +42,109 @@ export class SolidityDebugAdapterDescriptorFactory } } +type WithApiKey = { apiKey: string }; +type WithClientVersion = { clientVersion: string }; + +type DebugProtocolMessage = vscode.DebugProtocolMessage & WithApiKey & WithClientVersion; + class WebsocketDebugAdapter implements vscode.DebugAdapter { _onDidSendMessage = new vscode.EventEmitter(); - constructor(private websocket: WebSocket) { + constructor(private websocket: WebSocket, private configuration: vscode.DebugConfiguration) { websocket.onmessage = (message: MessageEvent) => { - message.data.text().then((payload: string) => { - const json = JSON.parse(payload); - this._onDidSendMessage.fire(json); - }); + const data = JSON.parse(message.data); + const dataWithAbsolutePaths = this.prependPaths(data); + this._onDidSendMessage.fire(dataWithAbsolutePaths); }; } onDidSendMessage = this._onDidSendMessage.event; handleMessage(message: vscode.DebugProtocolMessage): void { - this.websocket.send(JSON.stringify(message)); + const apiKey = getConfigValue('api-key', ''); + const clientVersion = vscode.extensions.getExtension('simbolik.simbolik')?.packageJSON.version; + const messageWithApiKey : DebugProtocolMessage = Object.assign({}, message, {apiKey, clientVersion}); + const messageWithRelativePaths = this.trimPaths(messageWithApiKey); + this.websocket.send(JSON.stringify(messageWithRelativePaths)); } dispose() { this.websocket.close(); } + + foundryRoot() : vscode.Uri { + if (!this.configuration['clientMount']) { + return vscode.Uri.parse('file:///'); + } + const uri = vscode.Uri.from(this.configuration['clientMount']); + return uri; + } + + /** + * Recursively walk over all object properties and for each property + * named `path` and type `string`, remove the foundry root from the path. + * @param message + */ + trimPaths(message: {[key: string]: any} | any[] ) : {[key: string]: any} | any[] { + if (Array.isArray(message)) { + return message.map((item) => this.trimPaths(item)); + } else if (message instanceof Object) { + const result = Object.assign({}, message); + for (const key in message) { + if (['path', 'symbolFilePath'].includes(key) && typeof message[key] === 'string') { + const uri = vscode.Uri.parse(message[key]); + result[key] = relativeTo(uri, this.foundryRoot()); + } else if (key == 'file' && typeof message[key] === 'string') { + const uri = vscode.Uri.parse(message[key]); + result[key] = relativeTo(uri, this.foundryRoot()); + } else if (typeof message[key] === 'object') { + result[key] = this.trimPaths(message[key]); + } + } + return result; + } + return message; + } + + /** + * Recursively walk over all object properties and for each property + * named `path` and type `string`, prepend the foundry root to the path. + * @param message + */ + prependPaths(message: {[key: string]: any} | any[]) : {[key: string]: any} | any[] { + if (Array.isArray(message)) { + return message.map((item) => this.prependPaths(item)); + } else if (message instanceof Object) { + const result = Object.assign({}, message); + for (const key in message) { + if (['path', 'symbolFilePath', 'file'].includes(key) && typeof message[key] === 'string') { + result[key] = `${this.foundryRoot()}/${message[key]}`; + } else if (key == 'file' && typeof message[key] === 'string') { + result[key] = `${this.foundryRoot()}/${message[key]}`; + } else if (typeof message[key] === 'object') { + result[key] = this.prependPaths(message[key]); + } + } + return result; + } + return message; + } } + +function relativeTo(uri: vscode.Uri, prefixUri: vscode.Uri): string { + const s = uri.path; + const prefix = prefixUri.path; + const relative = stripPrefix(s, prefix); + const result = stripPrefix(relative, '/'); + console.log('uri', uri); + console.log('prefixUri', prefixUri); + console.log('result', result); + return result; +} + +function stripPrefix(s: string, prefix: string): string { + if (s.startsWith(prefix)) { + return s.slice(prefix.length); + } + return s; +} \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 38e93a9..a2e7e77 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -83,12 +83,13 @@ export function activate(context: vscode.ExtensionContext) { kastProvider ); + vscode.debug.onDidStartDebugSession(session => { outputChannel.info(`Debug session started: ${session.id}`); if (session.type === 'solidity') { - if (getConfigValue('auto-open-disassembly-view', true)) { + if (getConfigValue('auto-open-disassembly-view', false)) { vscode.commands.executeCommand('debug.action.openDisassemblyView'); - } + } } }); diff --git a/src/extension.web.ts b/src/extension.web.ts index caaf109..8a23374 100644 --- a/src/extension.web.ts +++ b/src/extension.web.ts @@ -5,6 +5,9 @@ import {CodelensProvider} from './CodelensProvider'; import {SolidityDebugAdapterDescriptorFactory} from './DebugAdapter.web'; import {startDebugging} from './startDebugging'; import {KastProvider, viewKast} from './KastProvider'; +import {getConfigValue} from './utils'; + +console.log("Hello from Simbolik!"); const outputChannel = vscode.window.createOutputChannel( 'Simbolik Solidity Debugger', @@ -36,7 +39,7 @@ export function activate(context: vscode.ExtensionContext) { disposable = vscode.commands.registerCommand( 'simbolik.startDebugging', - startDebugging + (contract, method) => startDebugging(contract, method), ); context.subscriptions.push(disposable); @@ -51,6 +54,15 @@ export function activate(context: vscode.ExtensionContext) { vscode.debug.onDidStartDebugSession(session => { outputChannel.info(`Debug session started: ${session.id}`); + if (session.type === 'solidity') { + if (getConfigValue('auto-open-disassembly-view', false)) { + vscode.commands.executeCommand('debug.action.openDisassemblyView'); + } + } + }); + + vscode.debug.onDidTerminateDebugSession(session => { + outputChannel.info(`Debug session ended: ${session.id}`); }); } diff --git a/src/foundry.ts b/src/foundry.ts index 33853f1..edf2bcd 100644 --- a/src/foundry.ts +++ b/src/foundry.ts @@ -3,10 +3,10 @@ import {getConfigValue} from './utils'; import {parse as parseToml} from 'smol-toml'; export -function forgeBuildTask(file: string) { +function forgeBuildTask(file: vscode.Uri) { const incrementalBuild = getConfigValue('incremental-build', false); const forgePath = getConfigValue('forge-path', 'forge'); - const cwd = file.substring(0, file.lastIndexOf('/')); + const cwd = file.with({path: file.path.split('/').slice(0, -1).join('/')}).fsPath; const task = new vscode.Task( { label: 'forge build', @@ -20,7 +20,7 @@ function forgeBuildTask(file: string) { env: { 'FOUNDRY_OPTIMIZER': 'false', 'FOUNDRY_BUILD_INFO': 'true', - 'FOUNDRY_EXTRA_OUTPUT': '["storageLayout", "evm.bytecode.generatedSources", "evm.legacyAssembly"]', + 'FOUNDRY_EXTRA_OUTPUT': '["storageLayout", "evm.bytecode.generatedSources", "evm.legacyAssembly", "evm.deployedBytecode.immutableReferences"]', 'FOUNDRY_BYTECODE_HASH': 'ipfs', 'FOUNDRY_CBOR_METADATA': 'true', 'FOUNDRY_FORCE': incrementalBuild ? 'false' : 'true', @@ -33,56 +33,59 @@ function forgeBuildTask(file: string) { } export -async function loadBuildInfo(file: string): Promise { +async function loadBuildInfo(file: vscode.Uri): Promise { const root = await foundryRoot(file); const buildInfo = await forgeBuildInfo(root); return buildInfo; } export -async function foundryRoot(file: string) { +async function foundryRoot(file: vscode.Uri): Promise { // Find the root of the project, which is the directory containing the foundry.toml file - let root = file; + let base = file.with({'path': '/'}) + let pathSegments = file.path.split('/'); let stat; try { - stat = await vscode.workspace.fs.stat(vscode.Uri.file(`${root}/foundry.toml`)); + const uri = vscode.Uri.joinPath(base, ...pathSegments, 'foundry.toml'); + stat = await vscode.workspace.fs.stat(uri); } catch (e) { stat = false; } while (!stat) { - const lastSlash = root.lastIndexOf('/'); - if (lastSlash === -1) { - throw new Error('Could not find foundry.toml'); + if (pathSegments.length === 0) { + throw new Error('No foundry.toml found'); } - root = root.substring(0, lastSlash); + pathSegments.pop(); try { - stat = await vscode.workspace.fs.stat(vscode.Uri.file(`${root}/foundry.toml`)); + const uri = vscode.Uri.joinPath(base, ...pathSegments, 'foundry.toml'); + stat = await vscode.workspace.fs.stat(uri); } catch (e) { stat = false; } } - return root; + return vscode.Uri.joinPath(base, ...pathSegments); } export type FoundryConfig = { 'profile'?: { [profile: string]: { [key: string]: string } } }; export -async function foundryConfig(root: string): Promise { - const configPath = `${root}/foundry.toml`; - const config = await vscode.workspace.fs.readFile(vscode.Uri.file(configPath)); - return parseToml(config.toString()); +async function foundryConfig(root: vscode.Uri): Promise { + const configPath = vscode.Uri.joinPath(root, 'foundry.toml'); + const config = await vscode.workspace.fs.readFile(configPath); + const text = new TextDecoder().decode(config); + return parseToml(text); } -async function forgeBuildInfo(root: string): Promise { +async function forgeBuildInfo(root: vscode.Uri): Promise { const config = await foundryConfig(root); const out = config?.profile?.default?.out ?? 'out'; // Get the contents of the youngest build-info file - const buildInfoDir = `${root}/${out}/build-info`; + const buildInfoDir = vscode.Uri.joinPath(root, out, 'build-info'); // Get list of build-info files - const files = await vscode.workspace.fs.readDirectory(vscode.Uri.file(buildInfoDir)); + const files = await vscode.workspace.fs.readDirectory(buildInfoDir); const buildInfoFiles = files.filter(([file, type]) => type === vscode.FileType.File && file.endsWith('.json')); if (buildInfoFiles.length === 0) { @@ -95,13 +98,14 @@ async function forgeBuildInfo(root: string): Promise { // Read the youngest build-info file const youngestBuildInfo = await vscode.workspace.fs.readFile(sortedFiles[0].uri); - return youngestBuildInfo.toString(); + const text = new TextDecoder().decode(youngestBuildInfo); + return text; } -async function getSortedFilesByCreationTime(buildInfoDir: string, buildInfoFiles: [string, vscode.FileType][]): Promise<{ file: string, uri: vscode.Uri, ctime: number }[]> { +async function getSortedFilesByCreationTime(buildInfoDir: vscode.Uri, buildInfoFiles: [string, vscode.FileType][]): Promise<{ file: string, uri: vscode.Uri, ctime: number }[]> { const filesWithStats = await Promise.all( buildInfoFiles.map(async ([file]) => { - const fileUri = vscode.Uri.file(`${buildInfoDir}/${file}`); + const fileUri = vscode.Uri.joinPath(buildInfoDir, file); const fileStat = await vscode.workspace.fs.stat(fileUri); return { file, uri: fileUri, ctime: fileStat.ctime }; }) diff --git a/src/startDebugging.ts b/src/startDebugging.ts index 4332c84..f9f48ba 100644 --- a/src/startDebugging.ts +++ b/src/startDebugging.ts @@ -57,7 +57,7 @@ export async function startDebugging( const sourcifyUrl = getConfigValue('sourcify-url', 'http://localhost:5555'); const autobuild = getConfigValue('autobuild', true); if (autobuild) { - const build = forgeBuildTask(activeTextEditor.document.uri.fsPath); + const build = forgeBuildTask(activeTextEditor.document.uri); const buildExecution = await vscode.tasks.executeTask(build); try { await completed(buildExecution); @@ -65,8 +65,8 @@ export async function startDebugging( vscode.window.showErrorMessage('Failed to build project.'); } } - const myFoundryRoot = await foundryRoot(activeTextEditor.document.uri.fsPath); - const buildInfo = await loadBuildInfo(activeTextEditor.document.uri.fsPath); + const myFoundryRoot = await foundryRoot(activeTextEditor.document.uri); + const buildInfo = await loadBuildInfo(activeTextEditor.document.uri); const myDebugConfig = debugConfig( debugConfigName, file, @@ -79,6 +79,7 @@ export async function startDebugging( buildInfo, myFoundryRoot ); + console.log(myDebugConfig); const session = await vscode.debug.startDebugging( workspaceFolder, myDebugConfig @@ -109,7 +110,7 @@ function debugConfig( jsonRpcUrl: string, sourcifyUrl: string, buildInfo: string, - clientMount: string + clientMount: vscode.Uri ) { return { name: name, diff --git a/tsconfig.web.json b/tsconfig.web.json index 4e81f55..7adcb77 100644 --- a/tsconfig.web.json +++ b/tsconfig.web.json @@ -3,8 +3,11 @@ "compilerOptions": { "rootDir": "src", "outDir": "build-web", - "lib": ["ES2020", "DOM"], - "target": "ES2020" + "lib": ["ES2022", "DOM"], + "target": "ES2022", + "moduleResolution": "node", + "esModuleInterop": true, + "sourceMap": true }, "include": [ "src/**/*.ts",