diff --git a/astro-i18next.config.ts b/astro-i18next.config.ts index a118d1132..684352b39 100644 --- a/astro-i18next.config.ts +++ b/astro-i18next.config.ts @@ -2,6 +2,6 @@ export default { defaultLocale: "en", showDefaultLocale: true, - locales: ["en", "es"], + locales: ["en", "es", "zh"], load: ["server", "client"], } diff --git a/package-lock.json b/package-lock.json index 199b0e142..c92f17f52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ }, "devDependencies": { "@astrojs/mdx": "^0.19.7", - "@astrojs/preact": "^1.2.0", + "@astrojs/preact": "^3.0.1", "@astrojs/react": "^2.2.0", "@astrojs/sitemap": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^2.0.0", @@ -295,9 +295,9 @@ "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" }, "node_modules/@astrojs/image/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -458,19 +458,20 @@ } }, "node_modules/@astrojs/preact": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@astrojs/preact/-/preact-1.2.0.tgz", - "integrity": "sha512-Vm8rkBIE3cNlxhFoUO2Rsv5RxSP7x7Oi9J6qz8+91lwAIjdm6oyDOrrBmdGqsONJ1MqnjPG4EPmIZJGuFtz2SQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@astrojs/preact/-/preact-3.0.1.tgz", + "integrity": "sha512-pAfN+U7J4hw7qijqkBx1ZBpPO+ooa+MkKIgshCozfqsHTp18uPflxQUviz0TEzB5nn7hSndzncWuc3pz/HbtJw==", "dev": true, "dependencies": { - "@babel/core": ">=7.0.0-0 <8.0.0", - "@babel/plugin-transform-react-jsx": "^7.17.12", - "@preact/signals": "^1.1.0", - "babel-plugin-module-resolver": "^4.1.0", - "preact-render-to-string": "^5.2.4" + "@babel/plugin-transform-react-jsx": "^7.22.5", + "@babel/plugin-transform-react-jsx-development": "^7.22.5", + "@preact/preset-vite": "^2.5.0", + "@preact/signals": "^1.2.1", + "babel-plugin-transform-hook-names": "^1.0.2", + "preact-render-to-string": "^6.2.1" }, "engines": { - "node": "^14.18.0 || >=16.12.0" + "node": ">=18.14.1" }, "peerDependencies": { "preact": "^10.6.5" @@ -558,11 +559,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", - "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" @@ -606,11 +608,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.3.tgz", - "integrity": "sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dependencies": { - "@babel/types": "^7.22.3", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -620,11 +622,11 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -649,42 +651,42 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.1.tgz", - "integrity": "sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", - "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dependencies": { - "@babel/types": "^7.21.4" + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" @@ -709,9 +711,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", - "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "engines": { "node": ">=6.9.0" } @@ -728,28 +730,28 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz", - "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } @@ -776,12 +778,12 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -789,9 +791,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.4.tgz", - "integrity": "sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -800,11 +802,11 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz", - "integrity": "sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", + "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -814,15 +816,30 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.22.3.tgz", - "integrity": "sha512-JEulRWG2f04a7L8VWaOngWiK6p+JOSpB+DAtwfJgOaej1qdbNxqtK7MwTBHjUA10NeFcszlFNqCdbRcirzh2uQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.22.15.tgz", + "integrity": "sha512-oKckg2eZFa8771O/5vi7XeTvmM6+O9cxZu+kanTU7tD4sin5nO/G8jGJhq8Hvt2Z0kUoEDRayuZLaUlYl8QuGA==", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-module-imports": "^7.21.4", - "@babel/helper-plugin-utils": "^7.21.5", - "@babel/plugin-syntax-jsx": "^7.21.4", - "@babel/types": "^7.22.3" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-development": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.22.5.tgz", + "integrity": "sha512-bDhuzwWMuInwCYeDeMzyi7TaBgRQei6DqxhbyniL7/VG4RSS7HtSL2QbY4eESy1KJqlWt8g3xeEBGPuo+XqC8A==", + "dev": true, + "dependencies": { + "@babel/plugin-transform-react-jsx": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -843,31 +860,31 @@ } }, "node_modules/@babel/template": { - "version": "7.21.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.21.9.tgz", - "integrity": "sha512-MK0X5k8NKOuWRamiEfc3KEJiHMTkGZNUjzMipqCGDDc6ijRl/B7RGSKVGncu4Ro/HdyzzY6cmoXuKI2Gffk7vQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dependencies": { - "@babel/code-frame": "^7.21.4", - "@babel/parser": "^7.21.9", - "@babel/types": "^7.21.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.4.tgz", - "integrity": "sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ==", - "dependencies": { - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.22.3", - "@babel/helper-environment-visitor": "^7.22.1", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.22.4", - "@babel/types": "^7.22.4", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -876,12 +893,12 @@ } }, "node_modules/@babel/types": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.4.tgz", - "integrity": "sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dependencies": { - "@babel/helper-string-parser": "^7.21.5", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2056,6 +2073,14 @@ "@ethersproject/strings": "^5.7.0" } }, + "node_modules/@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "engines": { + "node": ">=14" + } + }, "node_modules/@fortawesome/fontawesome-free": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.2.tgz", @@ -2814,9 +2839,9 @@ } }, "node_modules/@openzeppelin/contracts": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.0.tgz", - "integrity": "sha512-DUP74AFGKlic2sQb/CmgrN2aUPMFGxRrmCTUxLHsiU2RzwWqVuMPZBxiAyvlff6Pea77uylAX6B5x9W6evEbhA==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.3.tgz", + "integrity": "sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==", "dev": true }, "node_modules/@pkgr/utils": { @@ -2843,13 +2868,52 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz", "integrity": "sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==" }, + "node_modules/@preact/preset-vite": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@preact/preset-vite/-/preset-vite-2.6.0.tgz", + "integrity": "sha512-5nztNzXbCpqyVum/K94nB2YQ5PTnvWdz4u7/X0jc8+kLyskSSpkNUxLQJeI90zfGSFIX1Ibj2G2JIS/mySHWYQ==", + "dev": true, + "dependencies": { + "@babel/plugin-transform-react-jsx": "^7.22.15", + "@babel/plugin-transform-react-jsx-development": "^7.22.5", + "@prefresh/vite": "^2.4.1", + "@rollup/pluginutils": "^4.1.1", + "babel-plugin-transform-hook-names": "^1.0.2", + "debug": "^4.3.4", + "kolorist": "^1.8.0", + "resolve": "^1.22.8" + }, + "peerDependencies": { + "@babel/core": "7.x", + "vite": "2.x || 3.x || 4.x" + } + }, + "node_modules/@preact/preset-vite/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/@preact/preset-vite/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "node_modules/@preact/signals": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@preact/signals/-/signals-1.1.3.tgz", - "integrity": "sha512-N09DuAVvc90bBZVRwD+aFhtGyHAmJLhS3IFoawO/bYJRcil4k83nBOchpCEoS0s5+BXBpahgp0Mjf+IOqP57Og==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@preact/signals/-/signals-1.2.1.tgz", + "integrity": "sha512-hRPvp1C2ooDzOHqfnhdpHgoIFDbYFAXLhoid3+jSItuPPD/J0r/UsiWKv/8ZO/oEhjRaP0M5niuRYsWqmY2GEA==", "dev": true, "dependencies": { - "@preact/signals-core": "^1.2.3" + "@preact/signals-core": "^1.4.0" }, "funding": { "type": "opencollective", @@ -2860,15 +2924,72 @@ } }, "node_modules/@preact/signals-core": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.3.0.tgz", - "integrity": "sha512-M+M3ZOtd1dtV/uasyk4SZu1vbfEJ4NeENv0F7F12nijZYedB5wSgbtZcuACyssnTznhF4ctUyrR0dZHuHfyWKA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.5.0.tgz", + "integrity": "sha512-U2diO1Z4i1n2IoFgMYmRdHWGObNrcuTRxyNEn7deSq2cru0vj0583HYQZHsAqcs7FE+hQyX3mjIV7LAfHCvy8w==", "dev": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" } }, + "node_modules/@prefresh/babel-plugin": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@prefresh/babel-plugin/-/babel-plugin-0.5.0.tgz", + "integrity": "sha512-joAwpkUDwo7ZqJnufXRGzUb+udk20RBgfA8oLPBh5aJH2LeStmV1luBfeJTztPdyCscC2j2SmZ/tVxFRMIxAEw==", + "dev": true + }, + "node_modules/@prefresh/core": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@prefresh/core/-/core-1.5.2.tgz", + "integrity": "sha512-A/08vkaM1FogrCII5PZKCrygxSsc11obExBScm3JF1CryK2uDS3ZXeni7FeKCx1nYdUkj4UcJxzPzc1WliMzZA==", + "dev": true, + "peerDependencies": { + "preact": "^10.0.0" + } + }, + "node_modules/@prefresh/utils": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@prefresh/utils/-/utils-1.2.0.tgz", + "integrity": "sha512-KtC/fZw+oqtwOLUFM9UtiitB0JsVX0zLKNyRTA332sqREqSALIIQQxdUCS1P3xR/jT1e2e8/5rwH6gdcMLEmsQ==", + "dev": true + }, + "node_modules/@prefresh/vite": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@prefresh/vite/-/vite-2.4.3.tgz", + "integrity": "sha512-diQ8AW+Y2i1QEhO64t2hhV8WFP9X0/NAxuSd9eRlVyS3LOs3RgGOwjOmLoJqwCmIbdq5Szq983gO+xdW/l0G6A==", + "dev": true, + "dependencies": { + "@babel/core": "^7.22.1", + "@prefresh/babel-plugin": "0.5.0", + "@prefresh/core": "^1.5.1", + "@prefresh/utils": "^1.2.0", + "@rollup/pluginutils": "^4.2.1" + }, + "peerDependencies": { + "preact": "^10.4.0", + "vite": ">=2.0.0" + } + }, + "node_modules/@prefresh/vite/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/@prefresh/vite/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "node_modules/@proload/core": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@proload/core/-/core-0.3.3.tgz", @@ -4014,9 +4135,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4158,9 +4279,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4217,9 +4338,9 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4714,26 +4835,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.reduce": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz", - "integrity": "sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==", - "dev": true, - "peer": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -4741,26 +4842,6 @@ "dev": true, "peer": true }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "peer": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -4948,9 +5029,9 @@ } }, "node_modules/astro/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -5047,37 +5128,40 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "node_modules/axios": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dev": true, "peer": true, - "engines": { - "node": "*" + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, - "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", - "dev": true, - "peer": true - }, - "node_modules/babel-plugin-module-resolver": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.1.0.tgz", - "integrity": "sha512-MlX10UDheRr3lb3P0WcaIdtCSRlxdQsB1sBqL7W0raF070bGl1HQQq5K3T2vf2XAYie+ww+5AKC/WrkjRO2knA==", + "node_modules/axios/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, + "peer": true, "dependencies": { - "find-babel-config": "^1.2.0", - "glob": "^7.1.6", - "pkg-up": "^3.1.0", - "reselect": "^4.0.0", - "resolve": "^1.13.1" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">= 8.0.0" + "node": ">= 6" + } + }, + "node_modules/babel-plugin-transform-hook-names": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-hook-names/-/babel-plugin-transform-hook-names-1.0.2.tgz", + "integrity": "sha512-5gafyjyyBTTdX/tQQ0hRgu4AhNHG/hqWi0ZZmg2xvs2FgRkJXzDNKBZCyoYqgFkovfDrgM8OoKg8karoUvWeCw==", + "dev": true, + "peerDependencies": { + "@babel/core": "^7.12.10" } }, "node_modules/bail": { @@ -5122,23 +5206,6 @@ } ] }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "peer": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true, - "peer": true - }, "node_modules/bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", @@ -5451,9 +5518,9 @@ } }, "node_modules/builtins/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -5485,17 +5552,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -6897,19 +6953,6 @@ "linkcheck-win": "bin/linkcheck-win" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "peer": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/dayjs": { "version": "1.11.9", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.9.tgz", @@ -7298,17 +7341,6 @@ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "peer": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "node_modules/electron-to-chromium": { "version": "1.4.412", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.412.tgz", @@ -7455,13 +7487,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true, - "peer": true - }, "node_modules/es-module-lexer": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", @@ -8265,9 +8290,9 @@ } }, "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -8705,25 +8730,23 @@ } }, "node_modules/eth-gas-reporter": { - "version": "0.2.25", - "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz", - "integrity": "sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ==", + "version": "0.2.27", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz", + "integrity": "sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw==", "dev": true, "peer": true, "dependencies": { - "@ethersproject/abi": "^5.0.0-beta.146", "@solidity-parser/parser": "^0.14.0", + "axios": "^1.5.1", "cli-table3": "^0.5.0", "colors": "1.4.0", "ethereum-cryptography": "^1.0.3", - "ethers": "^4.0.40", + "ethers": "^5.7.2", "fs-readdir-recursive": "^1.1.0", "lodash": "^4.17.14", "markdown-table": "^1.1.3", - "mocha": "^7.1.1", + "mocha": "^10.2.0", "req-cwd": "^2.0.0", - "request": "^2.88.0", - "request-promise-native": "^1.0.5", "sha1": "^1.1.1", "sync-request": "^6.0.0" }, @@ -8736,139 +8759,6 @@ } } }, - "node_modules/eth-gas-reporter/node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "peer": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/eth-gas-reporter/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true, - "peer": true - }, - "node_modules/eth-gas-reporter/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "peer": true, - "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.1.1" - } - }, - "node_modules/eth-gas-reporter/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "peer": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "peer": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eth-gas-reporter/node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/eth-gas-reporter/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true, - "peer": true - }, - "node_modules/eth-gas-reporter/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "peer": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/eth-gas-reporter/node_modules/ethereum-cryptography": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", @@ -8882,441 +8772,6 @@ "@scure/bip39": "1.1.1" } }, - "node_modules/eth-gas-reporter/node_modules/ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "peer": true, - "dependencies": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "peer": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "peer": true, - "dependencies": { - "is-buffer": "~2.0.3" - }, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/eth-gas-reporter/node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eth-gas-reporter/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "peer": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eth-gas-reporter/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true, - "peer": true - }, - "node_modules/eth-gas-reporter/node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "peer": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/eth-gas-reporter/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "peer": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "peer": true, - "dependencies": { - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eth-gas-reporter/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eth-gas-reporter/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "peer": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/eth-gas-reporter/node_modules/mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/eth-gas-reporter/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "peer": true - }, - "node_modules/eth-gas-reporter/node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "peer": true, - "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/eth-gas-reporter/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "peer": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eth-gas-reporter/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "peer": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "peer": true, - "dependencies": { - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/eth-gas-reporter/node_modules/scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true, - "peer": true - }, - "node_modules/eth-gas-reporter/node_modules/setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", - "dev": true, - "peer": true - }, - "node_modules/eth-gas-reporter/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "peer": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "peer": true - }, - "node_modules/eth-gas-reporter/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "peer": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/eth-gas-reporter/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/eth-gas-reporter/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true, - "peer": true - }, - "node_modules/eth-gas-reporter/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "peer": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/eth-gas-reporter/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "peer": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/eth-gas-reporter/node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "peer": true, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/ethereum-bloom-filters": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", @@ -9563,16 +9018,6 @@ "node": ">=0.10.0" } }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "peer": true - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -9664,28 +9109,6 @@ "node": ">=0.10.0" } }, - "node_modules/find-babel-config": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-1.2.0.tgz", - "integrity": "sha512-jB2CHJeqy6a820ssiqwrKMeyC6nNdmrcgkKWJWmpoxpE8RKciYJXCcXRq1h2AzCo5I5BJeN2tkGEO3hLTuePRA==", - "dev": true, - "dependencies": { - "json5": "^0.5.1", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/find-babel-config/node_modules/json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/find-replace": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", @@ -9810,16 +9233,6 @@ "is-callable": "^1.1.3" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, - "peer": true, - "engines": { - "node": "*" - } - }, "node_modules/form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", @@ -9907,9 +9320,12 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.5", @@ -9962,9 +9378,9 @@ } }, "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "peer": true, "engines": { @@ -10023,16 +9439,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "peer": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, "node_modules/ghost-testrpc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", @@ -10264,16 +9670,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4.x" - } - }, "node_modules/handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -10306,31 +9702,6 @@ "node": ">=0.10.0" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dev": true, - "peer": true, - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/hardhat": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.14.0.tgz", @@ -10534,6 +9905,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -10643,6 +10015,17 @@ "minimalistic-assert": "^1.0.1" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hast-util-from-dom": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-4.2.0.tgz", @@ -11011,22 +10394,6 @@ "dev": true, "peer": true }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dev": true, - "peer": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -11426,11 +10793,11 @@ } }, "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11714,13 +11081,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true, - "peer": true - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -11790,13 +11150,6 @@ "node": ">=6.0" } }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true, - "peer": true - }, "node_modules/jiti": { "version": "1.18.2", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", @@ -11836,13 +11189,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true, - "peer": true - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -11860,13 +11206,6 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true, - "peer": true - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -11879,13 +11218,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true, - "peer": true - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -11942,22 +11274,6 @@ "node": "*" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "peer": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/katex": { "version": "0.16.8", "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.8.tgz", @@ -12026,6 +11342,12 @@ "node": ">=6" } }, + "node_modules/kolorist": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", + "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", + "dev": true + }, "node_modules/layout-base": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz", @@ -14409,9 +13731,9 @@ } }, "node_modules/node-abi/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -14443,27 +13765,6 @@ "lodash": "^4.17.21" } }, - "node_modules/node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "peer": true, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "node_modules/node-environment-flags/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "peer": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/node-fetch": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", @@ -14597,16 +13898,6 @@ "dev": true, "peer": true }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "peer": true, - "engines": { - "node": "*" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -14659,26 +13950,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", - "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", - "dev": true, - "peer": true, - "dependencies": { - "array.prototype.reduce": "^1.0.5", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.21.2", - "safe-array-concat": "^1.0.0" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object.values": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", @@ -15117,13 +14388,6 @@ "node": ">=0.12" } }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true, - "peer": true - }, "node_modules/periscopic": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", @@ -15246,70 +14510,6 @@ "node": ">=8" } }, - "node_modules/pkg-up": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-up/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-up/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/playwright": { "version": "1.37.0", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.37.0.tgz", @@ -15347,9 +14547,9 @@ } }, "node_modules/postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "funding": [ { "type": "opencollective", @@ -15497,9 +14697,9 @@ } }, "node_modules/preact-render-to-string": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.6.tgz", - "integrity": "sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.2.2.tgz", + "integrity": "sha512-YDfXQiVeYZutFR8/DpxLSbW3W6b7GgjBExRBxOOqcjrGq5rA9cziitQdNPMZe4RVMSdfBnf4hYqyeLs/KvtIuA==", "dev": true, "dependencies": { "pretty-format": "^3.8.0" @@ -15651,9 +14851,9 @@ } }, "node_modules/prettier-plugin-solidity/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -15741,10 +14941,10 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "dev": true, "peer": true }, @@ -16379,95 +15579,6 @@ "node": ">=4" } }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "peer": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", - "dev": true, - "peer": true, - "dependencies": { - "lodash": "^4.17.19" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "request": "^2.34" - } - }, - "node_modules/request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", - "dev": true, - "peer": true, - "dependencies": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - }, - "engines": { - "node": ">=0.12.0" - }, - "peerDependencies": { - "request": "^2.34" - } - }, - "node_modules/request/node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "peer": true, - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -16486,25 +15597,12 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true, - "peer": true - }, - "node_modules/reselect": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", - "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", - "dev": true - }, "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dependencies": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -16875,32 +15973,6 @@ "node": ">=6" } }, - "node_modules/safe-array-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", - "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", - "dev": true, - "peer": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "peer": true - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -17165,9 +16237,9 @@ "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -17186,13 +16258,6 @@ "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true, - "peer": true - }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -17277,9 +16342,9 @@ "peer": true }, "node_modules/sharp/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "optional": true, "peer": true, "dependencies": { @@ -17571,9 +16636,9 @@ } }, "node_modules/solc/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -17770,14 +16835,14 @@ "dev": true }, "node_modules/solidity-coverage": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.2.tgz", - "integrity": "sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.5.tgz", + "integrity": "sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ==", "dev": true, "peer": true, "dependencies": { "@ethersproject/abi": "^5.0.9", - "@solidity-parser/parser": "^0.14.1", + "@solidity-parser/parser": "^0.16.0", "chalk": "^2.4.2", "death": "^1.1.0", "detect-port": "^1.3.0", @@ -17788,7 +16853,7 @@ "globby": "^10.0.1", "jsonschema": "^1.2.4", "lodash": "^4.17.15", - "mocha": "7.1.2", + "mocha": "10.2.0", "node-emoji": "^1.10.0", "pify": "^4.0.1", "recursive-readdir": "^2.2.2", @@ -17804,156 +16869,14 @@ "hardhat": "^2.11.0" } }, - "node_modules/solidity-coverage/node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "peer": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/solidity-coverage/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, "peer": true, "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.1.1" - } - }, - "node_modules/solidity-coverage/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "peer": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/solidity-coverage/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "peer": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/solidity-coverage/node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solidity-coverage/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/solidity-coverage/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true, - "peer": true - }, - "node_modules/solidity-coverage/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "peer": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/solidity-coverage/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "peer": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "peer": true, - "dependencies": { - "is-buffer": "~2.0.3" - }, - "bin": { - "flat": "cli.js" + "antlr4ts": "^0.5.0-alpha.4" } }, "node_modules/solidity-coverage/node_modules/fs-extra": { @@ -17971,40 +16894,6 @@ "node": ">=6 <7 || >=8" } }, - "node_modules/solidity-coverage/node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/solidity-coverage/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/solidity-coverage/node_modules/globby": { "version": "10.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", @@ -18025,57 +16914,6 @@ "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/solidity-coverage/node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "peer": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/solidity-coverage/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "peer": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "peer": true, - "dependencies": { - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/solidity-coverage/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -18089,145 +16927,10 @@ "node": ">=10" } }, - "node_modules/solidity-coverage/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/solidity-coverage/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "peer": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/solidity-coverage/node_modules/mocha": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", - "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/solidity-coverage/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "peer": true - }, - "node_modules/solidity-coverage/node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "peer": true, - "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/solidity-coverage/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "peer": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/solidity-coverage/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "peer": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "peer": true, - "dependencies": { - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/solidity-coverage/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "peer": true, "dependencies": { @@ -18250,92 +16953,6 @@ "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "peer": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/solidity-coverage/node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "peer": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/solidity-coverage/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true, - "peer": true - }, "node_modules/solidity-coverage/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -18343,51 +16960,6 @@ "dev": true, "peer": true }, - "node_modules/solidity-coverage/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "peer": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/solidity-coverage/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "peer": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/solidity-coverage/node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "peer": true, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/source-map": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", @@ -18460,39 +17032,6 @@ "react": ">=16.8.0" } }, - "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "peer": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sshpk/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true, - "peer": true - }, "node_modules/stacktrace-parser": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", @@ -18537,24 +17076,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/strict-uri-encode": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", @@ -19286,20 +17807,6 @@ "node": ">=0.6" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "peer": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -19852,11 +18359,11 @@ } }, "node_modules/undici": { - "version": "5.22.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", - "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", + "version": "5.27.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz", + "integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==", "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" }, "engines": { "node": ">=14.0" @@ -20157,21 +18664,6 @@ "devOptional": true, "peer": true }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "peer": true, - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, "node_modules/vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", @@ -20452,13 +18944,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true, - "peer": true - }, "node_modules/which-pm": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz", @@ -20507,63 +18992,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "peer": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/wide-align/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "peer": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", @@ -20579,9 +19007,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -20676,16 +19104,6 @@ } } }, - "node_modules/xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -20839,9 +19257,9 @@ } }, "node_modules/zod": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", - "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==", + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -21057,9 +19475,9 @@ "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } @@ -21196,16 +19614,17 @@ } }, "@astrojs/preact": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@astrojs/preact/-/preact-1.2.0.tgz", - "integrity": "sha512-Vm8rkBIE3cNlxhFoUO2Rsv5RxSP7x7Oi9J6qz8+91lwAIjdm6oyDOrrBmdGqsONJ1MqnjPG4EPmIZJGuFtz2SQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@astrojs/preact/-/preact-3.0.1.tgz", + "integrity": "sha512-pAfN+U7J4hw7qijqkBx1ZBpPO+ooa+MkKIgshCozfqsHTp18uPflxQUviz0TEzB5nn7hSndzncWuc3pz/HbtJw==", "dev": true, "requires": { - "@babel/core": ">=7.0.0-0 <8.0.0", - "@babel/plugin-transform-react-jsx": "^7.17.12", - "@preact/signals": "^1.1.0", - "babel-plugin-module-resolver": "^4.1.0", - "preact-render-to-string": "^5.2.4" + "@babel/plugin-transform-react-jsx": "^7.22.5", + "@babel/plugin-transform-react-jsx-development": "^7.22.5", + "@preact/preset-vite": "^2.5.0", + "@preact/signals": "^1.2.1", + "babel-plugin-transform-hook-names": "^1.0.2", + "preact-render-to-string": "^6.2.1" } }, "@astrojs/prism": { @@ -21271,11 +19690,12 @@ } }, "@babel/code-frame": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", - "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } }, "@babel/compat-data": { @@ -21306,22 +19726,22 @@ } }, "@babel/generator": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.3.tgz", - "integrity": "sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "requires": { - "@babel/types": "^7.22.3", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" } }, "@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-compilation-targets": { @@ -21337,33 +19757,33 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.1.tgz", - "integrity": "sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==" + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==" }, "@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "requires": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-module-imports": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", - "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "requires": { - "@babel/types": "^7.21.4" + "@babel/types": "^7.22.15" } }, "@babel/helper-module-transforms": { @@ -21382,9 +19802,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", - "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==" + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==" }, "@babel/helper-simple-access": { "version": "7.21.5", @@ -21395,22 +19815,22 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-string-parser": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz", - "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==" + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==" }, "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==" + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==" }, "@babel/helper-validator-option": { "version": "7.21.0", @@ -21428,38 +19848,47 @@ } }, "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.4.tgz", - "integrity": "sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==" + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==" }, "@babel/plugin-syntax-jsx": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz", - "integrity": "sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", + "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.22.3.tgz", - "integrity": "sha512-JEulRWG2f04a7L8VWaOngWiK6p+JOSpB+DAtwfJgOaej1qdbNxqtK7MwTBHjUA10NeFcszlFNqCdbRcirzh2uQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.22.15.tgz", + "integrity": "sha512-oKckg2eZFa8771O/5vi7XeTvmM6+O9cxZu+kanTU7tD4sin5nO/G8jGJhq8Hvt2Z0kUoEDRayuZLaUlYl8QuGA==", "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-module-imports": "^7.21.4", - "@babel/helper-plugin-utils": "^7.21.5", - "@babel/plugin-syntax-jsx": "^7.21.4", - "@babel/types": "^7.22.3" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/types": "^7.22.15" + } + }, + "@babel/plugin-transform-react-jsx-development": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.22.5.tgz", + "integrity": "sha512-bDhuzwWMuInwCYeDeMzyi7TaBgRQei6DqxhbyniL7/VG4RSS7HtSL2QbY4eESy1KJqlWt8g3xeEBGPuo+XqC8A==", + "dev": true, + "requires": { + "@babel/plugin-transform-react-jsx": "^7.22.5" } }, "@babel/runtime": { @@ -21471,39 +19900,39 @@ } }, "@babel/template": { - "version": "7.21.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.21.9.tgz", - "integrity": "sha512-MK0X5k8NKOuWRamiEfc3KEJiHMTkGZNUjzMipqCGDDc6ijRl/B7RGSKVGncu4Ro/HdyzzY6cmoXuKI2Gffk7vQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "requires": { - "@babel/code-frame": "^7.21.4", - "@babel/parser": "^7.21.9", - "@babel/types": "^7.21.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.4.tgz", - "integrity": "sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ==", - "requires": { - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.22.3", - "@babel/helper-environment-visitor": "^7.22.1", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.22.4", - "@babel/types": "^7.22.4", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.4.tgz", - "integrity": "sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "requires": { - "@babel/helper-string-parser": "^7.21.5", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -22145,6 +20574,11 @@ "@ethersproject/strings": "^5.7.0" } }, + "@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==" + }, "@fortawesome/fontawesome-free": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.2.tgz", @@ -22680,9 +21114,9 @@ } }, "@openzeppelin/contracts": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.0.tgz", - "integrity": "sha512-DUP74AFGKlic2sQb/CmgrN2aUPMFGxRrmCTUxLHsiU2RzwWqVuMPZBxiAyvlff6Pea77uylAX6B5x9W6evEbhA==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.3.tgz", + "integrity": "sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==", "dev": true }, "@pkgr/utils": { @@ -22705,21 +21139,105 @@ } } }, + "@preact/preset-vite": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@preact/preset-vite/-/preset-vite-2.6.0.tgz", + "integrity": "sha512-5nztNzXbCpqyVum/K94nB2YQ5PTnvWdz4u7/X0jc8+kLyskSSpkNUxLQJeI90zfGSFIX1Ibj2G2JIS/mySHWYQ==", + "dev": true, + "requires": { + "@babel/plugin-transform-react-jsx": "^7.22.15", + "@babel/plugin-transform-react-jsx-development": "^7.22.5", + "@prefresh/vite": "^2.4.1", + "@rollup/pluginutils": "^4.1.1", + "babel-plugin-transform-hook-names": "^1.0.2", + "debug": "^4.3.4", + "kolorist": "^1.8.0", + "resolve": "^1.22.8" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "requires": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + } + }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + } + } + }, "@preact/signals": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@preact/signals/-/signals-1.1.3.tgz", - "integrity": "sha512-N09DuAVvc90bBZVRwD+aFhtGyHAmJLhS3IFoawO/bYJRcil4k83nBOchpCEoS0s5+BXBpahgp0Mjf+IOqP57Og==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@preact/signals/-/signals-1.2.1.tgz", + "integrity": "sha512-hRPvp1C2ooDzOHqfnhdpHgoIFDbYFAXLhoid3+jSItuPPD/J0r/UsiWKv/8ZO/oEhjRaP0M5niuRYsWqmY2GEA==", "dev": true, "requires": { - "@preact/signals-core": "^1.2.3" + "@preact/signals-core": "^1.4.0" } }, "@preact/signals-core": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.3.0.tgz", - "integrity": "sha512-M+M3ZOtd1dtV/uasyk4SZu1vbfEJ4NeENv0F7F12nijZYedB5wSgbtZcuACyssnTznhF4ctUyrR0dZHuHfyWKA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.5.0.tgz", + "integrity": "sha512-U2diO1Z4i1n2IoFgMYmRdHWGObNrcuTRxyNEn7deSq2cru0vj0583HYQZHsAqcs7FE+hQyX3mjIV7LAfHCvy8w==", + "dev": true + }, + "@prefresh/babel-plugin": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@prefresh/babel-plugin/-/babel-plugin-0.5.0.tgz", + "integrity": "sha512-joAwpkUDwo7ZqJnufXRGzUb+udk20RBgfA8oLPBh5aJH2LeStmV1luBfeJTztPdyCscC2j2SmZ/tVxFRMIxAEw==", "dev": true }, + "@prefresh/core": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@prefresh/core/-/core-1.5.2.tgz", + "integrity": "sha512-A/08vkaM1FogrCII5PZKCrygxSsc11obExBScm3JF1CryK2uDS3ZXeni7FeKCx1nYdUkj4UcJxzPzc1WliMzZA==", + "dev": true, + "requires": {} + }, + "@prefresh/utils": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@prefresh/utils/-/utils-1.2.0.tgz", + "integrity": "sha512-KtC/fZw+oqtwOLUFM9UtiitB0JsVX0zLKNyRTA332sqREqSALIIQQxdUCS1P3xR/jT1e2e8/5rwH6gdcMLEmsQ==", + "dev": true + }, + "@prefresh/vite": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@prefresh/vite/-/vite-2.4.3.tgz", + "integrity": "sha512-diQ8AW+Y2i1QEhO64t2hhV8WFP9X0/NAxuSd9eRlVyS3LOs3RgGOwjOmLoJqwCmIbdq5Szq983gO+xdW/l0G6A==", + "dev": true, + "requires": { + "@babel/core": "^7.22.1", + "@prefresh/babel-plugin": "0.5.0", + "@prefresh/core": "^1.5.1", + "@prefresh/utils": "^1.2.0", + "@rollup/pluginutils": "^4.2.1" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "requires": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + } + }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + } + } + }, "@proload/core": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@proload/core/-/core-0.3.3.tgz", @@ -23669,9 +22187,9 @@ } }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -23750,9 +22268,9 @@ } }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -23792,9 +22310,9 @@ } }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -24169,20 +22687,6 @@ "es-shim-unscopables": "^1.0.0" } }, - "array.prototype.reduce": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz", - "integrity": "sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==", - "dev": true, - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - } - }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -24190,23 +22694,6 @@ "dev": true, "peer": true }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "peer": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "peer": true - }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -24322,9 +22809,9 @@ } }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } @@ -24423,33 +22910,39 @@ "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true, - "peer": true - }, - "aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", - "dev": true, - "peer": true - }, - "babel-plugin-module-resolver": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.1.0.tgz", - "integrity": "sha512-MlX10UDheRr3lb3P0WcaIdtCSRlxdQsB1sBqL7W0raF070bGl1HQQq5K3T2vf2XAYie+ww+5AKC/WrkjRO2knA==", + "axios": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dev": true, + "peer": true, "requires": { - "find-babel-config": "^1.2.0", - "glob": "^7.1.6", - "pkg-up": "^3.1.0", - "reselect": "^4.0.0", - "resolve": "^1.13.1" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + }, + "dependencies": { + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "peer": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } } }, + "babel-plugin-transform-hook-names": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-hook-names/-/babel-plugin-transform-hook-names-1.0.2.tgz", + "integrity": "sha512-5gafyjyyBTTdX/tQQ0hRgu4AhNHG/hqWi0ZZmg2xvs2FgRkJXzDNKBZCyoYqgFkovfDrgM8OoKg8karoUvWeCw==", + "dev": true, + "requires": {} + }, "bail": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", @@ -24474,25 +22967,6 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "peer": true, - "requires": { - "tweetnacl": "^0.14.3" - }, - "dependencies": { - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true, - "peer": true - } - } - }, "bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", @@ -24728,9 +23202,9 @@ } }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -24752,14 +23226,6 @@ "run-applescript": "^5.0.0" } }, - "busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "requires": { - "streamsearch": "^1.1.0" - } - }, "bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -25820,16 +24286,6 @@ "integrity": "sha512-ZMvxkAyEpBTvBFk+DPjcK0ObNy8GM4gmrGG1qIu0EXb/zj25vjRWNnhLHKZw4JlOLo02oWlwDeqo98GuBlJcIg==", "dev": true }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "peer": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "dayjs": { "version": "1.11.9", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.9.tgz", @@ -26113,17 +24569,6 @@ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "peer": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "electron-to-chromium": { "version": "1.4.412", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.412.tgz", @@ -26256,13 +24701,6 @@ "which-typed-array": "^1.1.9" } }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true, - "peer": true - }, "es-module-lexer": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", @@ -26873,9 +25311,9 @@ } }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -27059,134 +25497,27 @@ "dev": true }, "eth-gas-reporter": { - "version": "0.2.25", - "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz", - "integrity": "sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ==", + "version": "0.2.27", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz", + "integrity": "sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw==", "dev": true, "peer": true, "requires": { - "@ethersproject/abi": "^5.0.0-beta.146", "@solidity-parser/parser": "^0.14.0", + "axios": "^1.5.1", "cli-table3": "^0.5.0", "colors": "1.4.0", "ethereum-cryptography": "^1.0.3", - "ethers": "^4.0.40", + "ethers": "^5.7.2", "fs-readdir-recursive": "^1.1.0", "lodash": "^4.17.14", "markdown-table": "^1.1.3", - "mocha": "^7.1.1", + "mocha": "^10.2.0", "req-cwd": "^2.0.0", - "request": "^2.88.0", - "request-promise-native": "^1.0.5", "sha1": "^1.1.1", "sync-request": "^6.0.0" }, "dependencies": { - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "peer": true - }, - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "peer": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "peer": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true, - "peer": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "peer": true - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "peer": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "peer": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "peer": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "peer": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "peer": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true, - "peer": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "peer": true - }, "ethereum-cryptography": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", @@ -27199,358 +25530,6 @@ "@scure/bip32": "1.1.5", "@scure/bip39": "1.1.1" } - }, - "ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "peer": true, - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "peer": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "peer": true, - "requires": { - "is-buffer": "~2.0.3" - } - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true, - "peer": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "peer": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "peer": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "peer": true - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", - "dev": true, - "peer": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "peer": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "peer": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "peer": true, - "requires": { - "chalk": "^2.4.2" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "peer": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "peer": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "dev": true, - "peer": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "peer": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "peer": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "peer": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "peer": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "peer": true, - "requires": { - "picomatch": "^2.0.4" - } - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true, - "peer": true - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", - "dev": true, - "peer": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "peer": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "peer": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "peer": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "peer": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "uuid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", - "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", - "dev": true, - "peer": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "peer": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "peer": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true, - "peer": true - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "peer": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "peer": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "peer": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - } } } }, @@ -27765,13 +25744,6 @@ "is-extendable": "^0.1.0" } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "peer": true - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -27847,24 +25819,6 @@ "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==" }, - "find-babel-config": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-1.2.0.tgz", - "integrity": "sha512-jB2CHJeqy6a820ssiqwrKMeyC6nNdmrcgkKWJWmpoxpE8RKciYJXCcXRq1h2AzCo5I5BJeN2tkGEO3hLTuePRA==", - "dev": true, - "requires": { - "json5": "^0.5.1", - "path-exists": "^3.0.0" - }, - "dependencies": { - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", - "dev": true - } - } - }, "find-replace": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", @@ -27954,13 +25908,6 @@ "is-callable": "^1.1.3" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, - "peer": true - }, "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", @@ -28025,9 +25972,9 @@ "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "function.prototype.name": { "version": "1.1.5", @@ -28065,9 +26012,9 @@ "dev": true }, "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "peer": true }, @@ -28105,16 +26052,6 @@ "get-intrinsic": "^1.1.1" } }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "peer": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "ghost-testrpc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", @@ -28297,13 +26234,6 @@ } } }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "peer": true - }, "handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -28327,24 +26257,6 @@ } } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true, - "peer": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "peer": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, "hardhat": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.14.0.tgz", @@ -28505,6 +26417,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -28578,6 +26491,14 @@ "minimalistic-assert": "^1.0.1" } }, + "hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "requires": { + "function-bind": "^1.1.2" + } + }, "hast-util-from-dom": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-4.2.0.tgz", @@ -28867,18 +26788,6 @@ } } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dev": true, - "peer": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, "https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -29145,11 +27054,11 @@ "dev": true }, "is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "requires": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "is-date-object": { @@ -29316,13 +27225,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true, - "peer": true - }, "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -29370,13 +27272,6 @@ "resolved": "https://registry.npmjs.org/iso-639-1/-/iso-639-1-2.1.15.tgz", "integrity": "sha512-7c7mBznZu2ktfvyT582E2msM+Udc1EjOyhVRE/0ZsjD9LBtWSm23h3PtiRh2a35XoUsTQQjJXaJzuLjXsOdFDg==" }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true, - "peer": true - }, "jiti": { "version": "1.18.2", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", @@ -29406,13 +27301,6 @@ "argparse": "^2.0.1" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true, - "peer": true - }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -29424,13 +27312,6 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true, - "peer": true - }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -29443,13 +27324,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true, - "peer": true - }, "json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -29499,19 +27373,6 @@ "dev": true, "peer": true }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "peer": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, "katex": { "version": "0.16.8", "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.8.tgz", @@ -29562,6 +27423,12 @@ "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==" }, + "kolorist": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", + "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", + "dev": true + }, "layout-base": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz", @@ -31263,9 +29130,9 @@ } }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } @@ -31293,26 +29160,6 @@ "lodash": "^4.17.21" } }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "peer": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "peer": true - } - } - }, "node-fetch": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", @@ -31403,13 +29250,6 @@ } } }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "peer": true - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -31444,20 +29284,6 @@ "object-keys": "^1.1.1" } }, - "object.getownpropertydescriptors": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", - "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", - "dev": true, - "peer": true, - "requires": { - "array.prototype.reduce": "^1.0.5", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.21.2", - "safe-array-concat": "^1.0.0" - } - }, "object.values": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", @@ -31760,13 +29586,6 @@ "sha.js": "^2.4.8" } }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true, - "peer": true - }, "periscopic": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", @@ -31852,54 +29671,6 @@ } } }, - "pkg-up": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - } - } - }, "playwright": { "version": "1.37.0", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.37.0.tgz", @@ -31921,9 +29692,9 @@ "dev": true }, "postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "requires": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", @@ -31992,9 +29763,9 @@ "integrity": "sha512-qs2ansoQEwzNiV5eAcRT1p1EC/dmEzaATVDJNiB3g2sRDWdA7b7MurXdJjB2+/WQktGWZwxvDrnuRFbWuIr64g==" }, "preact-render-to-string": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.6.tgz", - "integrity": "sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.2.2.tgz", + "integrity": "sha512-YDfXQiVeYZutFR8/DpxLSbW3W6b7GgjBExRBxOOqcjrGq5rA9cziitQdNPMZe4RVMSdfBnf4hYqyeLs/KvtIuA==", "dev": true, "requires": { "pretty-format": "^3.8.0" @@ -32107,9 +29878,9 @@ } }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -32182,10 +29953,10 @@ "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz", "integrity": "sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==" }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "dev": true, "peer": true }, @@ -32669,73 +30440,6 @@ } } }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "peer": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "peer": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true, - "peer": true - } - } - }, - "request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", - "dev": true, - "peer": true, - "requires": { - "lodash": "^4.17.19" - } - }, - "request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "dev": true, - "peer": true, - "requires": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -32748,25 +30452,12 @@ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true, - "peer": true - }, - "reselect": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", - "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", - "dev": true - }, "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "requires": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -33019,28 +30710,6 @@ "mri": "^1.1.0" } }, - "safe-array-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", - "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", - "dev": true, - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "peer": true - } - } - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -33251,9 +30920,9 @@ "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" }, "serialize-javascript": { "version": "6.0.0", @@ -33269,13 +30938,6 @@ "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true, - "peer": true - }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -33344,9 +31006,9 @@ "peer": true }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "optional": true, "peer": true, "requires": { @@ -33565,9 +31227,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true } } @@ -33720,14 +31382,14 @@ "dev": true }, "solidity-coverage": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.2.tgz", - "integrity": "sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.5.tgz", + "integrity": "sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ==", "dev": true, "peer": true, "requires": { "@ethersproject/abi": "^5.0.9", - "@solidity-parser/parser": "^0.14.1", + "@solidity-parser/parser": "^0.16.0", "chalk": "^2.4.2", "death": "^1.1.0", "detect-port": "^1.3.0", @@ -33738,7 +31400,7 @@ "globby": "^10.0.1", "jsonschema": "^1.2.4", "lodash": "^4.17.15", - "mocha": "7.1.2", + "mocha": "10.2.0", "node-emoji": "^1.10.0", "pify": "^4.0.1", "recursive-readdir": "^2.2.2", @@ -33748,122 +31410,14 @@ "web3-utils": "^1.3.6" }, "dependencies": { - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "peer": true - }, - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "peer": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "peer": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "peer": true - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "peer": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "peer": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "peer": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "peer": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "peer": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true, - "peer": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "peer": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "peer": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, "peer": true, "requires": { - "is-buffer": "~2.0.3" + "antlr4ts": "^0.5.0-alpha.4" } }, "fs-extra": { @@ -33878,29 +31432,6 @@ "universalify": "^0.1.0" } }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true, - "peer": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "peer": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "globby": { "version": "10.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", @@ -33918,45 +31449,6 @@ "slash": "^3.0.0" } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "peer": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "peer": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "peer": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "peer": true, - "requires": { - "chalk": "^2.4.2" - } - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -33967,113 +31459,10 @@ "yallist": "^4.0.0" } }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "peer": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "peer": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mocha": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", - "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", - "dev": true, - "peer": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "peer": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "peer": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "peer": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "peer": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "peer": true, - "requires": { - "picomatch": "^2.0.4" - } - }, "semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "peer": true, "requires": { @@ -34087,122 +31476,12 @@ "dev": true, "peer": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "peer": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "peer": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "peer": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "peer": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "peer": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "peer": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true, - "peer": true - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, "peer": true - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "peer": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "peer": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "peer": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - } } } }, @@ -34261,33 +31540,6 @@ "integrity": "sha512-Q28EimiXm9xyJkNPChWuf7pKE9UioMuhId1sSZ8arqElg1yt8NJGVasH+2myvFfjp22lO040VZ0Gv2fVcZWrgA==", "requires": {} }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "peer": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "dependencies": { - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true, - "peer": true - } - } - }, "stacktrace-parser": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", @@ -34319,18 +31571,6 @@ "bl": "^5.0.0" } }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", - "dev": true, - "peer": true - }, - "streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" - }, "strict-uri-encode": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", @@ -34892,17 +32132,6 @@ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "peer": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -35296,11 +32525,11 @@ } }, "undici": { - "version": "5.22.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", - "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", + "version": "5.27.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz", + "integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==", "requires": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" } }, "unherit": { @@ -35502,18 +32731,6 @@ "devOptional": true, "peer": true }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, - "peer": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, "vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", @@ -35716,13 +32933,6 @@ "is-symbol": "^1.0.3" } }, - "which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true, - "peer": true - }, "which-pm": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz", @@ -35758,53 +32968,6 @@ "is-typed-array": "^1.1.10" } }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "peer": true, - "requires": { - "string-width": "^1.0.2 || 2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "peer": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "peer": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "peer": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "peer": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", @@ -35814,9 +32977,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "wordwrap": { @@ -35880,13 +33043,6 @@ "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "requires": {} }, - "xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", - "dev": true, - "peer": true - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -36002,9 +33158,9 @@ "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==" }, "zod": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", - "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==" + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==" }, "zwitch": { "version": "2.0.4", diff --git a/package.json b/package.json index 85f1efc4a..289b13d2a 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "devDependencies": { "@astrojs/mdx": "^0.19.7", - "@astrojs/preact": "^1.2.0", + "@astrojs/preact": "^3.0.1", "@astrojs/react": "^2.2.0", "@astrojs/sitemap": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^2.0.0", diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 9f5c24610..0f904c85d 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -113,6 +113,7 @@ "introduction": "Introduction", "principles": "Principles", "scrollArchitecture": "Scroll Architecture", + "scrollUpgrades": "Scroll Upgrades", "overview": "Overview", "scrollChain": "Scroll Chain", diff --git a/public/locales/zh/translation.json b/public/locales/zh/translation.json index 683a12044..2977482a3 100644 --- a/public/locales/zh/translation.json +++ b/public/locales/zh/translation.json @@ -1,4 +1,15 @@ { + "rightSidebar": { + "onThisPage": "本页", + "more": "更多", + "editThisPage": "编辑本页", + "joinOurCommunity": "加入我们的社区", + "feedback": "反馈" + }, + "ui": { + "whatsNext": "接下来是什么", + "readMore": "阅读更多" + }, "landing": { "test": "test", "search": { @@ -38,45 +49,136 @@ }, "NewsletterCTA": { "title": "随时了解最新的 Scroll 新闻", - "placeholder": "输入你的电子邮箱地址", - "buttonText": "报名" + "text": "路线图更新,虚拟和现场活动,生态机会等等", + "placeholder": "在此输入您的电子邮件地址", + "thankYouForSubscribing": "感谢您的订阅!", + "correctEmail": "请使用正确的电子邮件地址。", + "pleaseInsertEmail": "请输入您的电子邮件。" } }, "sidebar": { "gettingStarted": { "gettingStarted": "入门", - "overview": "概述", + "overview": "概览", + "scrollSepoliaTestnet": "Scroll Sepolia 测试网", "userGuide": "用户指南", "setup": "设置", "faucet": "水龙头", - "bridge": "桥接器", + "bridge": "跨链桥", "transferTokens": "转移代币", "commonErrors": "常见错误", - "rollupExplorer": "Rollup浏览器", + "rollupExplorer": "Rollup 浏览器", + "scrollSepoliaBlockExplorer": "Scroll Sepolia 浏览器", + "scrollMainnet": "Scroll 主网", + "scrollscan": "Scrollscan 区块浏览器", + "sepoliaBlockExplorer": "Sepolia 浏览器", "community": "社区", + "discord": "Discord", "communityForum": "社区论坛" }, "developers": { "developers": "开发者", - "buildingOnScroll": "构建Scroll应用", + "buildingOnScroll": "在 Scroll 上开发", "developerQuickstart": "开发者快速入门", - "integrations": "集成", + "verifyingSmartContracts": "验证智能合约", + "scrollContracts": "Scroll 合约", + "ethereumAndScrollDifferences": "以太坊 和 Scroll 的区别", + "l1AndL2Bridging": "L1 和 L2 跨链", + "ethAndErc20TokenBridge": "ETH 和 ERC20 代币跨链桥", + "erc721NftBridge": "ERC721 NFT 跨链桥", + "erc1155TokenBridge": "ERC1155 代币跨链桥", + "theScrollMessenger": "The Scroll Messenger", + "transactionFeesOnScroll": "Scroll 上的交易手续费", + "l2Fee": "L2 Fee", + "l1Fee": "L1 Fee", + "gasOracle": "Gas 预言机", + "future": "未来", "guides": "指南", "contractDeploymentTutorial": "合约部署教程", + "crossChainInteraction": "Scroll Messenger 跨链交互", + "bridgingERC20TokenThroughCustomGateway": "通过自定义网关跨链 ERC20", + "bridgingERC721NftThroughCustomGateway": "通过自定义网关跨链 ERC721 NFT", + "bridgingERC1155ThroughCustomGateway": "通过自定义网关跨链 ERC1155", + "estimatingGasAndTxFees": "预估 Gas 费和交易手续费", "resources": "资源", - "rollupExplorer": "Rollup浏览器" + "mainnetResources": "主网资源", + "sepoliaResources": "Sepolia资源", + "scrollBlockExplorer": "Scrollscan 区块浏览器", + "rollupExplorer": "Rollup 浏览器", + "scrollSepoliaBlockExplorer": "Scroll Sepolia 浏览器", + "sepoliaRollupExplorer": "Rollup 浏览器", + "sepoliaBlockExplorer": "Sepolia 浏览器" }, "technology": { - "overview": "概述", - "scrollArchitecture": "Scroll架构" + "introduction": "介绍", + "principles": "原则", + "scrollArchitecture": "Scroll 架构", + "overview": "概览", + + "scrollChain": "Scroll 链", + "accountsAndState": "账户和状态", + "blocks": "区块", + "transactions": "交易", + "rollupProcess": "Rollup 流程", + "evmDifferencesFromEthereum": "和以太坊 EVM 的区别", + + "bridge": "跨链桥", + "crossDomainMessaging": "跨链消息传递", + "depositGateways": "存款网关", + "withdrawGateways": "提款网关", + + "sequencer": "排序器", + "executionNode": "执行节点", + "rollupNode": "Rollup 节点", + "zkTrie": "zkTrie树", + + "zkevm": "zkEVM", + "introToZkevm": "zkEVM 介绍", + "zkevmOverview": "zkEVM 概览", + "bridgeOverview": "跨链桥 概览", + "prover": "prover", + "proofGeneration": "证明生成", + "cpuProverRepo": "CPU prover 代码仓库", + + "security": "安全", + "auditsAndBugBounty": "审计和漏洞赏金", + "l2BeatAssessment": "L2Beat 评估" }, "learn": { - "zkEVMOverview": "zkEVM概述" + "ethereumAndProtocols": "以太坊与协议", + "theScalabilityProblem": "扩容问题", + "introToRollups": "Rollups 介绍", + "zeroKnowledge": "零知识证明", + "introToZeroKnowledge": "零知识证明介绍", + "polynomialCommitmentSchemes": "多项式承诺方案", + "kzgCommitmentScheme": "KZG 承诺方案", + "additionalResources": "其他资源" + } + }, + "footer": { + "aboutScroll": { + "title": "关于 Scroll", + "bugBounty": "漏洞赏金", + "joinUs": "加入我们", + "healthStatus": "健康状况", + "privacyPolicy": "隐私政策", + "termsAndConditions": "条款和条件" + }, + "resources": { + "title": "资源", + "scrollDocsURL": "https://docs.scroll.io/", + "blog": "博客", + "documentation": "文档", + "brandKit": "品牌工具包" }, - "infrastructure": { - "introduction": "介绍" + "followUs": { + "title": "关注我们" } }, + "pageNotFound": { + "title": "页面未找到", + "text": "很抱歉,我们找不到您正在寻找的页面" + }, "notTranslated": { "notTranslated": "此页面尚未翻译。" } diff --git a/src/config/sidebar.ts b/src/config/sidebar.ts index 87984c775..2010b3a68 100644 --- a/src/config/sidebar.ts +++ b/src/config/sidebar.ts @@ -181,7 +181,13 @@ export const getSidebar = () => { technology: [ { section: t("sidebar.technology.overview"), - contents: [{ title: t("sidebar.technology.scrollArchitecture"), url: formatUrl("technology") }], + contents: [ + { title: t("sidebar.technology.scrollArchitecture"), url: formatUrl("technology") }, + { + title: t("sidebar.technology.scrollUpgrades"), + url: "technology/overview/scroll-upgrades", + }, + ], }, { section: t("sidebar.technology.scrollChain"), diff --git a/src/content/docs/en/developers/guides/estimating-gas-and-tx-fees.mdx b/src/content/docs/en/developers/guides/estimating-gas-and-tx-fees.mdx index 339c10bde..c082cbcd2 100644 --- a/src/content/docs/en/developers/guides/estimating-gas-and-tx-fees.mdx +++ b/src/content/docs/en/developers/guides/estimating-gas-and-tx-fees.mdx @@ -35,7 +35,7 @@ For a more comprehensive explanation and details on the formula, check the docum ## Interfacing with values -To fetch these values and calculate the final fee, we’ll interact with Scroll’s public RPC and pre-deployed Smart Contract L1GasOracle.sol, which is deployed at [`TODO: 0x5300000000000000000000000000000000000002`](TODO: https://blockscout.scroll.io/address/0x5300000000000000000000000000000000000002) +To fetch these values and calculate the final fee, we’ll interact with Scroll’s public RPC and pre-deployed Smart Contract `L1GasOracle.sol`, deployed at [`0x5300000000000000000000000000000000000002`](https://scrollscan.com/address/0x5300000000000000000000000000000000000002). For our example codebase, we make a Hardhat project and fetch values using the [Ethers.js](https://docs.ethers.org/v6/) library. diff --git a/src/content/docs/en/developers/l1-and-l2-bridging.mdx b/src/content/docs/en/developers/l1-and-l2-bridging.mdx index f0b2f13bf..b30000ef4 100644 --- a/src/content/docs/en/developers/l1-and-l2-bridging.mdx +++ b/src/content/docs/en/developers/l1-and-l2-bridging.mdx @@ -9,6 +9,7 @@ excerpt: "An overview of Scroll's Bridging architecture" --- import ClickToZoom from "../../../../components/ClickToZoom.astro" +import Aside from "../../../../components/Aside.astro" import L1GatewayWHITE from "../../../../assets/images/developers/L1GatewayWHITE.png" import withdrawWHITE from "../../../../assets/images/developers/withdrawWHITE.png" @@ -22,6 +23,7 @@ In addition to token transfers, the Scroll Messenger contract enables cross-chai ## L1 Gateway architecture + There are many entry points from the user to the Scroll bridge. This will depend on what you want to do and how you want to do it. If you want to send ETH or ERC20 tokens, you should use the `GatewayRouter` . If you want to send NFTs, you should use the `L1ERC721Gateway` or `L1ERC1155Gateway`. If you want to send arbitrary data, you should use the `L1ScrollMessenger`. All Gateway transfers use the Scroll Messenger to send assets cross-chain, whose job is to append the transactions to the Message Queue for L2 inclusion. @@ -32,4 +34,4 @@ There are many entry points from the user to the Scroll bridge. This will depend Regarding possible permissionlessly callable entry points, the L2 Gateway Architecture is very similar to L1. The difference is that when sending a message from L2, calling the `appendMessage` function will store the message in an append-only binary merkle tree (aka withdraw tree) in the `L2MessageQueue`. When a new message is sent to the `L2MessageQueue`, the relayer will detect it and store it in the database. When the block is finalized, it will generate a proof of the new merkle path and pass it to the L1geth node to execute on `L1ScrollMessenger` . All finalized withdraw roots will be stored in the rollup contract so we can verify the proof against them. In the next Scroll versions, the Relayer won't be needed since all users will be able to finalize the transaction on L1. -In the upcoming sections, we will explore the technical aspects of the bridge, including the smart contract API required to utilize its capabilities. Detailed guides with code examples are provided in the Developer Guides section to assist developers and users in understanding and implementing these functionalities. +In the upcoming sections, we will explore the technical aspects of the bridge, including the smart contract API required to utilize its capabilities. Detailed guides with code examples are provided in the Developer Guides section to assist developers and users in understanding and implementing these functionalities. \ No newline at end of file diff --git a/src/content/docs/en/developers/scroll-contracts.mdx b/src/content/docs/en/developers/scroll-contracts.mdx index 332f379d7..f1b251997 100644 --- a/src/content/docs/en/developers/scroll-contracts.mdx +++ b/src/content/docs/en/developers/scroll-contracts.mdx @@ -44,8 +44,8 @@ Use the table below to configure your Ethereum tools to the Scroll mainnet. ### ETH and ERC20 Bridge -- L1 ERC20 Gateway Router: [`0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6`](https://etherscan.io/address/0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6) -- L2 ERC20 Gateway Router: [`0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79`](https://scrollscan.com/address/0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79) +- L1 Gateway Router: [`0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6`](https://etherscan.io/address/0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6) +- L2 Gateway Router: [`0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79`](https://scrollscan.com/address/0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79) ### Advanced Bridge Contracts @@ -68,8 +68,10 @@ Use the table below to configure your Ethereum tools to the Scroll mainnet. - ERC1155 Bridge - L1 ERC1155 Gateway: [`0xb94f7F6ABcb811c5Ac709dE14E37590fcCd975B6`](https://etherscan.io/address/0xb94f7F6ABcb811c5Ac709dE14E37590fcCd975B6) - L2 ERC1155 Gateway: [`0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc`](https://scrollscan.com/address/0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc) -- Gas Oracle - - L2 Gas Oracle (deployed on Mainnet): [`0x987e300fDfb06093859358522a79098848C33852`](https://scrollscan.com/address/0x987e300fDfb06093859358522a79098848C33852) +- Gas Oracle (deployed on Mainnet) + - L2 Gas Oracle (*soon to be deprecated*): [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852) + - *after [Feb '24 Bridge Upgrade](https://scroll.io/blog/protocol-upgrade-bridging-cost-reduction)* + - L2 Message Queue With Gas Price Oracle: [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B) ### L2 Predeploys @@ -155,8 +157,8 @@ Use the table below to configure your Ethereum tools to the Scroll Sepolia Testn #### ETH and ERC20 Bridge -- L1 ERC20 Gateway Router: [`0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a`](https://sepolia.etherscan.io/address/0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a) -- L2 ERC20 Gateway Router: [`0x9aD3c5617eCAa556d6E166787A97081907171230`](https://sepolia.scrollscan.com/address/0x9aD3c5617eCAa556d6E166787A97081907171230) +- L1 Gateway Router: [`0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a`](https://sepolia.etherscan.io/address/0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a) +- L2 Gateway Router: [`0x9aD3c5617eCAa556d6E166787A97081907171230`](https://sepolia.scrollscan.com/address/0x9aD3c5617eCAa556d6E166787A97081907171230) #### Advanced Bridge Contracts @@ -179,8 +181,9 @@ Use the table below to configure your Ethereum tools to the Scroll Sepolia Testn - ERC1155 Bridge - L1 ERC1155 Gateway: [`0xa5Df8530766A85936EE3E139dECE3bF081c83146`](https://sepolia.etherscan.io/address/0xa5Df8530766A85936EE3E139dECE3bF081c83146) - L2 ERC1155 Gateway: [`0xe17C9b9C66FAF07753cdB04316D09f52144612A5`](https://sepolia.scrollscan.com/address/0xe17C9b9C66FAF07753cdB04316D09f52144612A5) -- Gas Oracle - - L2 Gas Oracle (deployed on Sepolia): [`0x247969F4fad93a33d4826046bc3eAE0D36BdE548`](https://sepolia.scrollscan.com/address/0x247969F4fad93a33d4826046bc3eAE0D36BdE548) +- Gas Oracle (deployed on Sepolia) + - L1 Message Queue With Gas Price Oracle: [`0xF0B2293F5D834eAe920c6974D50957A1732de763`](https://sepolia.etherscan.io/address/0xF0B2293F5D834eAe920c6974D50957A1732de763) + - L2 Gas Oracle (*deprecated*): [`0x247969F4fad93a33d4826046bc3eAE0D36BdE548`](https://sepolia.etherscan.io/address/0x247969F4fad93a33d4826046bc3eAE0D36BdE548) #### L2 Predeploys diff --git a/src/content/docs/en/developers/transaction-fees-on-scroll.mdx b/src/content/docs/en/developers/transaction-fees-on-scroll.mdx index 8ce7c2f70..6eaed9c25 100644 --- a/src/content/docs/en/developers/transaction-fees-on-scroll.mdx +++ b/src/content/docs/en/developers/transaction-fees-on-scroll.mdx @@ -140,7 +140,7 @@ Returns the latest known l1 base fee #### getL1Fee ```solidity -function getL1Fee(bytes memory _data) external view returns (uint256); +function getL1Fee(bytes memory data) external view returns (uint256); ``` Computes the L1 portion of the fee based on the size of the RLP encoded input transaction, the current L1 base fee, and the various dynamic parameters. @@ -165,10 +165,30 @@ Computes the amount of L1 gas used for a transaction. Adds the overhead which re | --------- | ----------------------------------------------------------- | | data | Signed fully RLP-encoded transaction to get the L1 fee for. | +## L1 Originated Transactions + +When messaging from L1 to L2, the user pays all transaction fees on L1. The user pays L1 gas fees, but because of this, doesn't need to pay Scroll an L1 Data Fee. They will need to account for L2 Execution Fees in their L1 transaction though, and will need to know how much L2 gas to pay. + +Contracts on L1 can use an L2 Gas Price Oracle deployed to the L1 to get the gas fee for a given transaction. The oracle also exposes the current l2BaseFee and estimated cross-domain message fee for a given gas limit. + +On mainnet, the `L2GasPriceOracle` is deployed at [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852). + +On Sepolia, an upgraded `L1MessageQueueWithGasPriceOracle` should be used, deployed to [`0xF0B2293F5D834eAe920c6974D50957A1732de763`](https://sepolia.etherscan.io/address/0xF0B2293F5D834eAe920c6974D50957A1732de763). + +If your system supports off-chain mechanisms, you can also call `eth_estimateGas` and `eth_gasPrice` on any Scroll RPC node to get an estimate of the gas required for a given transaction. + + +{/* TODO: Add full documentation of key methods */} + ## Future Roadmap -Currently, the computation required for proof generation is completed by and subsidized by Scroll and various proving partners. +Currently, the computation required for proof generation and gas for proof verification on L1 is subsidized by Scroll and various proving partners. It is partially covered by setting a floor to L2 Gas Price. As the prover network becomes decentralized, incentives for proof generation will need to be incorporated into the protocol for the system to be sustainable and scalable. -We expect the final gas cost will include the cost of this proof generation. With further protocol optimization, this cost for the user should be minimal, as each proof covers many transactions. +We expect the final gas cost will explicitly include the cost of this proof generation. With further protocol optimization, this cost for the user should be minimal, as each proof covers many transactions. diff --git a/src/content/docs/en/technology/bridge/cross-domain-messaging.mdx b/src/content/docs/en/technology/bridge/cross-domain-messaging.mdx index 32150e497..fa1bb858f 100644 --- a/src/content/docs/en/technology/bridge/cross-domain-messaging.mdx +++ b/src/content/docs/en/technology/bridge/cross-domain-messaging.mdx @@ -8,6 +8,7 @@ whatsnext: { "Deposit Gateways": "/technology/bridge/deposit-gateways/" } --- import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import Aside from "../../../../../components/Aside.astro" import ToggleElement from "../../../../../components/ToggleElement.astro" import L1ToL2 from "../_images/L1-to-L2.png" @@ -22,6 +23,10 @@ Scroll has an arbitrary message passing bridge that enables token transfers and There are two primary approaches to sending a message from L1 to L2: sending arbitrary messages via `L1ScrollMessenger` and sending enforced transactions via `EnforcedTxGateway`. Both approaches allow users to initiate a L2 transaction on L1 and call arbitrary contracts on L2. For arbitrary messages, the sender of the L2 transactions is the aliased `L1ScrollMessenger` address. For enforced transactions, the L2 sender is an externally-owned account (EOA). In addition, we provide several standard token gateways to make it easier for users to deposit ETH and other standard tokens including ERC-20, ERC-677, ERC-721, and ERC-1155. In essence, these gateways encode token deposits into a message and send it to their counterparts on L2 through the `L1ScrollMessenger` contract. You can find more details about the L1 token gateways in the [Deposit Gateways](/technology/bridge/deposit-gateways). + + As depicted in Figure 1, both arbitrary messages and enforced transactions are appended to the message queue stored in the `L1MessageQueue` contract. The `L1MessageQueue` contract provides two functions `appendCrossDomainMessage` and `appendEnforcedTransaction` for appending arbitrary messages and enforced transactions respectively. ```solidity @@ -112,6 +117,10 @@ The deposited ETH of `value` amount is locked in the `L1ScrollMessenger` contrac ### Sending Enforced Transactions + + The `EnforcedTxGateway` contract provides two `sendTransaction` functions to send an enforced transaction. In the first function, the sender of the generated `L1MessageTx` transaction is the transaction sender. On the other hand, the second function uses the passed `sender` address as the sender of the `L1MessageTx` transaction. This allows a third party to send an enforced transaction on behalf of the user and pay the relay fee. Note that the second function requires providing a valid signature of the generated `L1MessageTx` transaction that matches the `sender` address. Both `sendTransaction` functions enforce the sender to be an EOA account. @@ -185,6 +194,13 @@ Because the `L2ScrollMessenger` contract records all L1 messages that were succe The contract `L2GasPriceOracle` deployed on L1 computes the relay fee of a message given its gas limit. This contract stores the `l2BaseFee` in its storage, which is updated by a dedicated relayer run by Scroll currently. The relay fee of L1-to-L2 messages is `gasLimit * l2BaseFee`. + + ### Address Alias Due to the behavior of the `CREATE` opcode, it is possible that someone deploys a contract at the same address on L1 and L2 but with different bytecode. To avoid malicious users taking advantage of this, the bridge applies an address alias when the message sender is a contract on L1. The aliased sender address of the L1 message transaction is `l1_contract_address + offset` where the `offset` is `0x1111000000000000000000000000000000001111`. diff --git a/src/content/docs/en/technology/bridge/withdraw-gateways.mdx b/src/content/docs/en/technology/bridge/withdraw-gateways.mdx index f46c5d951..5b0053981 100644 --- a/src/content/docs/en/technology/bridge/withdraw-gateways.mdx +++ b/src/content/docs/en/technology/bridge/withdraw-gateways.mdx @@ -8,6 +8,7 @@ whatsnext: { "Sequencer": "/technology/sequencer/execution-node/" } --- import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import Aside from "../../../../../components/Aside.astro" import WithdrawWorkflow from "../_images/withdraw.png" This document describes how users and developers can utilize gateways to withdraw tokens from L2 to L1. We provide several gateways for standard tokens and a gateway router on L2, listed in the table below. diff --git a/src/content/docs/en/technology/overview/scroll-upgrades.mdx b/src/content/docs/en/technology/overview/scroll-upgrades.mdx new file mode 100644 index 000000000..b8be2174d --- /dev/null +++ b/src/content/docs/en/technology/overview/scroll-upgrades.mdx @@ -0,0 +1,90 @@ +--- +section: technology +date: Last Modified +title: "Scroll Upgrades" +lang: "en" +permalink: "technology/overview/scroll-upgrades" +--- + +As the team continues to progress on Scroll's roadmap, we will be upgrading the Scroll network to include new features and improvements. + +The following contracts are used to initiate upgrades and execute upgrades after the two-week timelock period: + +| Contract | Network | Address | +| ------------------------ | ------- | - | +| L1 Scroll Multisig | Ethereum| [`0xEfc9D1096fb65c832207E5e7F13C2D1102244dbe`](https://etherscan.io/address/0xEfc9D1096fb65c832207E5e7F13C2D1102244dbe)| +| L1 Timelock | Ethereum| [`0x1A658B88fD0a3c82fa1a0609fCDbD32e7dd4aB9C`](https://etherscan.io/address/0x1A658B88fD0a3c82fa1a0609fCDbD32e7dd4aB9C)| +| L2 Scroll Multisig | Scroll| [`0xEfc9D1096fb65c832207E5e7F13C2D1102244dbe`](https://scrollscan.com/address/0xEfc9D1096fb65c832207E5e7F13C2D1102244dbe)| +| L2 Timelock | Scroll | [`0xf6069DB81239E5194bb53f83aF564d282357bc99`](https://scrollscan.com/address/0xf6069DB81239E5194bb53f83aF564d282357bc99)| + +## February 2024 Bridge Upgrade + +### Overview + +To reduce bridging costs, we implemented several gas optimizations on our bridge and rollup contract suite. The optimization techniques used include the following: + +- We will now use constants to store some companion contract addresses, instead of using storage variables. This is possible since these values should (almost) never change. With this change we can save on a few storage load operations. +- We updated the intrinsic gas estimation in `L1MessageQueue` to use a simple upper bound instead of an exact calculation. The two results will be similar for most bridge transactions but the new implementation is significantly cheaper. +- We merged two contracts `L1MessageQueue` and `L2GasPriceOracle` to save on call costs from one contract to the other. + +### Timeline + + +- **Scroll Sepolia:** + - Network Upgrade: January 19, 2024 +- **Scroll Mainnet:** + - Upgrade Initiation: February 7, 2024 + - Timelock Completion & Upgrade: February 21, 2024 + + +### Technical Details + +#### Code Changes +- [Bridge Cost Optimization](https://github.com/scroll-tech/scroll/pull/1011) +- [Audit Fixes](https://github.com/scroll-tech/scroll/pulls?q=OZ+is%3Apr+created%3A2024-01-27..2024-02-10) +- [Previously deployed version](https://github.com/scroll-tech/scroll/tree/ff380141a8cbcc214dc65f17ffa44faf4be646b6) (commit `ff380141a8cbcc214dc65f17ffa44faf4be646b6`) +- [Version deployed](https://github.com/scroll-tech/scroll/tree/6030927680a92d0285c2c13e6bb27ed27d1f32d1) (commit `6030927680a92d0285c2c13e6bb27ed27d1f32d1`) + +#### Audits + +- [OpenZeppelin](https://blog.openzeppelin.com/scroll-bridge-gas-optimizations-audit) + +#### List of Changes + +**Changes to L1 contracts:** + +- In `ScrollChain`, change `messageQueue` and `verifier` to `immutable`. +- In `L1ScrollMessenger`, change `counterpart`, `rollup`, and `messageQueue` to `immutable`. +- In all token gateways, change `counterpart`, `router`, and `messenger` to `immutable`. +- Merge `L1MessageQueue` and `L2GasPriceOracle` into a single contract `L1MessageQueueWithGasPriceOracle` (deployed on the same address as the previous `L1MessageQueue`). In this contract we also change `messenger` and `scrollChain` to `immutable`, and simplify `calculateIntrinsicGasFee`. + +**Changes to L2 contracts:** + +- In `L2ScrollMessenger`, change `counterpart` to `immutable`. +- In all token gateways, change `counterpart`, `router`, and `messenger` to `immutable`. + +**Contracts affected:** + +- **L1:** `L1MessageQueue`, `L2GasPriceOracle`, `ScrollChain`, `L1WETHGateway`, `L1StandardERC20Gateway`, `L1GatewayRouter`, `L1ScrollMessenger`, `L1CustomERC20Gateway`, `L1ERC721Gateway`, `L1ERC1155Gateway`. +- **L2:** `L2ScrollMessenger`, `L2WETHGateway`, `L2StandardERC20Gateway`, `L2GatewayRouter`, `L2CustomERC20Gateway`, `L2ERC721Gateway`, `L2ERC1155Gateway`. + +#### Compatibility + +##### Sequencer and follower nodes (l2geth) + +Operators running an `l2geth` node do not need to upgrade. The changes in this upgrade will not affect `l2geth`. + +##### Dapps and indexers + +Dapps and indexers (and similar off-chain infrastructure) that query contracts or rely on contract interfaces would, in most cases, not need to be changed. The majority of the contract changes are internal and/or backward compatible. + +If your application depends on [`L2GasPriceOracle`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852) to monitor how Scroll keeps track of the L2 gas price on L1, from the upgrade block number you will need to start monitoring [`L1MessageQueueWithGasPriceOracle`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B). + +The original gas price oracle contract will be deprecated: it will no longer be updated or used by the Scroll bridge. + +- Ethereum: + - `L2GasPriceOracle`: [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852) + - `L1MessageQueueWithGasPriceOracle`: [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B) +- Sepolia: + - `L2GasPriceOracle`: [`0x247969F4fad93a33d4826046bc3eAE0D36BdE548`](https://sepolia.etherscan.io/address/0x247969F4fad93a33d4826046bc3eAE0D36BdE548) + - `L1MessageQueueWithGasPriceOracle`: [`0xF0B2293F5D834eAe920c6974D50957A1732de763`](https://sepolia.etherscan.io/address/0xF0B2293F5D834eAe920c6974D50957A1732de763) \ No newline at end of file diff --git a/src/content/docs/es/developers/scroll-contracts.mdx b/src/content/docs/es/developers/scroll-contracts.mdx index a43981fe5..950050283 100644 --- a/src/content/docs/es/developers/scroll-contracts.mdx +++ b/src/content/docs/es/developers/scroll-contracts.mdx @@ -9,92 +9,227 @@ excerpt: "The network info and contract addresses you need to start with Scroll --- import Aside from "../../../../components/Aside.astro" +import ToggleElement from "../../../../components/ToggleElement.astro" + +En este artículo encotrarás información útil sobre los addresses de Scroll y de protocolos usados frecuentemente. Visita la sección a continuación para información sobre [Scroll Sepolia](#scroll-sepolia-testnet). ## Información de la Red -| Nombre de Red | Scroll Sepolia Testnet | Sepolia Testnet | -| ------------------ | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| RPC URL | [https://sepolia-rpc.scroll.io/](https://sepolia-rpc.scroll.io/) | [https://eth-sepolia-public.unifra.io](https://eth-sepolia-public.unifra.io) | -| Chain ID | 534351 | 11155111 | -| Currency Symbol | ETH | ETH | -| Block Explorer URL | [https://sepolia-blockscout.scroll.io](https://sepolia-blockscout.scroll.io/) | [https://sepolia.etherscan.io](https://sepolia.etherscan.io) | +Usa la tabla a continuación para configurar tus herramientas de Ethereum en Scroll mainnet. + +| Nombre de Red | Scroll | Ethereum Mainnet | +| ------------------ | -------------------------------------------------- | ---------------------------------------------------- | +| RPC URL | [https://rpc.scroll.io/](https://rpc.scroll.io/) | [https://eth.llamarpc.com](https://eth.llamarpc.com) | +| Chain ID | 534352 | 1 | +| Currency Symbol | ETH | ETH | +| Block Explorer URL | [https://scrollscan.com/](https://scrollscan.com/) | [https://etherscan.io](https://etherscan.io) | -## Contratos de Scroll Sepolia + +
RPCs e Infraestructura adicional en Scroll Mainnet
+ - [Bridge Nativo de Scroll](https://scroll.io/bridge) + - [Scanner del Rollup de Scroll](https://scroll.io/rollupscan) + - [Proveedores de RPC en Scroll en ChainList.org](https://chainlist.org/chain/534352) + - [Proveedores de RPC de Ethereum en ChainList.org](https://chainlist.org/chain/1) + {/* - Block Explorers Adicionales: + - [Dora](https://www.ondora.xyz/network/scroll/interactions) + - [L2Scan](https://scroll.l2scan.co/) */} + +
+ +## Contratos de Scroll ### Rollup -- L1 Rollup (Scroll Chain): `0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0` +- Rollup en L1 (Scroll Chain): [`0xa13BAF47339d63B743e7Da8741db5456DAc1E556`](https://etherscan.io/address/0xa13BAF47339d63B743e7Da8741db5456DAc1E556) -### ETH y ERC20 Bridge +### Bridge de ETH y ERC20 -- L1 ERC20 Gateway Router: `0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a` -- L2 ERC20 Gateway Router: `0x9aD3c5617eCAa556d6E166787A97081907171230` +- Gateway Router de ERC20 en L1: [`0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6`](https://etherscan.io/address/0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6) +- Gateway Router de ERC20 en L2: [`0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79`](https://scrollscan.com/address/0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79) ### Contratos de Bridge Avanzados -- Scroll Messenger - - L1 Messenger: `0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A` - - L2 Messenger: `0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d` -- ETH Bridge - - L1 ETH Gateway: `0x8A54A2347Da2562917304141ab67324615e9866d` - - L2 ETH Gateway: `0x91e8ADDFe1358aCa5314c644312d38237fC1101C` - - L1 WETH Gateway: `0x3dA0BF44814cfC678376b3311838272158211695` - - L2 WETH Gateway: `0x481B20A927206aF7A754dB8b904B052e2781ea27` -- ERC20 Bridge - - L1 ERC20 Standard Gateway: `0x65D123d6389b900d954677c26327bfc1C3e88A13` - - L2 ERC20 Standard Gateway: `0xaDcA915971A336EA2f5b567e662F5bd74AEf9582` - - L1 ERC20 Custom Gateway: `0x31C994F2017E71b82fd4D8118F140c81215bbb37` - - L2 ERC20 Custom Gateway: `0x058dec71E53079F9ED053F3a0bBca877F6f3eAcf` -- ERC721 Bridge - - L1 ERC721 Gateway: `0xEF27A5E63aa3f1B8312f744b9b4DcEB910Ba77AC` - - L2 ERC721 Gateway: `0x179B9415194B67DC3c0b8760E075cD4415785c97` -- ERC1155 Bridge - - L1 ERC1155 Gateway: `0xa5Df8530766A85936EE3E139dECE3bF081c83146` - - L2 ERC1155 Gateway: `0xe17C9b9C66FAF07753cdB04316D09f52144612A5` -- Gas Oracle - - L2 Gas Oracle (Implementado en Sepolia): `0x247969F4fad93a33d4826046bc3eAE0D36BdE548` - -### L2 Predeploys - -- Message Queue: `0x5300000000000000000000000000000000000000` -- Gas Price Oracle: `0x5300000000000000000000000000000000000002` -- Whitelist: `0x5300000000000000000000000000000000000003` -- WETH L2: `0x5300000000000000000000000000000000000004` -- Transaction Fee Vault: `0x5300000000000000000000000000000000000005` - -## Protocolos en Sepolia +- Messenger de Scroll + - Messenger en L1: [`0x6774Bcbd5ceCeF1336b5300fb5186a12DDD8b367`](https://etherscan.io/address/0x6774Bcbd5ceCeF1336b5300fb5186a12DDD8b367) + - Messenger en L2: [`0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC`](https://scrollscan.com/address/0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC) +- Bridge de ETH + - Gateway de ETH en L1: [`0x7F2b8C31F88B6006c382775eea88297Ec1e3E905`](https://etherscan.io/address/0x7F2b8C31F88B6006c382775eea88297Ec1e3E905) + - Gateway de ETH en L2: [`0x6EA73e05AdC79974B931123675ea8F78FfdacDF0`](https://scrollscan.com/address/0x6EA73e05AdC79974B931123675ea8F78FfdacDF0) + - Gateway de WETH en L1: [`0x7AC440cAe8EB6328de4fA621163a792c1EA9D4fE`](https://etherscan.io/address/0x7AC440cAe8EB6328de4fA621163a792c1EA9D4fE) + - Gateway de WETH en L2: [`0x7003E7B7186f0E6601203b99F7B8DECBfA391cf9`](https://scrollscan.com/address/0x7003E7B7186f0E6601203b99F7B8DECBfA391cf9) +- Bridge de ERC20 + - Gateway Estándar de ERC20 en L1: [`0xD8A791fE2bE73eb6E6cF1eb0cb3F36adC9B3F8f9`](https://etherscan.io/address/0xD8A791fE2bE73eb6E6cF1eb0cb3F36adC9B3F8f9) + - Gateway Estándar de ERC20 en L2: [`0xE2b4795039517653c5Ae8C2A9BFdd783b48f447A`](https://scrollscan.com/address/0xE2b4795039517653c5Ae8C2A9BFdd783b48f447A) + - Gateway Custom de ERC20 en L1: [`0xb2b10a289A229415a124EFDeF310C10cb004B6ff`](https://etherscan.io/address/0xb2b10a289A229415a124EFDeF310C10cb004B6ff) + - Gateway Custom de ERC20 en L2: [`0x64CCBE37c9A82D85A1F2E74649b7A42923067988`](https://scrollscan.com/address/0x64CCBE37c9A82D85A1F2E74649b7A42923067988) +- Bridge de ERC721 + - Gateway de ERC721 en L1: [`0x6260aF48e8948617b8FA17F4e5CEa2d21D21554B`](https://etherscan.io/address/0x6260aF48e8948617b8FA17F4e5CEa2d21D21554B) + - Gateway de ERC721 en L2: [`0x7bC08E1c04fb41d75F1410363F0c5746Eae80582`](https://scrollscan.com/address/0x7bC08E1c04fb41d75F1410363F0c5746Eae80582) +- Bridge de ERC1155 + - Gateway de ERC1155 en L1: [`0xb94f7F6ABcb811c5Ac709dE14E37590fcCd975B6`](https://etherscan.io/address/0xb94f7F6ABcb811c5Ac709dE14E37590fcCd975B6) + - Gateway de ERC1155 en L2: [`0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc`](https://scrollscan.com/address/0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc) +- Oráculo de Gas + - Oráculo de Gas en L2 (deployado en Mainnet): [`0x987e300fDfb06093859358522a79098848C33852`](https://scrollscan.com/address/0x987e300fDfb06093859358522a79098848C33852) + +### Predeploys en L2 + +- Cola de Mensajes: [`0x5300000000000000000000000000000000000000`](https://scrollscan.com/address/0x5300000000000000000000000000000000000000) +- Oráculo de Precio del Gas: [`0x5300000000000000000000000000000000000002`](https://scrollscan.com/address/0x5300000000000000000000000000000000000002) +- Whitelist: [`0x5300000000000000000000000000000000000003`](https://scrollscan.com/address/0x5300000000000000000000000000000000000003) +- WETH en L2: [`0x5300000000000000000000000000000000000004`](https://scrollscan.com/address/0x5300000000000000000000000000000000000004) +- Bóveda de Comisiones de Transacción: [`0x5300000000000000000000000000000000000005`](https://scrollscan.com/address/0x5300000000000000000000000000000000000005) + +## Protocols en Scroll Mainnet ### Uniswap v3 -- Frontend website: [https://uniswap-showcase.sepolia.scroll.xyz/](https://uniswap-showcase.sepolia.scroll.xyz/) -- Main Contracts - - Core Factory: `0xB856587fe1cbA8600F75F1b1176E44250B11C788` - - NFT Position Manager: `0xbbAd0e891922A8A4a7e9c39d4cc0559117016fec` - - Router: `0x17AFD0263D6909Ba1F9a8EAC697f76532365Fb95` -- Additional Contracts - - multicall2Address: `0x8c181f4B9040F1a2C941EfD3b608712cF86F1957` - - proxyAdminAddress: `0xD4A9910732b6f301F6F210Ebe7a3dBf16d9E9DD4` - - tickLensAddress: `0x9804Da978427a49929f2E6Ea32A9594F03f9296e` - - nftDescriptorLibraryAddressV1_3_0: `0x45Bd3B62B7A3aA53371c98049b0f7A9C1A4B5a6c` - - nonfungibleTokenPositionDescriptorAddressV1_3_0: `0x24d4E4a572Dc1e0dbF92a0d7768Ac80df516b2C2` - - descriptorProxyAddress: `0xa8986417d0EAe50607696b9b0cb7ec5aFBE67765` - - v3MigratorAddress: `0x38E33D067F03a5cDc02C301b2c306cb0414549Bf` - - v3StakerAddress: `0xe7b82794Cab21e665a3e6f8ea562d392AA6E0619` - - quoterV2Address: `0xd5dd33650Ef1DC6D23069aEDC8EAE87b0D3619B2` - -### Aave - -Observa este [Github gist](https://gist.github.com/dghelm/7fe68f0a524f30846e1142721c081d84). +- Contratos Principales + - Core Factory: [`0x70C62C8b8e801124A4Aa81ce07b637A3e83cb919`](https://scrollscan.com/address/0x70C62C8b8e801124A4Aa81ce07b637A3e83cb919) + - NFT Position Manager: [`0xB39002E4033b162fAc607fc3471E205FA2aE5967`](https://scrollscan.com/address/0xB39002E4033b162fAc607fc3471E205FA2aE5967) + - Router: [`0xfc30937f5cDe93Df8d48aCAF7e6f5D8D8A31F636`](https://scrollscan.com/address/0xfc30937f5cDe93Df8d48aCAF7e6f5D8D8A31F636) +- Contratos Adicionales + - multicall2Address: [`0xC1D2e074C38FdD5CA965000668420C80316F0915`](https://scrollscan.com/address/0xC1D2e074C38FdD5CA965000668420C80316F0915) + - proxyAdminAddress: [`0x1E6dcAb806A42055098f23E2B3ac72D6E195F967`](https://scrollscan.com/address/0x1E6dcAb806A42055098f23E2B3ac72D6E195F967) + - tickLensAddress: [`0x85780e12e90D2a684eB8E7404c985b5B5c8ce7E9`](https://scrollscan.com/address/0x85780e12e90D2a684eB8E7404c985b5B5c8ce7E9) + - nftDescriptorLibraryAddressV1_3_0: [`0xAeE9c206ba89F3DA25EEe4636208519e0B86965B`](https://scrollscan.com/address/0xAeE9c206ba89F3DA25EEe4636208519e0B86965B) + - nonfungibleTokenPositionDescriptorAddressV1_3_0: [`0xACcf12204b7591B2ECCEFe737440B0f53748B191`](https://scrollscan.com/address/0xACcf12204b7591B2ECCEFe737440B0f53748B191) + - descriptorProxyAddress: [`0x675DD953225D296A44790dC1390a1E7eF378f464`](https://scrollscan.com/address/0x675DD953225D296A44790dC1390a1E7eF378f464) + - v3MigratorAddress: [`0xF00577B5Dd0DA227298E954Ed11356F264Cf93d4`](https://scrollscan.com/address/0xF00577B5Dd0DA227298E954Ed11356F264Cf93d4) + - v3StakerAddress: [`0xFdFbE973c9ecB036Ecfb7af697FcACe789D3f928`](https://scrollscan.com/address/0xFdFbE973c9ecB036Ecfb7af697FcACe789D3f928) + - quoterV2Address: [`0x2566e082Cb1656d22BCbe5644F5b997D194b5299`](https://scrollscan.com/address/0x2566e082Cb1656d22BCbe5644F5b997D194b5299) + +#### Ethereum Attestation Service (EAS) + +- EAS: [`0xC47300428b6AD2c7D03BB76D05A176058b47E6B0`](https://scrollscan.com/address/0xC47300428b6AD2c7D03BB76D05A176058b47E6B0) +- SchemaRegistry: [`0xD2CDF46556543316e7D34e8eDc4624e2bB95e3B6`](https://scrollscan.com/address/0xD2CDF46556543316e7D34e8eDc4624e2bB95e3B6) +- EIP712Proxy: [`0x77b7DA1c40762Cd8AFfE2069b575328EfD4D9801`](https://scrollscan.com/address/0x77b7DA1c40762Cd8AFfE2069b575328EfD4D9801) +- Indexador: `Not deployed yet` ## Contratos Útiles Adicionales -- Multicall3: `0xcA11bde05977b3631167028862bE2a173976CA11` +- Multicall3: [`0xcA11bde05977b3631167028862bE2a173976CA11`](https://scrollscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11) ## Tokens -- Gho Token: `0xD9692f1748aFEe00FACE2da35242417dd05a8615` +{" "} + +
+ +--- + +## Scroll Sepolia Testnet + +### Información de la Red + +Usa la tabla a continuación para configurar tus herramientas de Ethereum en Scroll Sepolia testnet. + +| Nombre de Red | Scroll Sepolia Testnet | Sepolia Testnet | +| ------------------ | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| RPC URL | [https://sepolia-rpc.scroll.io/](https://sepolia-rpc.scroll.io/) | [https://eth-sepolia-public.unifra.io](https://eth-sepolia-public.unifra.io) | +| Chain ID | 534351 | 11155111 | +| Currency Symbol | ETH | ETH | +| Block Explorer URL | [https://sepolia-blockscout.scroll.io](https://sepolia-blockscout.scroll.io/) | [https://sepolia.etherscan.io](https://sepolia.etherscan.io) | + + +
RPCs e Infraestructura adicional en Scroll Sepolia
+ - [Bridge Nativo de Scroll](https://sepolia.scroll.io/bridge) + - [Scanner del Rollup de Scroll](https://sepolia.scroll.io/rollupscan) + - [Proveedores de RPC en Scroll en ChainList.org](https://chainlist.org/chain/534351) + - [Proveedores de RPC de Ethereum en ChainList.org](https://chainlist.org/chain/11155111) + {/* - Block Explorers Adicionales: + - [Dora](https://www.ondora.xyz/network/scroll-sepolia/interactions) + - [L2Scan](https://scroll.l2scan.co/) */} + +
+ +### Contratos en Scroll Sepolia + +#### Rollup + +- Rollup en L1 (Scroll Chain): [`0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0`](https://sepolia.etherscan.io/address/0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0) + +#### ETH and ERC20 Bridge + +- Gateway Router de ERC20 en L1: [`0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a`](https://sepolia.etherscan.io/address/0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a) +- Gateway Router de ERC20 en L2: [`0x9aD3c5617eCAa556d6E166787A97081907171230`](https://sepolia.scrollscan.com/address/0x9aD3c5617eCAa556d6E166787A97081907171230) + +#### Contratos de Bridge Avanzados + +- Messenger de Scroll + - Messenger en L1: [`0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A`](https://sepolia.etherscan.io/address/0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A) + - Messenger en L2: [`0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d`](https://sepolia.scrollscan.com/address/0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d) +- Bridge de ETH + - Gateway de ETH en L1: [`0x8A54A2347Da2562917304141ab67324615e9866d`](https://sepolia.etherscan.io/address/0x8A54A2347Da2562917304141ab67324615e9866d) + - Gateway de ETH en L2: [`0x91e8ADDFe1358aCa5314c644312d38237fC1101C`](https://sepolia.scrollscan.com/address/0x91e8ADDFe1358aCa5314c644312d38237fC1101C) + - Gateway en WETH en L1: [`0x3dA0BF44814cfC678376b3311838272158211695`](https://sepolia.etherscan.io/address/0x3dA0BF44814cfC678376b3311838272158211695) + - Gateway en WETH en L2: [`0x481B20A927206aF7A754dB8b904B052e2781ea27`](https://sepolia.scrollscan.com/address/0x481B20A927206aF7A754dB8b904B052e2781ea27) +- Bridge de ERC20 + - Gateway Estándar en ERC20 en L1: [`0x65D123d6389b900d954677c26327bfc1C3e88A13`](https://sepolia.etherscan.io/address/0x65D123d6389b900d954677c26327bfc1C3e88A13) + - Gateway Estándar en ERC20 en L2: [`0xaDcA915971A336EA2f5b567e662F5bd74AEf9582`](https://sepolia.scrollscan.com/address/0xaDcA915971A336EA2f5b567e662F5bd74AEf9582) + - Gateway Custom de ERC20 en L1: [`0x31C994F2017E71b82fd4D8118F140c81215bbb37`](https://sepolia.etherscan.io/address/0x31C994F2017E71b82fd4D8118F140c81215bbb37) + - Gateway Custom de ERC20 en L2: [`0x058dec71E53079F9ED053F3a0bBca877F6f3eAcf`](https://sepolia.scrollscan.com/address/0x058dec71E53079F9ED053F3a0bBca877F6f3eAcf) +- Bridge de ERC721 + - Gateway de ERC721 en L1: [`0xEF27A5E63aa3f1B8312f744b9b4DcEB910Ba77AC`](https://sepolia.etherscan.io/address/0xEF27A5E63aa3f1B8312f744b9b4DcEB910Ba77AC) + - Gateway de ERC721 en L2: [`0x179B9415194B67DC3c0b8760E075cD4415785c97`](https://sepolia.scrollscan.com/address/0x179B9415194B67DC3c0b8760E075cD4415785c97) +- Bridge de ERC1155 + - Gateway de ERC1155 en L1: [`0xa5Df8530766A85936EE3E139dECE3bF081c83146`](https://sepolia.etherscan.io/address/0xa5Df8530766A85936EE3E139dECE3bF081c83146) + - Gateway de ERC1155 en L2: [`0xe17C9b9C66FAF07753cdB04316D09f52144612A5`](https://sepolia.scrollscan.com/address/0xe17C9b9C66FAF07753cdB04316D09f52144612A5) +- Oráculo de Gas + - Oráculo de Gas en L2 (deployado en Sepolia): [`0x247969F4fad93a33d4826046bc3eAE0D36BdE548`](https://sepolia.scrollscan.com/address/0x247969F4fad93a33d4826046bc3eAE0D36BdE548) + +#### Predeploys en L2 + +- Cola de Mensajes: [`0x5300000000000000000000000000000000000000`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000000) +- Oráculo de Precio de Gas: [`0x5300000000000000000000000000000000000002`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000002) +- Whitelist: [`0x5300000000000000000000000000000000000003`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000003) +- WETH en L2: [`0x5300000000000000000000000000000000000004`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000004) +- Bóveda de Comisiones de Transacciones: [`0x5300000000000000000000000000000000000005`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000005) + +### Protocols + +#### Uniswap v3 + +- Sitio Web: [https://uniswap-showcase.sepolia.scroll.xyz/](https://uniswap-showcase.sepolia.scroll.xyz/) +- Contratos Principales + - Core Factory: [`0xB856587fe1cbA8600F75F1b1176E44250B11C788`](https://sepolia.scrollscan.com/address/0xB856587fe1cbA8600F75F1b1176E44250B11C788) + - NFT Position Manager: [`0xbbAd0e891922A8A4a7e9c39d4cc0559117016fec`](https://sepolia.scrollscan.com/address/0xbbAd0e891922A8A4a7e9c39d4cc0559117016fec) + - Router: [`0x17AFD0263D6909Ba1F9a8EAC697f76532365Fb95`](https://sepolia.scrollscan.com/address/0x17AFD0263D6909Ba1F9a8EAC697f76532365Fb95) +- Contratos Adicionales + - multicall2Address: [`0x8c181f4B9040F1a2C941EfD3b608712cF86F1957`](https://sepolia.scrollscan.com/address/0x8c181f4B9040F1a2C941EfD3b608712cF86F1957) + - proxyAdminAddress: [`0xD4A9910732b6f301F6F210Ebe7a3dBf16d9E9DD4`](https://sepolia.scrollscan.com/address/0xD4A9910732b6f301F6F210Ebe7a3dBf16d9E9DD4) + - tickLensAddress: [`0x9804Da978427a49929f2E6Ea32A9594F03f9296e`](https://sepolia.scrollscan.com/address/0x9804Da978427a49929f2E6Ea32A9594F03f9296e) + - nftDescriptorLibraryAddressV1_3_0: [`0x45Bd3B62B7A3aA53371c98049b0f7A9C1A4B5a6c`](https://sepolia.scrollscan.com/address/0x45Bd3B62B7A3aA53371c98049b0f7A9C1A4B5a6c) + - nonfungibleTokenPositionDescriptorAddressV1_3_0: [`0x24d4E4a572Dc1e0dbF92a0d7768Ac80df516b2C2`](https://sepolia.scrollscan.com/address/0x24d4E4a572Dc1e0dbF92a0d7768Ac80df516b2C2) + - descriptorProxyAddress: [`0xa8986417d0EAe50607696b9b0cb7ec5aFBE67765`](https://sepolia.scrollscan.com/address/0xa8986417d0EAe50607696b9b0cb7ec5aFBE67765) + - v3MigratorAddress: [`0x38E33D067F03a5cDc02C301b2c306cb0414549Bf`](https://sepolia.scrollscan.com/address/0x38E33D067F03a5cDc02C301b2c306cb0414549Bf) + - v3StakerAddress: [`0xe7b82794Cab21e665a3e6f8ea562d392AA6E0619`](https://sepolia.scrollscan.com/address/0xe7b82794Cab21e665a3e6f8ea562d392AA6E0619) + - quoterV2Address: [`0xd5dd33650Ef1DC6D23069aEDC8EAE87b0D3619B2`](https://sepolia.scrollscan.com/address/0xd5dd33650Ef1DC6D23069aEDC8EAE87b0D3619B2) + +#### Aave + +Mira este [gist](https://gist.github.com/dghelm/7fe68f0a524f30846e1142721c081d84). + +#### Ethereum Attestation Service (EAS) + +- EAS: [`0xaEF4103A04090071165F78D45D83A0C0782c2B2a`](https://sepolia.scrollscan.com/address/0xaEF4103A04090071165F78D45D83A0C0782c2B2a) +- SchemaRegistry: [`0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797`](https://sepolia.scrollscan.com/address/0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797) +- EIP712Proxy: [`0xB3574f76b1720E61FdA98702c7016674CD6Eaa7b`](https://sepolia.scrollscan.com/address/0xB3574f76b1720E61FdA98702c7016674CD6Eaa7b) +- Indexador: [`0x7C2cb1eDC328491da52de2a0afc44D3B0Ae7ee17`](https://sepolia.scrollscan.com/address/0x7C2cb1eDC328491da52de2a0afc44D3B0Ae7ee17) + +### Contratos Útiles Adicionales + +- Multicall3: [`0xcA11bde05977b3631167028862bE2a173976CA11`](https://sepolia.scrollscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11) + +### Tokens + + + +- Token de Gho: [`0xD9692f1748aFEe00FACE2da35242417dd05a8615`](https://sepolia.scrollscan.com/address/0xD9692f1748aFEe00FACE2da35242417dd05a8615) diff --git a/src/content/docs/zh/article-components.mdx b/src/content/docs/zh/article-components.mdx new file mode 100644 index 000000000..96b4a2f63 --- /dev/null +++ b/src/content/docs/zh/article-components.mdx @@ -0,0 +1,164 @@ +--- +section: gettingStarted +title: "Article Components" +date: Last Modified +lang: "en" +permalink: "/article-components" +excerpt: "Learn more about the topics of Ethereum Scalability and Zero Knowledge Cryptography" +whatsnext: { "Next Up Page 1": "/", "Second Next Up Page": "/" } +--- + +import ClickToZoom from "../../../components/ClickToZoom.astro" +import priceAggr from "../../../assets/images/contract-devs/price-aggr.png" +import ToggleElement from "../../../components/ToggleElement.astro" +import Aside from "../../../components/Aside.astro" +import MarkmapView from "../../../components/MarkmapView/index.astro" + +This is body text right under the article title. It typically is just paragraph text that's pretty straightforward. Then there's **bold text**, and _italic text_, and **_bold-italic text_**, and `inline-code` and **`bold inline code`** and even _`italic inline code`_ and **_`bold italic inline code`_**. And of course don't forget [links](#), and [**bold links**](#), and [_italic links_](#), and [**_bold-italic links_**](#). + +## Markdown Components (also an H2 Heading) + +- We've also got unordered lists! +- They can have multiple items. + - And some sub-items. + - That get into details +- That's an unordered list. + +What else do we have? + +1. Of course there's also ordered lists. +1. They look like this. +1. They're pretty useful. + +### H3 Heading + +#### H4 Heading + +##### H5 Heading + +Let's see a horizontal rule. + +--- + +We define the Square-Fibonacci sequence[^1], a variation of the Fibonacci sequence: + +### Math + +- Let $f_0 = 1, f_1 = 1$ +- For $$i \geq 2$$, define $f_{i} := (f_{i-2})^2 + (f_{i-1})^2 \mod q$ + - Where $q$ is a large prime integer. We use this modulus to bound the size of each element, so that it can be represented by some predetermined number of bits. + +### Tables + +| Syntax | Description | +| --------- | ----------- | +| Header | Title | +| Paragraph | Text | + +### Blockquotes + +> #### Success +> +> Vitae reprehenderit at aliquid error voluptates eum dignissimos. + +### Footnotes + +Here's a simple footnote,[^1] and here's a longer one.[^bignote] + +[^1]: This is the first footnote. +[^bignote]: Here's one with multiple paragraphs and code. + +### Callout that worked in MD, but might not in MDX? + +:::tip[Did you know?] +Astro helps you build faster websites with “Islands Architecture”. +::: + +## Imported MDX Components + +### Callouts + + + + + + + +``` +:::tip[Did you know?] + Astro helps you build faster websites with “Islands Architecture”. +::: +``` + +### Images zoom + + + +### Toggle + + +
Why build on Scroll?
+

+ Scroll enables creators to turn their content into interactive, explorable experiences. With Scroll, you can create + rich, interactive stories that engage readers, provide a better user experience, and help you stand out from the + crowd. +

+
+ +
How does Scroll work?
+

+ Scroll combines powerful technologies like WebGL and WebRTC to create immersive, interactive experiences. The + platform allows you to build 3D environments, add interactivity, and embed content from popular web services to + create a unique, engaging experience for your audience. +

+
+ +
What can I build with Scroll?
+

+ You can build a wide range of experiences with Scroll, from interactive articles to immersive product demos and + virtual tours. Scroll is designed to help you create engaging, interactive experiences that elevate your content and + captivate your audience. +

+
+ +### Markmap + +#### Referenced File + + + + +[](#markmap)markmap +=================== + +- beautiful2 +- useful +- easy +- interactive + + + +### Mermaid + +```mermaid +stateDiagram + Step --> StepState + Step --> CellManager + ConstraintBuilder --> CellManager + CellManager --> ProofSystem(Halo2) + StepState --> ExecutionState + StepState --> step_context + ExecutionState --> ConstraintBuilder + step_context --> ConstraintBuilder +``` diff --git a/src/content/docs/zh/developers/_images/enforcedTxData.png b/src/content/docs/zh/developers/_images/enforcedTxData.png new file mode 100644 index 000000000..55b8c612e Binary files /dev/null and b/src/content/docs/zh/developers/_images/enforcedTxData.png differ diff --git a/src/content/docs/zh/developers/_images/enforcedTxSepoliascan.png b/src/content/docs/zh/developers/_images/enforcedTxSepoliascan.png new file mode 100644 index 000000000..c23a1e435 Binary files /dev/null and b/src/content/docs/zh/developers/_images/enforcedTxSepoliascan.png differ diff --git a/src/content/docs/zh/developers/_images/injectedProviderMM.png b/src/content/docs/zh/developers/_images/injectedProviderMM.png new file mode 100644 index 000000000..816517512 Binary files /dev/null and b/src/content/docs/zh/developers/_images/injectedProviderMM.png differ diff --git a/src/content/docs/zh/developers/_images/mmNetworkSelection.png b/src/content/docs/zh/developers/_images/mmNetworkSelection.png new file mode 100644 index 000000000..e86176f9b Binary files /dev/null and b/src/content/docs/zh/developers/_images/mmNetworkSelection.png differ diff --git a/src/content/docs/zh/developers/_images/verify1.png b/src/content/docs/zh/developers/_images/verify1.png new file mode 100644 index 000000000..b27db86bb Binary files /dev/null and b/src/content/docs/zh/developers/_images/verify1.png differ diff --git a/src/content/docs/zh/developers/developer-quickstart.mdx b/src/content/docs/zh/developers/developer-quickstart.mdx new file mode 100644 index 000000000..b88ca8045 --- /dev/null +++ b/src/content/docs/zh/developers/developer-quickstart.mdx @@ -0,0 +1,220 @@ +--- +section: developers +date: Last Modified +title: "开发者快速入门" +lang: "zh" +permalink: "developers/developer-quickstart" +excerpt: "Scroll Developer Quickstart helps you acquire testnet Ether, configure your network, and access all of your favorite tooling" +whatsnext: { "验证智能合约": "/zh/developers/verifying-smart-contracts" } +--- + +import Aside from "../../../../components/Aside.astro" +import ClickToZoom from "../../../../components/ClickToZoom.astro" +import networkSelection from "./_images/mmNetworkSelection.png" +import injectedProviderMM from "./_images/injectedProviderMM.png" + +在 Scroll 上,你最喜欢的智能合约开发测试工具都可以正常使用。 + +由于 Scroll 是字节码层面的 EVM 等效,你只需将你的开发工具指向 Scroll Sepolia Testnet RPC Provider。 + +如果你遇到任何问题,请联系[我们的 Discord](https://discord.gg/scroll)。 + +## 获取测试网ETH + +在Scroll上构建之前,您需要一些测试代币。查看我们的 [水龙头](/user-guide/faucet) 页面,在Sepolia上获得 ETH 测试代币。 然后,使用我们的 [跨链桥](/user-guide/bridge) 将 ETH 测试代币桥接到 Scroll Sepolia 测试网(Layer 2)。 + +如需详细指引,可以从用​​户指南的[设置](/user-guide/setup) 页面开始。 + +## 网络配置 + +使用下表将您的以太坊工具配置到 Scroll Sepolia 测试网。 + +| 网络名称 | Scroll Sepolia 测试网 | Sepolia 测试网 | +| ------------------ | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| RPC URL | [https://sepolia-rpc.scroll.io/](https://sepolia-rpc.scroll.io/) | [https://eth-sepolia-public.unifra.io](https://eth-sepolia-public.unifra.io) | +| 链 ID | 534351 | 11155111 | +| 代币符号 | ETH | ETH | +| 区块链浏览器链接 | [https://sepolia-blockscout.scroll.io](https://sepolia-blockscout.scroll.io/) | [https://sepolia.etherscan.io](https://sepolia.etherscan.io) | + +## 配置工具 + + + +### Hardhat + +修改你的 Hardhat 配置文件 `hardhat.config.ts` 以指向 Scroll Sepolia 测试网公共 RPC. + +```jsx +... + +const config: HardhatUserConfig = { + ... + networks: { + scrollSepolia: { + url: "https://sepolia-rpc.scroll.io/" || "", + accounts: + process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], + }, + }, +}; + +... +``` + +### Foundry + +要使用 Scroll Sepolia 测试网公共 RPC, 运行: + +```bash +forge create ... --rpc-url=https://sepolia-rpc.scroll.io/ --legacy +``` + +### Remix Web IDE + +编译合约后,使用 Remix 进行部署的最简单方法是 [设置 Metamask](/user-guide/setup#metamask), 然后选择 **Scroll Sepolia 测试网** 。 + + + +现在,在“Deploy and Run Transactions”选项卡中,点击“Environment”下拉菜单并选择“Injected Provider - MetaMask”。 + + + +连接你的钱包并选择 Scroll Sepolia Testnet。Remix 中会自动选择帐户,然后你单击“部署”即可。 + +### Truffle + +假设你已经设置了 truffle 环境,请到 Truffle [配置文件](https://trufflesuite.com/docs/truffle/reference/configuration/),`truffle.js`,并确保已经安装了 HDWalletProvider: `npm install @truffle/hdwallet-provider@1.4.0` + +```js +const HDWalletProvider = require("@truffle/hdwallet-provider") +... +module.exports = { + networks: { + scrollSepolia: { + provider: () => + new HDWalletProvider(process.env.PRIVATE_KEY, "https://sepolia-rpc.scroll.io/"), + network_id: '*', + }, + } +} +``` + +### Brownie + +要添加 Scroll Sepolia 测试网,请运行以下命令: + +```bash +brownie networks add Ethereum scrollSepolia host=https://sepolia-rpc.scroll.io/ chainid=534351 +``` + +要将其设置为默认网络,请在项目配置文件中添加以下内容: + +```yaml +networks: + default: scrollSepolia +``` + +添加 Scroll Sepolia 测试网的另一种方法是创建一个 `yaml` 文件并运行命令来添加它。 + +这是一个名为 `network-config.yaml` 的 `yaml` 文件的示例 + +```yaml +live: +- name: Ethereum + networks: + - chainid: 534351 + explorer: https://sepolia-blockscout.scroll.io/ + host: https://sepolia-rpc.scroll.io + id: scrollSepolia + name: Scroll Sepolia Testnet +``` + +要将 Scroll Sepolia 测试网添加到网络列表,请运行以下命令: + +```bash +brownie networks import ./network-config.yaml +``` + +若要在Scroll上部署,请运行以下命令。在此示例中, `token.py` 是用于部署智能合约的脚本。将其替换为脚本的名称: + +```bash +brownie run token.py --network scrollSepolia +``` + +### ethers.js + +在`ethers`脚本中设置 Scroll Sepolia Testnet provider : + +```jsx +import { ethers } from "ethers" + +const provider = new ethers.providers.JsonRpcProvider("https://sepolia-rpc.scroll.io/") +``` + +### scaffold-eth + +要使用 Scaffold-eth 进行部署,你需要将 Hardhat 和 React 设置指向 Scroll Alpha 测试网。 Scroll Sepolia 测试网。 + +#### 配置Hardhat + +在`packages/hardhat/hardhat.config.js`文件中,你需要添加网络并选择其为默认网络。 + +```jsx +... +// +// Select the network you want to deploy to here: +// +const defaultNetwork = "scrollSepolia"; +... +module.exports = { +... + networks: { +... + scrollSepolia: { + url: "https://sepolia-rpc.scroll.io/", + accounts: { + mnemonic: mnemonic(), + }, + }, + } +... +} +``` + +确保为部署钱包提供了资金!运行 `yarn generate` 以创建钱包并 `yarn account` 检查其资金。资金到位后,运行 `yarn deploy --network scrollSepolia` 以在Scroll Sepolia测试网上部署。 + + + +#### 配置前端 + +要配置你的前端,你需要添加 Scroll Sepolia Testnet 作为网络,然后选择它为默认设置。 + +添加网络,请修改 `packages/react-app/src/constants.js` . + +```jsx +... +export const NETWORKS = { +... + scrollSepolia: { + name: "scrollSepolia", + color: "#e9d0b8", + chainId: 534351, + rpcUrl: "https://sepolia-rpc.scroll.io/", + blockExplorer: "https://sepolia-blockscout.scroll.io", + }, +... +} +``` + +接下来,修改 `packages/react-app/src/App.jsx` + +```jsx +... +/// 📡 What chain are your contracts deployed to? +const initialNetwork = NETWORKS.scrollSepolia; +... +``` diff --git a/src/content/docs/zh/developers/ethereum-and-scroll-differences.mdx b/src/content/docs/zh/developers/ethereum-and-scroll-differences.mdx new file mode 100644 index 000000000..1e1354dde --- /dev/null +++ b/src/content/docs/zh/developers/ethereum-and-scroll-differences.mdx @@ -0,0 +1,103 @@ +--- +section: developers +date: Last Modified +title: "以太坊和Scroll的区别" +lang: "zh" +permalink: "developers/ethereum-and-scroll-differences" +whatsnext: { "L1 和 L2 跨链": "/zh/developers/l1-and-l2-bridging/" } +excerpt: "There are a number of technical details that differ between Ethereum mainnet's EVM and Scroll's modified design for a zkEVM. Below you can see those differences as they exist now." +--- + +import Aside from "../../../../components/Aside.astro" + +以太坊主网的 EVM 和 Scroll 修改设计的 zkEVM 之间存在许多技术细节差异。你可以在如下看到现在存在的这些差异。 + +对于开源贡献者和基础设施开发者,请联系我们的团队以获得更多支持。 + + + +## EVM 操作码 + +| Opcode | Solidity equivalent | Scroll Behavior | +| --------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------- | +| `BLOCKHASH` | `block.blockhash` | 返回最新256个区块的 `keccak(chain_id \|\| block_number)` | +| `COINBASE` | `block.coinbase` | 返回预部署的费用合约地址,查看 [Scroll 合约](/developers/scroll-contracts) | +| `DIFFICULTY` / `PREVRANDAO` | `block.difficulty` | 返回 0 | +| `BASEFEE` | `block.basefee` | 禁用。[^eip1559] 如果引入该操作码,交易将被还原 | +| `SELFDESTRUCT` | `selfdestruct` | 禁用。如果引入该操作码,交易将被还原。[^willadpot] | + +[^eip1559]: 我们目前在 Scroll 上禁用了 EIP-1559。 +[^willadpot]: 我们未来会改用以太坊的方案。 + +## EVM 预编译合约 + +`SHA2-256` (地址: `0x2`), `RIPEMD-160` (地址: `0x3`), and `blake2f` (地址: `0x9`) 预编译合约目前不支持。 对这些预编译协定的调用将还被还原。我们计划在未来的硬分叉中启用这三个预编译。 + +`modexp` 预编译已经支持,但仅支持大小小于或等于 32 字节(即 u256 )的输入。 + +`ecPairing` 预编译已经支持, 但点(sets, pairs)的数量限制为 4,而不是 6。 + +其他 EVM 预编译均已支持: `ecRecover`, `identity`, `ecAdd`, `ecMul`. + +## State Account 对象 + +### **其他字段** + +我们将在当前`StateAccount`对象中添加两个字段:`PoseidonCodehash`和`CodeSize`。 + +```go +type StateAccount struct { + Nonce uint64 + Balance *big.Int + Root common.Hash // merkle root of the storage trie + KeccakCodeHash []byte // still the Keccak codehash + // added fields + PoseidonCodeHash []byte // the Poseidon codehash + CodeSize uint64 +} +``` + +### **CodeHash** + +与此相关,我们为每个合约字节码维护两种类型的代码哈希:Keccak 哈希和 Poseidon 哈希。 + +保留 `KeccakCodeHash` 是为了保持`EXTCODEHASH` 的兼容性,`PoseidonCodeHash`用于验证 zkEVM 中加载的字节码的正确性,因为Poseiden 哈希效率更高。 + +### **CodeSize** + +验证时 `EXTCODESIZE`,将整个合约数据加载到 zkEVM 中是代价很大。相反,我们在合约创建期间将合约大小存储在存储中。这样,我们就不需要加载代码——存储证明足以验证这个操作码。 + +## **Block Time** + +Sepolia 测试网的目标是恒定的 3 秒出块时间。这比理想情况下以太坊的 12 秒更短且更一致。 + +选择 3 秒的出块时间有两个原因: + +- 更快、更稳定的出块时间可以带来更快的反馈和更好的用户体验 +- 当我们优化测试网中的 zkEVM 电路时,即使我们保持每个区块或batch的较小的Gas上限时,我们仍然可以达到比以太坊更高的吞吐量。 + +## 未来的 EIPs + +我们将密切关注所有以太坊采用的新EIP,并将在合适的时候采用它们。如果你对更多细节感兴趣,请访问[我们的社区论坛](https://community.scroll.io)或[Discord](https://discord.gg/scroll)。 + +## EVM 目标版本 + +为了确保合约中不会发生意外行为,我们建议在编译智能合约时使用 `伦敦` 作为目标版本。 + +您可以更详细地阅读有关上海硬分叉与伦敦在以太坊[执行规范](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md)上的区别,以及新 `PUSH0` 指令如何影响[Solidity 编译器](https://blog.soliditylang.org/2023/05/10/solidity-0.8.20-release-announcement/).。 + +## 交易费用 + +Scroll Sepolia交易收取的费用包含两部分: + +- **L2 gas 费:** 与L1类似,L2 Gas费等于 to `L2_gas_price * L2_gas_used`,包括以下费用: + - L2 排序器执行和存储成本 + - L1 的有效性证明验证和最终确认成本 + - 证明器成本 +- **L1 数据费用:** 除 L2 gas费外的额外费用。L1 数据费用仅向 L2 发起的交易收取,不向 L1 发起的交易收取。该费用包括将数据发送到 L1 以获得数据可用性的成本。由于我们将 tx 数据汇总到 L1,因此 L1 汇总费用是根据 tx 数据的大小计算的。 + +有关更多信息,请参阅 [Scroll上的交易费用](/developers/transaction-fees-on-scroll). + +--- diff --git a/src/content/docs/zh/developers/guides/bridge-erc20-through-the-custom-gateway.mdx b/src/content/docs/zh/developers/guides/bridge-erc20-through-the-custom-gateway.mdx new file mode 100644 index 000000000..b597e9185 --- /dev/null +++ b/src/content/docs/zh/developers/guides/bridge-erc20-through-the-custom-gateway.mdx @@ -0,0 +1,354 @@ +--- +section: developers +date: Last Modified +title: "通过自定义 Gateway 跨链 ERC20" +lang: "zh" +permalink: "developers/guides/bridge-erc20-through-the-custom-gateway" +excerpt: "本指南将介绍如何通过自定义 Gateway 将 Scroll 的跨链桥用于需要自定义功能的 ERC20。" +--- + +import Aside from "../../../../../components/Aside.astro" + +本指南将介绍如何通过自定义 Gateway 将 Scroll 的跨链桥用于需要自定义功能的 ERC20。 + + + +## 第 1 步: 在 Sepolia 上发布一个代币 + +首先,我们需要一个代币来桥接。无需特定的 ERC20 实现即可使代币与 L2 兼容。如果您已有代币,请随时跳过此步骤。如果要部署新代币,请使用以下简单的 ERC20 代币合约,该代币合约在启动时向部署者铸造 100 万个代币。 + +```solidity +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.16; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +contract L1Token is ERC20 { + constructor() ERC20("My Token L1", "MTL1") { + _mint(msg.sender, 1_000_000 ether); + } +} +``` + +## 第 2 步: 在 Scroll Sepolia 测试网发布对应代币合约 + +接下来,您将在 Scroll 上发布此代币的对合约,该代币将代表 Sepolia 上的原始代币。此代币可以实现自定义逻辑以匹配 L1 代币的逻辑,甚至可以添加 L1 代币之外的其他功能。 + +为此,请执行以下操作: + +- 代币必须实现“IScrollStandardERC20”接口才能与跨链桥兼容。 +- 合约应有 `gateway()` 和 `counterpart()` 方法,可以提供 gateway 合约地址和对应的代币地址(我们刚刚发布的 L1 代币)。它还应该允许 L2 gateway在存入和提取代币事调用代币的 `mint()` 和 `burn()` 方法。 + +以下是与跨链桥兼容的代币的完整示例。对于构造函数,您将传递 Scroll 官方自定义 Gateway 地址 ( 0x058dec71E53079F9ED053F3a0bBca877F6f3eAcf ) 和在 Sepolia 上发布的代币地址。 + +```solidity +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.16; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@scroll-tech/contracts@0.1.0/libraries/token/IScrollERC20Extension.sol"; + +contract L2Token is ERC20, IScrollERC20Extension { + // We store the gateway and the L1 token address to provide the gateway() and counterpart() functions which are needed from the Scroll Standard ERC20 interface + address _gateway; + address _counterpart; + + // In the constructor we pass as parameter the Custom L2 Gateway and the L1 token address as parameters + constructor(address gateway_, address counterpart_) ERC20("My Token L2", "MTL2") { + _gateway = gateway_; + _counterpart = counterpart_; + } + + function gateway() public view returns (address) { + return _gateway; + } + + function counterpart() external view returns (address) { + return _counterpart; + } + + // We allow minting only to the Gateway so it can mint new tokens when bridged from L1 + function transferAndCall(address receiver, uint256 amount, bytes calldata data) external returns (bool success) { + transfer(receiver, amount); + data; + return true; + } + + // We allow minting only to the Gateway so it can mint new tokens when bridged from L1 + function mint(address _to, uint256 _amount) external onlyGateway { + _mint(_to, _amount); + } + + // Similarly to minting, the Gateway is able to burn tokens when bridged from L2 to L1 + function burn(address _from, uint256 _amount) external onlyGateway { + _burn(_from, _amount); + } + + modifier onlyGateway() { + require(gateway() == _msgSender(), "Ownable: caller is not the gateway"); + _; + } +} +``` + +## 第 3 步:将代币添加到 Scroll 跨链桥 + +您需要联系Scroll团队,将代币添加到 Sroll 上的 `L2CustomERC20Gateway` 合约和 L1 上的 `L1CustomERC20Gateway` 合约。此外,请按照[代币列表](https://github.com/scroll-tech/token-list) 仓库内的说明将您的代币添加到 Scroll 官方跨链桥前端. + + +## 第 4 步: 存储代币 + +一旦您的代币获得Scroll团队的批准,您应该能够从L1存入代币。为此,您必须首先批准 Sepolia 上的 `L1CustomGateway` 合约地址 ( `0x31C994F2017E71b82fd4D8118F140c81215bbb37` )。然后,通过从 `L1CustomGateway` 合约调用 `depositERC20` 方法来存入代币。这可以使用我们的[跨链桥UI](https://scroll.io/bridge),[Etherscan Sepolia](https://sepolia.etherscan.io/address/0x31C994F2017E71b82fd4D8118F140c81215bbb37#writeProxyContract)或智能合约来完成。 + +## Step 5: 提取代币 + +您将按照类似的步骤将代币从 L2 发送回 L1。首先,批准 `L2CustomGateway` 地址 ( `0x058dec71E53079F9ED053F3a0bBca877F6f3eAcf`),然后从 `L2CustomGateway` 合约中调用 `withdrawERC20` 提取代币。 + +## 替代方案: 发布并设置自定义的 L1 Gateway 合约 + +将您的代币添加到Scroll官方跨链桥(如上所述)是将代币与 Scroll 桥接的推荐方法。这种方法将使它们更容易被发现,对持有者来说更安全。但是,这需要Scroll团队的批准。如果您想在没有官方批准流程的情况下发布自定义代币,您可以自己发布自定义 Gateway合约。为此,您需要在 L1 上部署 `L1CustomERC20Gateway` 合约,在 L2 上部署 `L2CustomERC20Gateway` 合约。 + +### 发布 L1 自定义 Gateway 合约 + +让我们从在 Sepolia 上发布以下合约开始。 + +```solidity +// SPDX-License-Identifier: MIT + +// Although it's possible to use other Solidity versions, we recommend using version 0.8.16 because that's where our contracts were audited +pragma solidity =0.8.16; + +import "@openzeppelin/contracts/access/Ownable.sol"; + +import { IL2ERC20Gateway } from "@scroll-tech/contracts@0.1.0/L2/gateways/IL2ERC20Gateway.sol"; +import { IL1ScrollMessenger } from "@scroll-tech/contracts@0.1.0/L1/IL1ScrollMessenger.sol"; +import { IL1ERC20Gateway } from "@scroll-tech/contracts@0.1.0/L1/gateways/IL1ERC20Gateway.sol"; + +import { ScrollGatewayBase } from "@scroll-tech/contracts@0.1.0/libraries/gateway/ScrollGatewayBase.sol"; +import { L1ERC20Gateway } from "@scroll-tech/contracts@0.1.0/L1/gateways/L1ERC20Gateway.sol"; + +// This contract will be used to send and receive tokens from L2 +contract L1CustomERC20Gateway is L1ERC20Gateway, Ownable { + // Tokens must be mapped to "bind" them to a token that represents the original token on the original. This event will be emitted when the token mapping for ERC20 token is updated. + event UpdateTokenMapping(address indexed l1Token, address indexed oldL2Token, address indexed newL2Token); + + mapping(address => address) public tokenMapping; + + constructor() {} + + // This function must be called once after both the L1 and L2 contract was deployed + function initialize(address _counterpart, address _router, address _messenger) external { + require(_router != address(0), "zero router address"); + + ScrollGatewayBase._initialize(_counterpart, _router, _messenger); + } + + /// This function returns the address of the token on L2 + function getL2ERC20Address(address _l1Token) public view override returns (address) { + return tokenMapping[_l1Token]; + } + + // Updates the token mapping that "binds" a token with another one on the other chain + function updateTokenMapping(address _l1Token, address _l2Token) external onlyOwner { + require(_l2Token != address(0), "token address cannot be 0"); + + address _oldL2Token = tokenMapping[_l1Token]; + tokenMapping[_l1Token] = _l2Token; + + emit UpdateTokenMapping(_l1Token, _oldL2Token, _l2Token); + } + + // Callback called before a token is withdrawn on L1 + function _beforeFinalizeWithdrawERC20( + address _l1Token, + address _l2Token, + address, + address, + uint256, + bytes calldata + ) internal virtual override { + require(msg.value == 0, "nonzero msg.value"); + require(_l2Token != address(0), "token address cannot be 0"); + require(_l2Token == tokenMapping[_l1Token], "l2 token mismatch"); + } + + // Token bridged can be "canceled" or dropped. This callback is called before that happens. + function _beforeDropMessage(address, address, uint256) internal virtual override { + require(msg.value == 0, "nonzero msg.value"); + } + + // Internal function holding the deposit logic + function _deposit( + address _token, + address _to, + uint256 _amount, + bytes memory _data, + uint256 _gasLimit + ) internal virtual override nonReentrant { + address _l2Token = tokenMapping[_token]; + require(_l2Token != address(0), "no corresponding l2 token"); + + // 1. Transfer token into this contract. + address _from; + (_from, _amount, _data) = _transferERC20In(_token, _amount, _data); + + // 2. Generate message passed to L2CustomERC20Gateway. + bytes memory _message = abi.encodeCall( + IL2ERC20Gateway.finalizeDepositERC20, + (_token, _l2Token, _from, _to, _amount, _data) + ); + + // 3. Send message to L1ScrollMessenger. + IL1ScrollMessenger(messenger).sendMessage{ value: msg.value }(counterpart, 0, _message, _gasLimit, _from); + + emit DepositERC20(_token, _l2Token, _from, _to, _amount, _data); + } +} +``` + +### 发布 L2 自定义 Gateway 合约 + +现在让我们在 Scroll 上发布对应合约。 + +```solidity +// SPDX-License-Identifier: MIT + +pragma solidity =0.8.16; + +import "@openzeppelin/contracts/access/Ownable.sol"; + +import "@scroll-tech/contracts@0.1.0/L2/gateways/L2ERC20Gateway.sol"; +import { IL2ScrollMessenger } from "@scroll-tech/contracts@0.1.0/L2/IL2ScrollMessenger.sol"; +import { IL1ERC20Gateway } from "@scroll-tech/contracts@0.1.0/L1/gateways/IL1ERC20Gateway.sol"; +import { ScrollGatewayBase } from "@scroll-tech/contracts@0.1.0/libraries/gateway/ScrollGatewayBase.sol"; +import "@scroll-tech/contracts@0.1.0/libraries/token/IScrollERC20Extension.sol"; + +import { IL2ERC20Gateway } from "@scroll-tech/contracts@0.1.0/L2/gateways/IL2ERC20Gateway.sol"; + +// This contract will be used to send and receive tokens from L1 +contract L2CustomERC20Gateway is L2ERC20Gateway, ScrollGatewayBase, Ownable { + event UpdateTokenMapping(address indexed l2Token, address indexed oldL1Token, address indexed newL1Token); + + // solhint-disable-next-line var-name-mixedcase + mapping(address => address) public tokenMapping; + + constructor() {} + + // Like with the L1 version of the Gateway, this must be called once after both the L1 and L2 gateways are deployed + function initialize(address _counterpart, address _router, address _messenger) external { + require(_router != address(0), "zero router address"); + + ScrollGatewayBase._initialize(_counterpart, _router, _messenger); + } + + /// Returns the address of the token representing the token on L2 + function getL1ERC20Address(address _l2Token) external view override returns (address) { + return tokenMapping[_l2Token]; + } + + // This returns the L2 token address + function getL2ERC20Address(address) public pure override returns (address) { + revert("unimplemented"); + } + + // This function finalizes the token deposit on L2 when the deposit was not finalized due to not enough gas sent from L1 + function finalizeDepositERC20( + address _l1Token, + address _l2Token, + address _from, + address _to, + uint256 _amount, + bytes calldata _data + ) external payable override onlyCallByCounterpart nonReentrant { + require(msg.value == 0, "nonzero msg.value"); + require(_l1Token != address(0), "token address cannot be 0"); + require(_l1Token == tokenMapping[_l2Token], "l1 token mismatch"); + + IScrollERC20Extension(_l2Token).mint(_to, _amount); + + _doCallback(_to, _data); + + emit FinalizeDepositERC20(_l1Token, _l2Token, _from, _to, _amount, _data); + } + + // Same as in the L1 version of this contract, this function "binds" a token with a token on the other chain + function updateTokenMapping(address _l2Token, address _l1Token) external onlyOwner { + require(_l1Token != address(0), "token address cannot be 0"); + + address _oldL1Token = tokenMapping[_l2Token]; + tokenMapping[_l2Token] = _l1Token; + + emit UpdateTokenMapping(_l2Token, _oldL1Token, _l1Token); + } + + // Internal function holding the withdraw logic + function _withdraw( + address _token, + address _to, + uint256 _amount, + bytes memory _data, + uint256 _gasLimit + ) internal virtual override nonReentrant { + address _l1Token = tokenMapping[_token]; + require(_l1Token != address(0), "no corresponding l1 token"); + + require(_amount > 0, "withdraw zero amount"); + + // 1. Extract real sender if this call is from L2GatewayRouter. + address _from = msg.sender; + if (router == msg.sender) { + (_from, _data) = abi.decode(_data, (address, bytes)); + } + + // 2. Burn token. + IScrollERC20Extension(_token).burn(_from, _amount); + + // 3. Generate message passed to L1StandardERC20Gateway. + bytes memory _message = abi.encodeCall( + IL1ERC20Gateway.finalizeWithdrawERC20, + (_l1Token, _token, _from, _to, _amount, _data) + ); + + // 4. send message to L2ScrollMessenger + IL2ScrollMessenger(messenger).sendMessage{ value: msg.value }(counterpart, 0, _message, _gasLimit); + + emit WithdrawERC20(_l1Token, _token, _from, _to, _amount, _data); + } +} +``` + +### 在 Sepolia 上设置 Gateway 合约 + +部署合约后,调用以下函数初始化合约,并将其绑定到相应的代币和跨链桥另一端的 gateway 合约。 + +首先,使用以下参数调用 `MyL1Gateway` 合约上的 `initialize` 方法: + +- `_counterpart`: 我们刚刚在Scroll上发布的 `MyL2Gateway` 地址。 +- `_router`: 将其设置为 `0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a`,Sepolia 上的 `L1GatewayRouter` 合约。 +- `_messenger`: 将其设置为 `0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A`,Sepolia 上的 `L1ScrollMessenger` 合约。 + +自定义gateway可以托管多个代币跨链桥。在这种情况下,我们只允许通过使用以下参数调用 `MyL1Gateway` 合约上的` updateTokenMapping` 方案来桥接 L1Token 和 L2Token: + +- `_l1Token`: 我们之前在 Sepolia上 发布的 `L1Token` 合约地址。 +- `_l2Token`: 我们之前在 Scroll 上推出的 `L2Token` 合约地址。 + +### 在 Scroll 上设置 Gateway 合约 + +现在让我们切换到Scroll链,按照类似的步骤初始化 `MyL2Gateway` 合约。 + +首先,调用 `MyL2Gateway` 合约的 `initialize` 方法 : + +- `_counterpart`: 我们刚刚在Sepolia上发布的 `MyL1Gateway`地址。 +- `_router`: 将其设置为 `0x9aD3c5617eCAa556d6E166787A97081907171230`,Scroll 上的 `L2GatewayRouter` 合约。 +- `_messenger`: 将其设置为 `0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d`,Scroll 上的 `L2ScrollMessenger` 合约。 + +接下来,调用 `MyL2Gateway` 合约的 `updateTokenMapping` 方法: + +- `_l2Token`: 我们之前在 Scroll 上发布的 `L2Token` 合约地址 +- `_l1Token`: 我们之前在 Sepolia上 发布的 `L1Token` 合约地址。 + +### 桥接代币 + +我们现在可以调用 `MyL1Gateway` 合约的 `depositERC20`,`MyL2Gateway` 合约的 `withdrawERC20` ,就像Scroll官方跨链桥一样 \ No newline at end of file diff --git a/src/content/docs/zh/developers/guides/contract-deployment-tutorial.mdx b/src/content/docs/zh/developers/guides/contract-deployment-tutorial.mdx new file mode 100644 index 000000000..e1fdbd6f0 --- /dev/null +++ b/src/content/docs/zh/developers/guides/contract-deployment-tutorial.mdx @@ -0,0 +1,84 @@ +--- +section: developers +date: Last Modified +title: "合约部署教程" +lang: "zh" +permalink: "developers/guides/contract-deployment-tutorial" +excerpt: "The Scroll Sepolia Testnet allows the community to deploy smart contracts on Scroll. In this tutorial, we will teach you how to deploy a contract on Scroll Sepolia." +whatsnext: { "Scroll Messenger 跨链交互": "/developers/guides/scroll-messenger-cross-chain-interaction/" } +--- + +import Aside from "../../../../../components/Aside.astro" + +Scroll Sepolia测试网允许任何人在Scroll上部署智能合约。在本教程中,您将学习如何使用以太坊上开发的常用工具在 Scroll Sepolia 上部署合约。该[仓库](https://github.com/scroll-tech/scroll-guides/tree/main/contract-deploy-demo)展示了如何使用 [Hardhat](https://hardhat.org/) 和 [Foundry](https://github.com/foundry-rs/foundry) 进行合约部署。 + + + +## 使用 Hardhat 部署合约 + +1. 如果你还没有 Hardhat, 安装 [nodejs](https://nodejs.org/en/download/) 和 [yarn](https://classic.yarnpkg.com/lang/en/docs/install)。 +2. 克隆仓库并安装依赖项: + + ```shell + git clone https://github.com/scroll-tech/scroll-guides.git + cd scroll-guides/contract-deploy-demo + yarn install + ``` + +3. 按照根目录下`.env.example`的例子,创建 `.env`。 将`.env`中的 `PRIVATE_KEY` 更改为您自己的账户私钥。 + +4. 运行 `yarn compile` 以编译合约。 + +5. 运行 `yarn deploy:scrollTestnet` 在 Scroll Sepolia 测试网上部署合约。 + +6. 运行 `yarn test` 进行 hardhat 测试。 + +## 使用 Foundry 部署合约 + +1. 克隆仓库: + + ```shell + git clone https://github.com/scroll-tech/scroll-guides.git + cd scroll-guides/contract-deploy-demo + ``` + +2. 安装 Foundry: + + ```shell + curl -L https://foundry.paradigm.xyz | bash + foundryup + ``` + +3. 运行 `forge build` 来构建项目. + +4. 使用 Foundry 部署合约: + + ```bash + forge create --rpc-url https://sepolia-rpc.scroll.io/ \ + --value \ + --constructor-args \ + --private-key \ + --legacy \ + contracts/Lock.sol:Lock + ``` + + - `` 是锁定在合约中 `ETH` 测试代币。尝试将其设置为很小的数量,例如 `0.0000001ether`。 + - `` 是Unix时间戳,在此之后锁定在合约中的资金将可提取。尝试在将其设置为未来的某个 Unix 时间戳,例如 1696118400 (此 Unix 时间戳对应于 2023 年 10 月 1 日)。 + + 例如: + + ```bash + forge create --rpc-url https://sepolia-rpc.scroll.io/ \ + --value 0.00000000002ether \ + --constructor-args 1696118400 \ + --private-key 0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 \ + --legacy contracts/Lock.sol:Lock + ``` + +## 问题和反馈 + +感谢您参与并开发Scroll Sepolia测试网!如果您遇到任何问题,请加入我们的 [Discord](https://discord.gg/scroll) 并在 `#testnet-devs` 频道中询问我们。 diff --git a/src/content/docs/zh/developers/guides/estimating-gas-and-tx-fees.mdx b/src/content/docs/zh/developers/guides/estimating-gas-and-tx-fees.mdx new file mode 100644 index 000000000..68629e130 --- /dev/null +++ b/src/content/docs/zh/developers/guides/estimating-gas-and-tx-fees.mdx @@ -0,0 +1,227 @@ +--- +section: developers +date: Last Modified +title: "Estimating Gas and Tx Fees" +lang: "en" +permalink: "developers/guides/estimating-gas-and-transaction-fees" +excerpt: "Since Scroll is an L2 rollup, part of the transaction lifecycle is committing some data to L1 for security. To pay for this, all transaction incurs an additional fee called the L1 fee" +--- + +import Aside from "../../../../../components/Aside.astro" +import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import txFeesProjectStructure from "../../../../../assets/images/developers/txFeesProjectStructure.png" + +{/* TODO: Update for Sepolia, test and publish to sidebar. */} + +:::warning[This article is out of date.] +This page has not been updated and tested against the latest Scroll Sepolia release. Please use with caution. +::: + +Since Scroll is an L2 rollup, part of the transaction lifecycle is committing some data to L1 for security. To pay for this, all transaction incurs an additional fee called the _L1 fee_. + +In this guide, we will go over how to estimate the L1 fee on Scroll and calculate final transaction fee estimations through a hands-on code example you can find [here](https://github.com/scroll-tech/scroll-guides/tree/main/gas-estimation-demo). + +## The formula + +In short, the transaction fee on Scroll, at any given moment, can be calculated as + +``` +totalFee = (l2GasPrice * l2GasUsed) + l1Fee +``` + +An important distinction we need to make is that `l1Fee` is separated from the `l2Fee`. + +For a more comprehensive explanation and details on the formula, check the documentation on [how Transaction Fees work on Scroll](../developers/transaction-fees-on-scroll-l2/). + +## Interfacing with values + +To fetch these values and calculate the final fee, we’ll interact with Scroll’s public RPC and pre-deployed Smart Contract L1GasOracle.sol, which is deployed at [`TODO: 0x5300000000000000000000000000000000000002`](TODO: https://blockscout.scroll.io/address/0x5300000000000000000000000000000000000002) + +For our example codebase, we make a Hardhat project and fetch values using the [Ethers.js](https://docs.ethers.org/v6/) library. + +`l2GasUsed` - We get this using the [estimateGas](https://docs.ethers.org/v6/api/providers/#Provider-estimateGas) method, which queries our RPC with the TX data to get an estimate of the gas to be used. + +`l2GasPrice` - For this, we’ll use the [getFeeData](https://docs.ethers.org/v6/api/providers/#Provider-getFeeData) method, which will get the current market conditions on the L2 + +The Gas Oracle smart contract exposes multiple key fields we need to figure out the cost of the transaction. `overhead()` , `scalar()` , `l1BaseFee()` and `getL1GasUsed(bytes memory data)` + +But it also exposes the `getL1Fee(bytes memory data)` function, which abstracts all these complexities and allows us to get the fee in just one function call. + +## Hands-on example + +### Project structure + +First of all, let’s quickly go over the key folders inside our project structure. + +It’s a standard Hardhat project, but most of our work is inside the c*ontracts* and _scripts_ folders. + + + + + +### The smart contract + +First, we need a Smart Contract to interact with to showcase the gas estimation. For that, we’ll create a `ExampleContract.sol`. + +```solidity +pragma solidity ^0.8.17; + +contract ExampleContract { + uint public exampleVariable; + + function setExampleVariable(uint _exampleVariable) external { + exampleVariable = _exampleVariable; + } +} +``` + + + +Once deployed, we fill the `EXAMPLE_CONTRACT_ADDRESS` value in our `.env` file. For the example project, it’s already deployed at `TODO: 0xc37ee92c73753B46eB865Ee156d89741ad0a8777` and pre-filled, so nothing has to be done here. + +### Estimating the fees + +The central part of the example lives in the `/scripts/gasEstimation.ts` file. + +We’ll do just four things: + +1. Create a dummy transaction using the ExampleContract +2. Estimate the L2 fee of that transaction +3. Estimate the L1 fee of that transaction +4. Emit an actual transaction to Scroll and compare the values + +#### Creating the dummy transaction + +The goal of this step is to create an **(RLP) Serialized Unsigned Transaction** to be used later on as the parameter for calling the oracle gas estimation method. + +1. Let’s populate our transaction with the needed values to estimate its cost by calling `buildPopulatedExampleContractTransaction`. This will fill the `data`, `to`, `gasPrice`, `type` and `gasLimit` fields: + +```typescript +export async function buildPopulatedExampleContractTransaction( + exampleContractAddress: string, + newValueToSet: number +): Promise { + const exampleContract = await ethers.getContractAt("ExampleContract", exampleContractAddress) + + return exampleContract.setExampleVariable.populateTransaction(newValueToSet) +} +``` + +2. Now, let’s trim it down to the basic fields using `buildUnsignedTransaction`. We won’t be signing it. + +```typescript +export async function buildUnsignedTransaction(signer: HardhatEthersSigner, populatedTransaction: ContractTransaction): Promise { + const nonce = await signer.getNonce(); + + return { + data: populatedTransaction.data, + to: populatedTransaction.to, + gasPrice: populatedTransaction.gasPrice, + type: populatedTransaction.type, + gasLimit: populatedTransaction.gasLimit, + nonce, + }; +``` + + + +3. With the output of the previous function, we serialize it using `getSerializedTransaction` + +```typescript +export function getSerializedTransaction(tx: UnsignedTransaction) { + return serialize(tx) +} +``` + +#### Estimating the L2 fee + +This step is pretty standard and the same as on Ethereum. We’ll use the `estimateL2Fee` function which takes the populated transaction as an input and returns an estimate of the total gas it will use by multiplying the current gas price and gas needed to be used. + +```typescript +export async function estimateL2Fee(tx: ContractTransaction): Promise { + const gasToUse = await ethers.provider.estimateGas(tx) + const feeData = await ethers.provider.getFeeData() + const gasPrice = feeData.gasPrice + + return gasToUse * gasPrice +} +``` + +#### Estimating the L1 fee of that transaction + +This step is very straightforward. Using the output of the `getSerializedTransaction` function, we query the oracle and get the estimated fee in return. + +```typescript +export async function estimateL1Fee( + gasOraclePrecompileAddress: string, + unsignedSerializedTransaction: string +): Promise { + const l1GasOracle = await ethers.getContractAt("IL1GasPriceOracle", gasOraclePrecompileAddress) + + return l1GasOracle.getL1Fee(unsignedSerializedTransaction) +} +``` + +#### Emitting the transaction and comparing estimated vs actual values + +**Emitting the transaction** + +We’ll create a call to our contract using the same values used for the dummy transaction. + +```typescript +const tx = await exampleContract.setExampleVariable(newValueToSetOnExampleContract) +const txReceipt = await tx.wait(5) +``` + +**Calculating the L2 fee** + +Using the transaction receipt we can see the amount of gas used by the transaction + +```typescript +const l2Fee = txReceipt.gasUsed * txReceipt.gasPrice +``` + +**Getting the amount used to pay for the L1 fee** + +To do this, we’ll compare the _balance of the account before_ the transaction execution, the _account balance after_ the execution and then subtract the L2 fee. + +```typescript +const totalFee = signerBalanceBefore - signerBalanceAfter +const l1Fee = totalFee - l2Fee +``` + +**Comparing the values** + +Fee markets are constantly moving and unpredictable. Since the values estimated may differ from the actual execution, let’s check how much they differ. + +We can run all the code that we previously wrote by typing `yarn gas:estimate` command in our [project](https://github.com/scroll-tech/scroll-guides/tree/main/gas-estimation-demo) that will run the [`gasEstimation.ts`](https://github.com/scroll-tech/scroll-guides/blob/main/gas-estimation-demo/scripts/gasEstimation.ts) script and give us the output below: + +```bash +Estimated L1 fee (wei): 208705598167252 +Estimated L2 fee (wei): 26416000000 +Estimated total fee (wei): 208732014167252 + +Actual L1 fee (wei): 210830909757550 +Actual L2 fee (wei): 26416000000 +Actual total fee (wei): 210857325757550 + +(actual fee - estimated fee) +Difference L1 fee (wei): 2125311590298 (1.0183299389002531%) +Difference L2 fee (wei): 0 (0%) +Difference total fee (wei): 2125311590298 (1.0182010645453987%) +``` + +We can see above that the estimated values (in wei) differ by around 1%, but keep in mind that during spikes in gas prices, this difference may increase. Be sure to account for this in your front end for users! + + diff --git a/src/content/docs/zh/developers/guides/scroll-messenger-cross-chain-interaction.mdx b/src/content/docs/zh/developers/guides/scroll-messenger-cross-chain-interaction.mdx new file mode 100644 index 000000000..25ec140cc --- /dev/null +++ b/src/content/docs/zh/developers/guides/scroll-messenger-cross-chain-interaction.mdx @@ -0,0 +1,114 @@ +--- +section: developers +date: Last Modified +title: "Scroll Messenger 跨链交互" +lang: "zh" +permalink: "developers/guides/scroll-messenger-cross-chain-interaction" +whatsnext: { "通过自定义 Gateway 跨链 ERC20": "/developers/guides/bridge-erc20-through-the-custom-gateway" } +excerpt: "In this example, we will launch a dummy smart contract on either Sepolia or Scroll Sepolia testnet and interact with it from the opposite chain." +--- + +import Aside from "../../../../../components/Aside.astro" + +在这个例子中,我们将在 Sepolia 和 Scroll Sepolia 上启动一个虚拟智能合约,并从对方的链上与之交互。我们将使用同时部署在 Sepolia 和 Scroll Sepolia 上的 `ScrollMessenger` 合约。 + +## 部署合约 + +### 目标智能合约 + +让我们从部署目标智能合约开始。在本例中,我们将使用 Greeter 合约。 +但你也可以使用任何其他合约,将其部署到 Sepolia 或 Scroll。 +在 Scroll 上,L1 和 L2 使用相同的 API,一切取决于您。 + +```solidity +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.16; + +// This Greeter contract will be interacted with through the ScrollMessenger across the bridge +contract Greeter { + string public greeting = "Hello World!"; + + // This function will be called by executeFunctionCrosschain on the Operator Smart Contract + function setGreeting(string memory greeting_) public { + greeting = greeting_; + } +} +``` + +我们现在将以跨链方式执行`setGreeting`方法。 + +### 操作方智能合约 + +切换到另一条链并部署`GreeterOperator`。因此,如果在 L1 上部署 `Greeter` 合约,请在 L2 上部署 `GreeterOperator`,反之亦然。 + +```solidity +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.16; + +// The Scroll Messenger interface is the same on both L1 and L2, it allows sending cross-chain transactions +// Let's import it directly from the Scroll Contracts library +import "@scroll-tech/contracts@0.1.0/libraries/IScrollMessenger.sol"; + +// The GreeterOperator is capable of executing the Greeter function through the bridge +contract GreeterOperator { + // This function will execute setGreeting on the Greeter contract + function executeFunctionCrosschain( + address scrollMessengerAddress, + address targetAddress, + uint256 value, + string memory greeting, + uint32 gasLimit + ) public payable { + IScrollMessenger scrollMessenger = IScrollMessenger(scrollMessengerAddress); + // sendMessage is able to execute any function by encoding the abi using the encodeWithSignature function + scrollMessenger.sendMessage{ value: msg.value }( + targetAddress, + value, + abi.encodeWithSignature("setGreeting(string)", greeting), + gasLimit, + msg.sender + ); + } +} +``` + +## 调用跨链方法 + +我们通过执行 `executeFunctionCrosschain` 并传入以下参数来传递消息: + +- `scrollMessengerAddress`: 这将取决于您部署 `GreeterOperator` 合约的位置。 + - 如果您部署在 Sepolia 上请使用 `0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A`。如果您部署在 Scroll 上请使用 `0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d`。 +- `targetAddress`: `Greeter` 合约在对方链上的地址。 +- `value`: 在此示例中,是 `0` ,因为 `setGreeting` 不是付款方法。 +- `greeting`: 这是将通过消息传递的参数,尝试传入 `“This message was crosschain!”` +- `gasLimit`: + - 如果要将消息从 L1 发送到 L2,约 1000000 的 gas 上限应该足够了。话虽如此,如果您设置得太高,并且 `msg.value` 不足以支付 `gasLimit` * `baseFee`,交易将回滚。如果 `msg.value` 大于 gas 费用,多余的部分将被退还。 + - 如果要将消息从 L2 发送到 L1,请传递 0 ,因为交易通过在 L1 上执行其他交易来最终确认。 + +### 从 L2 向 L1 中继消息 + +当交易从 L2 传递至 L1 时,必须在 L1 上发送额外的“执行提款交易”。为此,您必须从EOA钱包调用 L1 上 Scroll Messenger合约的 `relayMessageWithProof `方法。 + +您可以直接在 [Etherscan Sepolia](https://sepolia.etherscan.io/address/0x50c7d3e7f7c656493d1d76aaa1a836cedfcbb16a#writeProxyContract#F3) 上执行此操作。为此,您需要为桥接交易和其他参数传递默克尔树包含证明。您可以使用 Scroll 跨链桥 API 查询这些内容。 + +{/* TODO: finish looking into API issues */} + +我们正在确定最终 API 的细节,现在,可以通过端点获取: + +```bash +curl "https://sepolia-api-bridge.scroll.io/api/claimable?page_size=10&page=1&address=GREETER_OPERATOR_ADDRESS_ON_L2" +``` + +将 `GREETER_OPERATOR_ADDRESS_ON_L2` 替换为您在L2上发布的 GreeterOperator 合约地址。阅读更多关于执行提款交易的信息,请参阅 [Scroll Messenger](/developers/l1-and-l2-bridging/the-scroll-messenger)文章。 + + + + + +在 L1 和 L2 上执行并确认交易后, `Greeter` 合约 `greeting` 的新状态应为 `“This message was crosschain!”` 。从一个链向另一个链发送消息,最后在源链上确认交易后,大约需要 20 分钟。 + +恭喜,您现在使用我们的原生跨链桥执行了从一条链到另一条链的交易! \ No newline at end of file diff --git a/src/content/docs/zh/developers/index.mdx b/src/content/docs/zh/developers/index.mdx new file mode 100644 index 000000000..b6eff7795 --- /dev/null +++ b/src/content/docs/zh/developers/index.mdx @@ -0,0 +1,76 @@ +--- +section: developers +date: Last Modified +title: "在Scroll上开发" +lang: "zh" +permalink: "developers/" +excerpt: "Building on Scroll feels just like Ethereum, and you can bring your favorite tooling and contracts with you." +whatsnext: { "开发者快速入门": "/zh/developers/developer-quickstart" } +--- + +import Aside from "../../../../components/Aside.astro" +import ToggleElement from "../../../../components/ToggleElement.astro" + +**欢迎来到 Scroll 开发者文档!** + +Scroll 是构建在Ethereum上的Layer 2 网络 (更准确的说, 是一个 “zk rollup”). + +如果你有在以太坊上的开发经验,那你的代码、依赖项和工具都可以在Scroll上开箱即用。因为我们的网络与 EVM 字节码兼容,并且设计得就像在以太坊上开发一样,让这一切变得可能。 + + + +## 开始 + +**想要在 Scroll Sepolia 测试网上进行构建?** + +- 有关基础知识:查看[开发者快速入门](/developers/developer-quickstart) +- 有关在 Scroll 上部署第一个智能合约的教程,请阅读我们的 [合约部署教程](/developers/guides/contract-deployment-tutorial) +- 我们还有许多[已部署的合约地址](/developers/scroll-contracts)可供构建。 + +## 为什么在 Scroll 上开发? + + +
吞吐量 —— Scroll 为以太坊创造了更多的安全区块空间。
+

+ ZK Rollups 允许网络容纳更多交易,从而最大限度地减少链上拥堵。Scroll 通过使用零知识证明验证网络状态转换,继承了以太坊的安全性,可以在不影响去中心化的情况下处理更多交易。 +

+
+ + +
成本 —— Scroll 为用户节省 gas 费用。
+

+ 在以太坊上,对区块空间的竞争导致每笔交易的成本更高,因为每笔交易都会竞价以包含在下一个区块中。Scroll 利用最近在零知识证明和硬件加速方面取得的突破,极大地增加了安全区块空间并最大限度地降低了用户的交易成本。 +

+
+ +
速度 —— Scroll 更快地向用户提供反馈。
+

+ 合并后,以太坊每 12 秒确认一个区块。Scroll的区块每 3 秒生成一个,并且为了降低风险操作,交易一旦包含在块中就可以被认为是最终确认的。这为社交和游戏应用程序中的链上交互打开了新的可能性。 +

+
+ +
联盟——Scroll 建立在以太坊的愿景之上。
+

+ Scroll 构建在以太坊的愿景之上。我们的宗旨是共建以太坊,而不是分裂它。去中心化、无需许可、抗审查和归属社区是我们工作和正在构建的路线图的核心。我们秉承开源精神,与以太坊基金会的隐私和扩容探索团队(PSE)密切合作,以支持他们在 zkEVM 上的工作,而zkEVM有朝一日可能会成为以太坊的核心。 +

+

+ 我们还与治理 DAOs 和其他开源协议合作,以确保在部署应用程序的同时,我们也在努力扩大它们的影响——无论是在公共产品、核心基础设施还是下一代零知识用例中。 +

+
+ +
社区——Scroll 将用户和开发者聚集在一起。
+

+ 我们知道在主网发布之前进行开源开发并获得用户参与的挑战!Scroll 拥有一个蓬勃发展的用户和开发者社区,并且拥有超过 100,000 名渴望在我们的测试网上试用应用程序的 Discord 社区,我们很高兴将开发者与可以提供真实世界反馈的用户联系起来。 +

+
+ +## 感谢你与我们一起构建开发 + +我们正在努力为网络带来更多的集成和支持更多的基础设施,并为我们未来的主网版本感到兴奋。 + +快来加入我们不断壮大的开发者社区。您可以在[Discord](https://discord.gg/scroll)上找到我们,加入我们的[论坛](https://community.scroll.io/)或在[Twitter](https://twitter.com/Scroll_ZKP)关注我们的进展。 \ No newline at end of file diff --git a/src/content/docs/zh/developers/l1-and-l2-bridging.mdx b/src/content/docs/zh/developers/l1-and-l2-bridging.mdx new file mode 100644 index 000000000..315aeb19b --- /dev/null +++ b/src/content/docs/zh/developers/l1-and-l2-bridging.mdx @@ -0,0 +1,35 @@ +--- +section: developers +date: Last Modified +title: "L1 和 L2 跨链" +lang: "zh" +permalink: "developers/l1-and-l2-bridging" +whatsnext: { "ETH 和 ERC20 代币跨链桥": "/zh/developers/l1-and-l2-bridging/eth-and-erc20-token-bridge/" } +excerpt: "Scroll 跨链桥架构概览" +--- + +import ClickToZoom from "../../../../components/ClickToZoom.astro" +import L1GatewayWHITE from "../../../../assets/images/developers/L1GatewayWHITE.png" +import withdrawWHITE from "../../../../assets/images/developers/withdrawWHITE.png" + +Scroll跨链桥可以在 L1 和 L2 之间传输 ETH、ERC20 代币、NFT 和任意消息。它充当 L1 和 L2 间移动各种数字资产的安全机制。 + +为了方便ETH和ERC20代币的转移,Scroll跨链桥利用 Gateway Router合约,其确保这些资产在L1和L2之间顺利通过,允许用户无缝转移其基于以太坊的代币。 + +ERC721 和 ERC1155 Gateway合约支持在两个网络之间转移非同质化资产,允许用户在 L1 和 L2 之间移动他们的 NFT。 + +除了代币转移之外,Scroll Messenger合约还支持跨链合约交互。这意味着一个网络上的合约可以通过 Scroll Messenger 合约与另一个网络上的合约进行交互。此功能扩展了去中心化应用程序和智能合约在两个网络中无缝运行的可能性。 + +## L1 Gateway 架构 + + + +从用户到Scroll跨链桥有许多入口点。这将取决于你想做什么以及你想怎么做。如果要发送 ETH 或 ERC20 代币,则应使用 GatewayRouter .如果要发送 NFT,则应使用 L1ERC721Gateway 或 L1ERC1155Gateway .如果要发送任意数据,则应使用 L1ScrollMessenger .所有Gateway转账都使用Scroll Messenger 跨链发送资产,其工作是将交易附加到消息队列以纳入 L2 。 + +## L2 Gateway 架构 + + + +至于无需许可调用的入口点,L2 Gateway架构与L1非常相似。不同之处在于,当从 L2 发送消息时,调用 `appendMessage` 函数会将消息存储在仅支持增加的默克尔二叉树 `L2MessageQueue`(又名提款树)中。当一条新消息被发送到`L2MessageQueue`时,中继器将检测到它并将其存储在数据库中。当区块被最终确认时,它将生成新的默克尔路径的证明,并将其传递给L1geth节点执行 `L1ScrollMessenger `。所有最终的提款根都将存储在rollup合同中,以便我们可以验证关于它们的证明。在Scroll下一个版本中,将不需要中继器,因为所有用户都可以在L1上完成交易。 + +在接下来的部分中,我们将探讨跨链桥的技术方面,包括其功能所需的智能合约API。开发者指南部分提供了带有代码示例的详细指南,以帮助开发者和用户理解和实现这些功能。 diff --git a/src/content/docs/zh/developers/l1-and-l2-bridging/enforced-transactions.mdx b/src/content/docs/zh/developers/l1-and-l2-bridging/enforced-transactions.mdx new file mode 100644 index 000000000..21e2bc15e --- /dev/null +++ b/src/content/docs/zh/developers/l1-and-l2-bridging/enforced-transactions.mdx @@ -0,0 +1,57 @@ +--- +section: developers +date: Last Modified +title: "Enforced transactions" +lang: "en" +permalink: "developers/l1-and-l2-bridging/enforced-transactions" +excerpt: "The Enforced Transaction contract enables sending transactions between L1 and L2 the sendTransaction function." +--- + +import Aside from "../../../../../components/Aside.astro" + +The Enforced Transaction contract enables sending transactions between L1 and L2 the **`sendTransaction`** function. This contract shares similarities with the Scroll Messenger contract as it allows sending arbitrary data from one layer to the other. However, it distinguishes itself by enabling the relaying of signed transactions and the ability to set the sender (CALLER or msg.sender) on the receiving transaction on Scroll. + +## Enforced Transactions API + +Please visit the [npm library](https://www.npmjs.com/package/@scroll-tech/contracts?activeTab=code) for the complete Scroll contract API documentation. + +### sendTransaction + +```solidity +function sendTransaction(address _target, uint256 _value, uint256 _gasLimit, bytes calldata _data) public payable; +``` + +Add an enforced transaction to L2 from an EOA account sender. + +| Parameter | Description | +| ---------- | ---------------------------------------------------------- | +| \_target | The address of target contract to call in L2. | +| \_value | The value passed. | +| \_gasLimit | The maximum gas should be used for this transaction in L2. | +| \_data | The calldata passed to target contract. | + +### sendTransaction + +```solidity +function sendTransaction( + address _sender, + address _target, + uint256 _value, + uint256 _gasLimit, + bytes calldata _data, + bytes memory _signature, + address _refundAddress +) public payable; +``` + +Add an enforced transaction to L2 by relaying a signature from the sender. + +| Parameter | Description | +| --------------- | --------------------------------------------------------------- | +| \_sender | The address of sender who will initiate this transaction in L2. | +| \_target | The address of target contract to call in L2. | +| \_value | The value passed | +| \_gasLimit | The maximum gas should be used for this transaction in L2. | +| \_data | The calldata passed to target contract. | +| \_signature | The signature for the transaction. | +| \_refundAddress | The address to refund exceeded fee. | diff --git a/src/content/docs/zh/developers/l1-and-l2-bridging/erc1155-token-bridge.mdx b/src/content/docs/zh/developers/l1-and-l2-bridging/erc1155-token-bridge.mdx new file mode 100644 index 000000000..6e418befa --- /dev/null +++ b/src/content/docs/zh/developers/l1-and-l2-bridging/erc1155-token-bridge.mdx @@ -0,0 +1,156 @@ +--- +section: developers +date: Last Modified +title: "ERC1155 代币跨链桥" +lang: "zh" +permalink: "developers/l1-and-l2-bridging/erc1155-token-bridge" +whatsnext: { "The Scroll Messenger": "/zh/developers/l1-and-l2-bridging/the-scroll-messenger/" } +excerpt: "ERC1155 bridging from L1 to L2 is done via the L1ERC1155Gateway." +--- + +import Aside from "../../../../../components/Aside.astro" + +## 从 L1 存款 ERC1155 代币 + +从 L1 到 L2 的ERC1155桥接是通过 `L1ERC1155Gateway` 合约完成的。与ERC721桥接类似,我们不使用路由器,而是直接使用 `Gateway` 合约上的 `depositERC1155` 方法。 + + + +### 在 L2 上创建 ERC1155 代币 + +与ERC721桥接类似,为了桥接ERC1155代币,必须分别在L1和L2上的 `L1ERC1155Gateway` 和 `L2ERC1155Gateway` 发布和映射与 `IScrollERC1155` 标准兼容的合约。该合约必须授予L2上的 Gateway 合约在存入代币时铸造,在代币提取时销毁的权限。 + +以下是与 L2 兼容的 `L2ERC1155Gateway` ERC115 代币所需的 `IScrollERC1155` 接口 + +```solidity +interface IScrollERC1155 { + /// @notice Return the address of Gateway the token belongs to. + function gateway() external view returns (address); + + /// @notice Return the address of counterpart token. + function counterpart() external view returns (address); + + /// @notice Mint some token to recipient's account. + /// @dev Gateway Utilities, only gateway contract can call + /// @param _to The address of recipient. + /// @param _tokenId The token id to mint. + /// @param _amount The amount of token to mint. + /// @param _data The data passed to recipient + function mint(address _to, uint256 _tokenId, uint256 _amount, bytes memory _data) external; + + /// @notice Burn some token from account. + /// @dev Gateway Utilities, only gateway contract can call + /// @param _from The address of account to burn token. + /// @param _tokenId The token id to burn. + /// @param _amount The amount of token to burn. + function burn(address _from, uint256 _tokenId, uint256 _amount) external; + + /// @notice Batch mint some token to recipient's account. + /// @dev Gateway Utilities, only gateway contract can call + /// @param _to The address of recipient. + /// @param _tokenIds The token id to mint. + /// @param _amounts The list of corresponding amount of token to mint. + /// @param _data The data passed to recipient + function batchMint( + address _to, + uint256[] calldata _tokenIds, + uint256[] calldata _amounts, + bytes calldata _data + ) external; + + /// @notice Batch burn some token from account. + /// @dev Gateway Utilities, only gateway contract can call + /// @param _from The address of account to burn token. + /// @param _tokenIds The list of token ids to burn. + /// @param _amounts The list of corresponding amount of token to burn. + function batchBurn(address _from, uint256[] calldata _tokenIds, uint256[] calldata _amounts) external; +} +``` + +### 将ERC1155代币添加到Scroll跨链桥 + +所有资产都可以通过任何开发者部署的Gateway合约安全且无需许可地桥接。但是,Scroll还管理着 ERC1155 Gateway合约,欢迎社区创建的所有 NFTs。成为 Scroll 托管网关的一部分意味着无需部署 Gateway 合约,代币将显示在 Scroll 前端中。要成为Scroll Gateway的一部分,您必须联系 Scroll 团队,将 NFT 添加到 L1 和 L2 Gateway 合约中。为此,请按照[代币列表](https://github.com/scroll-tech/token-list) 仓库内的说明将新代币添加到Scroll官方前端。 + +## 从 L2 提取 ERC1155 代币 + +`L2ERC1155Gateway` 合约用于将代币从 L2 发送到 L1。在桥接之前,合约必须得到代币 `L2ERC1155Gateway` 合约的批准。完成此操作后, `withdrawERC1155` 可以调用以执行资产桥接。 + + + + + +## L1ERC1155Gateway API + +请访问 [npm 库](https://www.npmjs.com/package/@scroll-tech/contracts?activeTab=code) 来获取完整的 Scroll 合约 API 文档。 + +### depositERC1155 + +```solidity +function depositERC1155( + address _token, + address _to, + uint256 _tokenId, + uint256 _amount, + uint256 _gasLimit +) external payable; +``` + +将 L1 的ERC1155代币存入 L2 上的收款人账户。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------- | +| token | L1 上ERC1155代币合约的地址 | +| to | L2 上收款人账户的地址 | +| tokenId | 要存入的 NFT ID | +| amount | 要存入的代币数量 | +| gasLimit | 在L2上完成存款所需的gas上限,未使用的部分将会退回 | + +### updateTokenMapping + +```solidity +function updateTokenMapping(address _l1Token, address _l2Token) external; +``` + +更新将ERC1155代币合约从 L1 到 L2 的映射。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------- | +| \_l1Token | L1 中ERC1155代币的地址。 | +| \_l2Token | L2 中对应ERC1155代币的地址 | + +## L2ERC1155Gateway API + +### withdrawERC1155 + +```solidity +function withdrawERC1155(address token, address to, uint256 tokenId, uint256 amount, uint256 gasLimit) external payable; +``` + +将ERC1155代币从 L2 发送到 L1 上的收款人账户。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------------------------------ | +| token | L2上ERC1155代币合约的地址 | +| to | L1 上收款人账户的地址 | +| tokenId | 要提取的 NFT ID | +| amount | 要提取的代币数量 | +| gasLimit | 未使用,但出于潜在的向前兼容性考虑而包括在内 | + +### updateTokenMapping + +```solidity +function updateTokenMapping(address _l1Token, address _l2Token) external; +``` + +更新将ERC1155代币合约从 L2 到 L1 的映射。 + +| Parameter | Description | +| --------- | ------------------------------------------------- | +| \_l1Token | L1 中ERC1155代币的地址 | +| \_l2Token | L2 中对应ERC1155代币的地址 | diff --git a/src/content/docs/zh/developers/l1-and-l2-bridging/erc721-nft-bridge.mdx b/src/content/docs/zh/developers/l1-and-l2-bridging/erc721-nft-bridge.mdx new file mode 100644 index 000000000..37d2bb90a --- /dev/null +++ b/src/content/docs/zh/developers/l1-and-l2-bridging/erc721-nft-bridge.mdx @@ -0,0 +1,126 @@ +--- +section: developers +date: Last Modified +title: "ERC721 NFT 跨链桥" +lang: "zh" +permalink: "developers/l1-and-l2-bridging/erc721-nft-bridge" +excerpt: "NFT bridging from L1 to L2 is done via the L1ERC721Gateway contract instead of using a router." +whatsnext: { "ERC1155 代币跨链桥": "/zh/developers/l1-and-l2-bridging/erc1155-token-bridge/" } +--- + +import Aside from "../../../../../components/Aside.astro" + +## 从 L1 存款 ERC721 代币 + +从 L1 到 L2 的 NFT 跨链是通过 `L1ERC721Gateway` 合约而不是使用路由器完成的。与桥接 ERC20 代币类似,我们使用 `depositERC721` 方法将代币发送到 L2,稍后可以使用部署在L2 上的 `L2ERC721Gateway` 合约使用 `withdrawERC721` 方法提取回 L1。 + +L1 和 L2 上的 NFT 合约必须通过启动和连接 Gateway 才能实现桥接。这意味着,如果 L1 或 L2 上的合约丢失或未通过 `updateTokenMapping` 映射,存款和取款交易将回退。 + + + +### 在 L2 上创建 ScrollERC721 代币 + +要将ERC721代币存入L2,并分别在L1和L2上的 `L2ERC721Gateway` 和 `L1ERC721Gateway` 合约完成发布和映射与 `IScrollERC721` 标准兼容的代币合约。该合约必须授予L2的Gateway在存入代币时铸造,和在代币提取时销毁的权限。 + +以下是与 L2 兼容的 `L2ERC721Gateway` ERC721 代币所需的 `IScrollERC721` 接口 + +```solidity +interface IScrollERC721 { + /// @notice Return the address of Gateway the token belongs to. + function gateway() external view returns (address); + + /// @notice Return the address of counterpart token. + function counterpart() external view returns (address); + + /// @notice Mint some token to recipient's account. + /// @dev Gateway Utilities, only gateway contract can call + /// @param _to The address of recipient. + /// @param _tokenId The token id to mint. + function mint(address _to, uint256 _tokenId) external; + + /// @notice Burn some token from account. + /// @dev Gateway Utilities, only gateway contract can call + /// @param _tokenId The token id to burn. + function burn(uint256 _tokenId) external; +} +``` + +### 将 ERC721 NFT 添加 Scroll 跨链桥 + +所有资产都可以通过任何开发者部署的Gateway合约安全且无需许可地桥接。但是,Scroll还管理着 ERC721 Gateway合约,欢迎社区创建的所有 NFTs。成为 Scroll 托管网关的一部分意味着无需部署 Gateway 合约,代币将显示在 Scroll 前端中。要成为Scroll Gateway的一部分,您必须联系 Scroll 团队,将 NFT 添加到 L1 和 L2 Gateway 合约中。为此,请按照[代币列表](https://github.com/scroll-tech/token-list) 仓库内的说明将新代币添加到Scroll官方前端。 + +## 从 Scroll 中提取 ERC721 代币 + +合约 `L2ERC721Gateway` 用于将代币从 L2 发送到 L1。在桥接之前, `L2ERC721Gateway` 合约必须得到 NFT 合约的批准。完成此操作后, `withdrawERC721` 可以调用以执行资产桥接。 + + + + + +## L1ERC721Gateway API + +请访问 [npm 库](https://www.npmjs.com/package/@scroll-tech/contracts?activeTab=code) 来获取完整的 Scroll 合约 API 文档。 + +### depositERC721 + +```solidity +function depositERC721(address _token, address _to, uint256 _tokenId, uint256 _gasLimit) external payable; +``` + +将 ERC721 NFT 从 L1 存入收款人在 L2 上的账户。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------- | +| token | L1 上 ERC721 NFT 合约的地址 | +| to | L2 上收款人账户的地址 | +| tokenId | 存入的 NFT ID | +| gasLimit | 在L2上完成存款所需的gas上限,未使用的部分将会退回 | + +### updateTokenMapping + +```solidity +function updateTokenMapping(address _l1Token, address _l2Token) external; +``` + +更新 NFT 合约从 L1 到 L2 的映射。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------ | +| \_l1Token | L1 上 ERC721 NFT 合约的地址 | +| \_l2Token | L2 上对应 ERC721 NFT 合约的地址 | + +## L2ERC721Gateway API + +### withdrawERC721 + +```solidity +function withdrawERC721(address _token, address _to, uint256 _tokenId, uint256 _gasLimit) external payable; +``` + +将 ERC721 NFT 从 L2 发送到收款人在 L1 上的账户。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------------------------------ | +| token | L2 ERC721 NFT 代币合约的地址 | +| to | L1 上收款人账户的地址 | +| tokenId | 提取的 NFT ID | +| gasLimit | 未使用,但出于潜在的向前兼容性考虑而包括在内 | + +### updateTokenMapping + +```solidity +function updateTokenMapping(address _l1Token, address _l2Token) external; +``` + +更新将 NFT 合约从 L2 到 L1 的映射。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------ | +| \_l2Token | L2 ERC721 NFT 代币合约的地址 | +| \_l1Token | L1中对应ERC721代币的地址 | diff --git a/src/content/docs/zh/developers/l1-and-l2-bridging/eth-and-erc20-token-bridge.mdx b/src/content/docs/zh/developers/l1-and-l2-bridging/eth-and-erc20-token-bridge.mdx new file mode 100644 index 000000000..97fa7f245 --- /dev/null +++ b/src/content/docs/zh/developers/l1-and-l2-bridging/eth-and-erc20-token-bridge.mdx @@ -0,0 +1,196 @@ +--- +section: developers +date: Last Modified +title: "ETH 和 ERC20 代币跨链桥" +lang: "zh" +permalink: "developers/l1-and-l2-bridging/eth-and-erc20-token-bridge" +whatsnext: { "ERC721 NFT 跨链桥": "/zh/developers/l1-and-l2-bridging/erc721-nft-bridge/" } +excerpt: "The Gateway Router allows ETH and ERC20 token bridging from L1 to L2 using the depositETH and depositERC20 functions respectively." +--- + +import Aside from "../../../../../components/Aside.astro" + +## 从 L1 存款 ETH 和 ERC20 代币 + +Gateway Router 合约允许 ETH 和 ERC20 代币分别使用 `depositETH` 和 `depositERC20` 方法从 L1 桥接到 L2。Gateway Router 合约是部署在 L1 上的无需许可的跨链桥。请注意,ERC20 代币在 L2 上将具有不同的地址,您可以使用该 `getL2ERC20Address` 函数查询新地址。 + + + +桥接ERC20代币时,你不必担心如何选择正确的网关。这是因为 `L1GatewayRouter` 将选择正确的入口来发送消息: + +- **`L1StandardERC20Gateway`:** 此网关允许人任意 ERC20 存款,并且被 `L1GatewayRouter` 选作不需要在 L2 上自定义逻辑的 ERC20 代币的默认网关。在第一次代币桥接时,将在L2上创建一个实现了 ScrollStandardERC20 的新代币。要桥接代币,请调用 `L1GatewayRouter` 上的 `depositERC20` 方案。 +- **`L1CustomERC20Gateway`:** 此网关将被 `L1GatewayRouter` 选作需要在 L2 上自定义逻辑的 ERC20 代币. 要使 L1/L2 代币对在Scroll自定义的 ERC20 跨链桥上工作,L2 代币合约必须实现 `IScrollStandardERC20`。此外,代币应包含对 `L2CustomERC20Gateway` 的 `mint` 或 `burn` 功能。请访问 [通过自定义网关桥接 ERC20 指南](/zh/developers/guides/bridge-erc20-through-the-custom-gateway),获取有关如何桥接自定义代币的分步示例。 + +所有网关合约都将形成消息,并将其发送到可以向L2发送任意消息的网关合约 `L1ScrollMessenger` 。`L1ScrollMessenger` 合约将消息传递给 `L1MessageQueue` .任何用户都可以将消息直接发送到Message 合约,以在L2上执行任意数据。这意味着他们可以通过跨链桥从 L1 上的交易在 L2 上执行任何方法。尽管应用程序可以直接将消息传递到现有代币合约,但网关抽象了细节并简化了传输和调用过程。 + + + +当在 L1 上创建新区块时,观察器(Watcher)将检测到 `L1MessageQueue` 的消息并将其传递给中继器(Relayer)服务,后者将通过 l2geth 节点将交易提交到 L2。最后,l2geth节点将交易传递给 `L2ScrollMessagner` 合约,以便在L2上执行。 + +## 从 L2 提款 ETH 和 ERC20 代币 + +L2 Gateway合约与 L1 Gateway合约非常类似。我们可以使用 `withdrawETH` 和 `withdrawERC20` 方法将 ETH 和 ERC20 代币提取回 L1。合约地址部署在L2上。我们使用 `getL1ERC20Address` 来获取 L1 上的代币地址。 + + + + + +## 在 L2 上创建自定义逻辑的 ERC20 代币 + +如果代币需要 L2 上的自定义逻辑,则需要分别通过 `L1CustomERC20Gateway` 和 `L2CustomERC20Gateway` 桥接。L2 上的自定义代币需要向 Gateway 合约授予权限,以便在存款发生时铸造新代币,并在代币提取时销毁 + +部署与 L2 `L2CustomERC20Gateway` 合约兼容的代币需要以下接口 `IScrollStandardERC20` + +```solidity +interface IScrollStandardERC20 { + /// @notice Return the address of Gateway the token belongs to. + function gateway() external view returns (address); + + /// @notice Return the address of counterpart token. + function counterpart() external view returns (address); + + /// @dev ERC677 Standard, see https://github.com/ethereum/EIPs/issues/677 + /// Defi can use this method to transfer L1/L2 token to L2/L1, + /// and deposit to L2/L1 contract in one transaction + function transferAndCall(address receiver, uint256 amount, bytes calldata data) external returns (bool success); + + /// @notice Mint some token to recipient's account. + /// @dev Gateway Utilities, only gateway contract can call + /// @param _to The address of recipient. + /// @param _amount The amount of token to mint. + function mint(address _to, uint256 _amount) external; + + /// @notice Mint some token from account. + /// @dev Gateway Utilities, only gateway contract can call + /// @param _from The address of account to burn token. + /// @param _amount The amount of token to mint. + function burn(address _from, uint256 _amount) external; +} +``` + +### 将自定义的 L2 ERC20 代币添加到Scroll跨链桥 + +代币可以通过任何开发者部署的Gateway合约安全且无需许可地桥接。但是,Scroll还管理着 ERC20 Router 和 Gateway合约,欢迎社区创建的所有代币。成为 Scroll 托管网关的一部分意味着无需部署 Gateway 合约,代币将显示在 Scroll 前端中。要成为Scroll Gateway的一部分,您必须联系 Scroll 团队,将代币添加到 L1 和 L2 跨链桥合约中。为此,请按照[代币列表](https://github.com/scroll-tech/token-list) 仓库内的说明将新代币添加到Scroll官方前端。 + + +## L1 Gateway API + +请访问 [npm 库](https://www.npmjs.com/package/@scroll-tech/contracts?activeTab=code) 来获取完整的 Scroll 合约 API 文档。 + +### depositETH + +```solidity +function depositETH(address _to, uint256 _amount, uint256 _gasLimit) public payable; +``` + +将 ETH 从 L1 发送至 L2. + +| 参数 | 描述 | +| --------- | --------------------------------------------------------------------------------------------------------------------------- | +| to | L2 上收款人账户的地址 | +| amount | 要转移的代币数量,以 wei 为单位。 | +| gasLimit | 在L2上完成存款所需的gas上限。从4000到10000的gas上限应该足以处理交易。 | + +### depositERC20 + +```solidity +function depositERC20(address _token, address _to, uint256 _amount, uint256 _gasLimit) payable; +``` + +将 ERC20代币 从 L1 发送至 L2. + +| 参数 | 描述 | +| --------- | --------------------------------------------------------------------------------------------------------------------------- | +| token | L1 上的代币地址 | +| to | L2 上收款人账户的地址 | +| amount | 要转移的代币数量,以 wei 为单位。 | +| gasLimit | 在L2上完成存款所需的gas上限。从4000到10000的gas上限应该足以处理交易。 | + +### getL2ERC20Address + +```solidity +function getL2ERC20Address(address _l1Token) external view returns (address); +``` + +返回给定 L1 代币地址的相应 L2 代币地址。 + +| 参数 | 描述 | +| --------- | ------------------------ | +| \_l1Token | L1代币的地址 | + +### updateTokenMapping + +```solidity +function updateTokenMapping(address _l1Token, address _l2Token) external; +``` + +更新 ERC20 代币从 L1 到 L2 的映射。 + +| 参数 | 描述 | +| --------- | ----------------------------------------------- | +| \_l1Token | L1 中 ERC20 代币的地址 | +| \_l2Token | L2 中相应 ERC20 代币的地址 | + +## L2 Gateway API + +### withdrawETH + +```solidity +function withdrawETH(address to, uint256 amount, uint256 gasLimit) external payable; +``` + +将 ETH 从 L2 发送到 L1。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------------------------------------------------------------- | +| to | L1 上收款人账户的地址 | +| amount | 要转移的代币数量,以 wei 为单位 | +| gasLimit | 在L1上完成存款所需的gas上限。这是可选的,如果您不想设置它,请发送 0 | + +### withdrawERC20 + +```solidity +function withdrawERC20(address token, address to, uint256 amount, uint256 gasLimit) external payable; +``` + +将 ERC20 代币从 L2 发送到 L1。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------------------------------------------------------------- | +| token | L2 上代币的地址 | +| to | L1 上收款人账户的地址 | +| amount | 要转移的代币数量,以 wei 为单位 | +| gasLimit | 在L1上完成存款所需的gas上限。这是可选的,如果您不想设置它,请发送 0 | + +### getL1ERC20Address + +```solidity +function getL1ERC20Address(address l2Token) external view returns (address); +``` + +返回给定 L2 代币地址的相应 L1 代币地址。 + +| 参数 | 描述 | +| --------- | ---------------------------- | +| l2Token | L2 上代币的地址 | + +### updateTokenMapping + +```solidity +function updateTokenMapping(address _l1Token, address _l2Token) external; +``` + +更新 ERC20 代币从 L2 到 L1 的映射。 + +| 参数 | 描述 | +| --------- | ----------------------------------------------- | +| \_l2Token | L2 中 ERC20 代币的地址 | +| \_l1Token | L1 中相应 ERC20 代币的地址 | diff --git a/src/content/docs/zh/developers/l1-and-l2-bridging/the-scroll-messenger.mdx b/src/content/docs/zh/developers/l1-and-l2-bridging/the-scroll-messenger.mdx new file mode 100644 index 000000000..3529414d8 --- /dev/null +++ b/src/content/docs/zh/developers/l1-and-l2-bridging/the-scroll-messenger.mdx @@ -0,0 +1,134 @@ +--- +section: developers +date: Last Modified +title: "The Scroll Messenger" +lang: "zh" +permalink: "developers/l1-and-l2-bridging/the-scroll-messenger" +whatsnext: { "Scroll 上的交易手续费": "/zh/developers/transaction-fees-on-scroll/" } +excerpt: "The Scroll Messenger documentation for arbitrary message passing between L1 and L2." +--- + +import Aside from "../../../../../components/Aside.astro" + + +Scroll Messenger 合约允许从 L1 向 L2 发送任意消息,反之亦然。这使得能够以安全和无需许可的方式在另一条链上执行功能。要将消息从 L1 发送到 L2,请使用部署在 L1 上的 `L1ScrollMessenger` 合约 .要将消息从 L2 发送到 L1,请使用部署在 L2 上的 `L2ScrollMessenger` 合约。 + + + +## L1 交易最终确认 + +任何从L2发起的交易都需要使用Scroll Messenger合约上的 `relayMessageWithProof` 方法最终确认。我们将此过程称为“提交执行提款交易”,并且通过网关或路由器发送任意消息和转移资产都需要它。当您使用 `relayMessageWithProof` 时,您必须提供默克尔树包含证明,证明您的交易包含在“提款”消息的树中,以及其他参数。生成此证明和这些值可以在本地无需许可的情况下完成,但目前,检索这些参数的最简单方法是通过我们托管在 https://sepolia-api-bridge.scroll.io/api/ 的后端 API。 + + + +向 `/claimable` 端点提供负责在 L2 上发布原始交易的 EOA 或合约地址。API 后端将为您提供在 L1 上成功完成交易所需的所有信息。请看以下示例: + +```bash +https://sepolia-api-bridge.scroll.io/api/claimable?address=0x031407eaaffFB4f1EC2c999bE4477E52C81de3c5&page_size=10&page=1 +``` + +API 应按以下格式返回交易数据: + +```json +{ + "errcode": 0, + "errmsg": "", + "data": { + "result": [ + { + "hash": "0xa476850306d6ee52b127628ded34dcf2343570873cce9c5383bd497db48d4f9b", + "amount": "", + "to": "", + "isL1": false, + "l1Token": "", + "l2Token": "", + "blockNumber": 748, + "blockTimestamp": null, + "finalizeTx": { + "hash": "", + "amount": "", + "to": "", + "isL1": false, + "blockNumber": 0, + "blockTimestamp": null + }, + "claimInfo": { + "from": "0x031407eaaffFB4f1EC2c999bE4477E52C81de3c5", + "to": "0x1039057185CFe192d16c03F5656225821A193FD5", + "value": "0", + "nonce": "9", + "batch_hash": "0x49a18d72dbceeb957f918947b532db452c031f528e7e6bf329007066638c5e50", + "message": "0xa413686200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000005686f6c6973000000000000000000000000000000000000000000000000000000", + "proof": "0x69b4ee6cf9a38bed79668ddd347fef2bdff44c3760c9309fa41decfd60202d22ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5b4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3079f53171df5c0661d2afe86c4d97b6f34278daf6a0ea9baff5b4fc979d5629a5", + "batch_index": "93" + }, + "createdTime": null + } + ], + "total": 1 + } +} +``` + +返回的 `result` json 中的`claimInfo` 对象拥有在 L1 上执行交易所需的所有信息。`relayMessageWithProof` 所需的参数是: `from`, `to`, `value`, `nonce`, `message` and `proof`。 将这些参数提供给 L1 上的 relayMessageWithProof 方法,以在 L1 上执行和最终确认交易。 + + + + +## Messenger API + +请访问 [npm 库](https://www.npmjs.com/package/@scroll-tech/contracts?activeTab=code) 来获取完整的 Scroll 合约 API 文档。 + +### sendMessage + +```solidity +function sendMessage( + address target, + uint256 value, + bytes calldata message, + uint256 gasLimit, + address refundAddress +) external payable; +``` + +将任意数据从一个链发送到另一个链。它允许我们跨链执行方法。 + +| 参数 | 描述 | +| ------------- | ------------------------------------------------------------------------------------------------------------------- | +| target | 接收消息的帐户的地址。接收者可以是智能合约或EOA钱包 | +| value | 调用目标合约时传递的 ETH 数量 | +| message | 消息的内容。这是要执行的任意调用数据 | +| gasLimit | 在相应链上完成消息中继所需的gas上限 | +| refundAddress | 将收到退款费用的帐户的地址 | + +### relayMessageWithProof + +```solidity +function relayMessageWithProof( + address from, + address to, + uint256 value, + uint256 nonce, + bytes memory message, + L2MessageProof memory proof +) external; +``` + +中继带有消息证明的 L2 => L1 消息。 + +| 参数 | 描述 | +| --------- | ------------------------------------------------------------ | +| from | 消息发件人的地址 | +| to | 消息收件人的地址 | +| value | 传递给消息调用的 msg.value | +| nonce | 消息的nonce,以避免重放攻击 | +| message | 消息的内容 | +| proof | 用于验证交易正确性的证明 | diff --git a/src/content/docs/zh/developers/scroll-contracts.mdx b/src/content/docs/zh/developers/scroll-contracts.mdx new file mode 100644 index 000000000..49730ff24 --- /dev/null +++ b/src/content/docs/zh/developers/scroll-contracts.mdx @@ -0,0 +1,237 @@ +--- +section: developers +date: Last Modified +title: "Scroll 合约" +lang: "zh" +permalink: "developers/scroll-contracts" +whatsnext: { "以太坊和Scroll的区别": "/zh/developers/ethereum-and-scroll-differences" } +excerpt: "The network info and contract addresses you need to start with Scroll Sepolia Testnet." +--- + +import Aside from "../../../../components/Aside.astro" +import ToggleElement from "../../../../components/ToggleElement.astro" + +在这篇文章中,您将找到 Scroll 和常用协议的有用的合约地址。有关 [Scroll Sepolia]信息,请参阅下面的部分 (#scroll-sepolia-testnet)。 + +## 网络信息 + +使用下面的表格配置您的以太坊工具连接到 Scroll 主网。 + + +| 网络名称 | Scroll | 以太坊主网 | +| ------------------ | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| RPC URL | [https://rpc.scroll.io/](https://rpc.scroll.io/) | [https://eth.llamarpc.com](https://eth.llamarpc.com) | +| 链 ID | 534352 | 1 | +| 代币符号 | ETH | ETH | +| 区块链浏览器链接 | [https://scrollscan.com/](https://scrollscan.com/) | [https://etherscan.io](https://etherscan.io) | + + +
额外的 Scroll 主网 RPC 和 infra
+ - [Scroll Native Bridge](https://scroll.io/bridge) + - [Scroll Rollup Scanner](https://scroll.io/rollupscan) + - [Scroll RPC Providers on ChainList.org](https://chainlist.org/chain/534352) + - [Ethereum RPC Providers on ChainList.org](https://chainlist.org/chain/1) + {/* - Additional Block Explorers: + - [Dora](https://www.ondora.xyz/network/scroll/interactions) + - [L2Scan](https://scroll.l2scan.co/) */} + +
+ +## Scroll 合约 + +### Rollup + +- L1 Rollup (Scroll Chain): [`0xa13BAF47339d63B743e7Da8741db5456DAc1E556`](https://etherscan.io/address/0xa13BAF47339d63B743e7Da8741db5456DAc1E556) + +### ETH and ERC20 跨链桥 + +- L1 Gateway Router: [`0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6`](https://etherscan.io/address/0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6) +- L2 Gateway Router: [`0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79`](https://scrollscan.com/address/0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79) + +### 高级跨链桥合约 + +- Scroll Messenger + - L1 Messenger: [`0x6774Bcbd5ceCeF1336b5300fb5186a12DDD8b367`](https://etherscan.io/address/0x6774Bcbd5ceCeF1336b5300fb5186a12DDD8b367) + - L2 Messenger: [`0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC`](https://scrollscan.com/address/0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC) +- ETH Bridge + - L1 ETH Gateway: [`0x7F2b8C31F88B6006c382775eea88297Ec1e3E905`](https://etherscan.io/address/0x7F2b8C31F88B6006c382775eea88297Ec1e3E905) + - L2 ETH Gateway: [`0x6EA73e05AdC79974B931123675ea8F78FfdacDF0`](https://scrollscan.com/address/0x6EA73e05AdC79974B931123675ea8F78FfdacDF0) + - L1 WETH Gateway: [`0x7AC440cAe8EB6328de4fA621163a792c1EA9D4fE`](https://etherscan.io/address/0x7AC440cAe8EB6328de4fA621163a792c1EA9D4fE) + - L2 WETH Gateway: [`0x7003E7B7186f0E6601203b99F7B8DECBfA391cf9`](https://scrollscan.com/address/0x7003E7B7186f0E6601203b99F7B8DECBfA391cf9) +- ERC20 Bridge + - L1 ERC20 Standard Gateway: [`0xD8A791fE2bE73eb6E6cF1eb0cb3F36adC9B3F8f9`](https://etherscan.io/address/0xD8A791fE2bE73eb6E6cF1eb0cb3F36adC9B3F8f9) + - L2 ERC20 Standard Gateway: [`0xE2b4795039517653c5Ae8C2A9BFdd783b48f447A`](https://scrollscan.com/address/0xE2b4795039517653c5Ae8C2A9BFdd783b48f447A) + - L1 ERC20 Custom Gateway: [`0xb2b10a289A229415a124EFDeF310C10cb004B6ff`](https://etherscan.io/address/0xb2b10a289A229415a124EFDeF310C10cb004B6ff) + - L2 ERC20 Custom Gateway: [`0x64CCBE37c9A82D85A1F2E74649b7A42923067988`](https://scrollscan.com/address/0x64CCBE37c9A82D85A1F2E74649b7A42923067988) +- ERC721 Bridge + - L1 ERC721 Gateway: [`0x6260aF48e8948617b8FA17F4e5CEa2d21D21554B`](https://etherscan.io/address/0x6260aF48e8948617b8FA17F4e5CEa2d21D21554B) + - L2 ERC721 Gateway: [`0x7bC08E1c04fb41d75F1410363F0c5746Eae80582`](https://scrollscan.com/address/0x7bC08E1c04fb41d75F1410363F0c5746Eae80582) +- ERC1155 Bridge + - L1 ERC1155 Gateway: [`0xb94f7F6ABcb811c5Ac709dE14E37590fcCd975B6`](https://etherscan.io/address/0xb94f7F6ABcb811c5Ac709dE14E37590fcCd975B6) + - L2 ERC1155 Gateway: [`0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc`](https://scrollscan.com/address/0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc) +- Gas Oracle (deployed on Mainnet) + - L2 Gas Oracle (*soon to be deprecated*): [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852) + - *after [Feb '24 Bridge Upgrade](https://scroll.io/blog/protocol-upgrade-bridging-cost-reduction)* + - L2 Message Queue With Gas Price Oracle: [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B) + +### L2 预部署合约 + +- Message Queue: [`0x5300000000000000000000000000000000000000`](https://scrollscan.com/address/0x5300000000000000000000000000000000000000) +- Gas Price Oracle: [`0x5300000000000000000000000000000000000002`](https://scrollscan.com/address/0x5300000000000000000000000000000000000002) +- Whitelist: [`0x5300000000000000000000000000000000000003`](https://scrollscan.com/address/0x5300000000000000000000000000000000000003) +- WETH L2: [`0x5300000000000000000000000000000000000004`](https://scrollscan.com/address/0x5300000000000000000000000000000000000004) +- Transaction Fee Vault: [`0x5300000000000000000000000000000000000005`](https://scrollscan.com/address/0x5300000000000000000000000000000000000005) + +## Scroll 主网上协议 + +### Uniswap v3 + +- 主要合约 + - Core Factory: [`0x70C62C8b8e801124A4Aa81ce07b637A3e83cb919`](https://scrollscan.com/address/0x70C62C8b8e801124A4Aa81ce07b637A3e83cb919) + - NFT Position Manager: [`0xB39002E4033b162fAc607fc3471E205FA2aE5967`](https://scrollscan.com/address/0xB39002E4033b162fAc607fc3471E205FA2aE5967) + - Router: [`0xfc30937f5cDe93Df8d48aCAF7e6f5D8D8A31F636`](https://scrollscan.com/address/0xfc30937f5cDe93Df8d48aCAF7e6f5D8D8A31F636) +- 额外合约 + - multicall2Address: [`0xC1D2e074C38FdD5CA965000668420C80316F0915`](https://scrollscan.com/address/0xC1D2e074C38FdD5CA965000668420C80316F0915) + - proxyAdminAddress: [`0x1E6dcAb806A42055098f23E2B3ac72D6E195F967`](https://scrollscan.com/address/0x1E6dcAb806A42055098f23E2B3ac72D6E195F967) + - tickLensAddress: [`0x85780e12e90D2a684eB8E7404c985b5B5c8ce7E9`](https://scrollscan.com/address/0x85780e12e90D2a684eB8E7404c985b5B5c8ce7E9) + - nftDescriptorLibraryAddressV1_3_0: [`0xAeE9c206ba89F3DA25EEe4636208519e0B86965B`](https://scrollscan.com/address/0xAeE9c206ba89F3DA25EEe4636208519e0B86965B) + - nonfungibleTokenPositionDescriptorAddressV1_3_0: [`0xACcf12204b7591B2ECCEFe737440B0f53748B191`](https://scrollscan.com/address/0xACcf12204b7591B2ECCEFe737440B0f53748B191) + - descriptorProxyAddress: [`0x675DD953225D296A44790dC1390a1E7eF378f464`](https://scrollscan.com/address/0x675DD953225D296A44790dC1390a1E7eF378f464) + - v3MigratorAddress: [`0xF00577B5Dd0DA227298E954Ed11356F264Cf93d4`](https://scrollscan.com/address/0xF00577B5Dd0DA227298E954Ed11356F264Cf93d4) + - v3StakerAddress: [`0xFdFbE973c9ecB036Ecfb7af697FcACe789D3f928`](https://scrollscan.com/address/0xFdFbE973c9ecB036Ecfb7af697FcACe789D3f928) + - quoterV2Address: [`0x2566e082Cb1656d22BCbe5644F5b997D194b5299`](https://scrollscan.com/address/0x2566e082Cb1656d22BCbe5644F5b997D194b5299) + +#### 以太坊认证服务 (EAS) + +- EAS: [`0xC47300428b6AD2c7D03BB76D05A176058b47E6B0`](https://scrollscan.com/address/0xC47300428b6AD2c7D03BB76D05A176058b47E6B0) +- SchemaRegistry: [`0xD2CDF46556543316e7D34e8eDc4624e2bB95e3B6`](https://scrollscan.com/address/0xD2CDF46556543316e7D34e8eDc4624e2bB95e3B6) +- EIP712Proxy: [`0x77b7DA1c40762Cd8AFfE2069b575328EfD4D9801`](https://scrollscan.com/address/0x77b7DA1c40762Cd8AFfE2069b575328EfD4D9801) +- Indexer: `Not deployed yet` + +## 其他合约 + +- Multicall3: [`0xcA11bde05977b3631167028862bE2a173976CA11`](https://scrollscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11) + +## 代币 + + + +{" "} + +
+ +--- + +## Scroll Sepolia 测试网 + +### 网络信息 + +| 网络名称 | Scroll Sepolia 测试网 | Sepolia 测试网 | +| ------------------ | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| RPC URL | [https://sepolia-rpc.scroll.io/](https://sepolia-rpc.scroll.io/) | [https://rpc2.sepolia.org](https://rpc2.sepolia.org) | +| 链 ID | 534351 | 11155111 | +| 代币符号 | ETH | ETH | +| 区块链浏览器链接 | [https://sepolia.scrollscan.com](https://sepolia.scrollscan.com/) | [https://sepolia.etherscan.io](https://sepolia.etherscan.io) | + + +
其他的 Scroll Sepolia RPC 和 Infra
+ - [Scroll Sepolia Native Bridge](https://sepolia.scroll.io/bridge) + - [Scroll Sepolia Rollup Scanner](https://sepolia.scroll.io/rollupscan) + - [Scroll Sepolia RPC Providers on ChainList.org](https://chainlist.org/chain/534351) + - [Ethereum Sepolia RPC Providers on ChainList.org](https://chainlist.org/chain/11155111) + - 其他的区块浏览器: + - [Dora](https://www.ondora.xyz/network/scroll-sepolia/interactions) + - [L2Scan](https://scroll.l2scan.co/) + +
+ +### Scroll Sepolia 测试网合约 + +#### Rollup + +- L1 Rollup (Scroll Chain): [`0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0`](https://sepolia.etherscan.io/address/0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0) + +### ETH and ERC20 跨链桥 + +- L1 Gateway Router: [`0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a`](https://sepolia.etherscan.io/address/0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a) +- L2 Gateway Router: [`0x9aD3c5617eCAa556d6E166787A97081907171230`](https://sepolia.scrollscan.com/address/0x9aD3c5617eCAa556d6E166787A97081907171230) + +### 高级跨链桥合约 + +- Scroll Messenger + - L1 Messenger: [`0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A`](https://sepolia.etherscan.io/address/0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A) + - L2 Messenger: [`0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d`](https://sepolia.scrollscan.com/address/0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d) +- ETH Bridge + - L1 ETH Gateway: [`0x8A54A2347Da2562917304141ab67324615e9866d`](https://sepolia.etherscan.io/address/0x8A54A2347Da2562917304141ab67324615e9866d) + - L2 ETH Gateway: [`0x91e8ADDFe1358aCa5314c644312d38237fC1101C`](https://sepolia.scrollscan.com/address/0x91e8ADDFe1358aCa5314c644312d38237fC1101C) + - L1 WETH Gateway: [`0x3dA0BF44814cfC678376b3311838272158211695`](https://sepolia.etherscan.io/address/0x3dA0BF44814cfC678376b3311838272158211695) + - L2 WETH Gateway: [`0x481B20A927206aF7A754dB8b904B052e2781ea27`](https://sepolia.scrollscan.com/address/0x481B20A927206aF7A754dB8b904B052e2781ea27) +- ERC20 Bridge + - L1 ERC20 Standard Gateway: [`0x65D123d6389b900d954677c26327bfc1C3e88A13`](https://sepolia.etherscan.io/address/0x65D123d6389b900d954677c26327bfc1C3e88A13) + - L2 ERC20 Standard Gateway: [`0xaDcA915971A336EA2f5b567e662F5bd74AEf9582`](https://sepolia.scrollscan.com/address/0xaDcA915971A336EA2f5b567e662F5bd74AEf9582) + - L1 ERC20 Custom Gateway: [`0x31C994F2017E71b82fd4D8118F140c81215bbb37`](https://sepolia.etherscan.io/address/0x31C994F2017E71b82fd4D8118F140c81215bbb37) + - L2 ERC20 Custom Gateway: [`0x058dec71E53079F9ED053F3a0bBca877F6f3eAcf`](https://sepolia.scrollscan.com/address/0x058dec71E53079F9ED053F3a0bBca877F6f3eAcf) +- ERC721 Bridge + - L1 ERC721 Gateway: [`0xEF27A5E63aa3f1B8312f744b9b4DcEB910Ba77AC`](https://sepolia.etherscan.io/address/0xEF27A5E63aa3f1B8312f744b9b4DcEB910Ba77AC) + - L2 ERC721 Gateway: [`0x179B9415194B67DC3c0b8760E075cD4415785c97`](https://sepolia.scrollscan.com/address/0x179B9415194B67DC3c0b8760E075cD4415785c97) +- ERC1155 Bridge + - L1 ERC1155 Gateway: [`0xa5Df8530766A85936EE3E139dECE3bF081c83146`](https://sepolia.etherscan.io/address/0xa5Df8530766A85936EE3E139dECE3bF081c83146) + - L2 ERC1155 Gateway: [`0xe17C9b9C66FAF07753cdB04316D09f52144612A5`](https://sepolia.scrollscan.com/address/0xe17C9b9C66FAF07753cdB04316D09f52144612A5) +- Gas Oracle (deployed on Sepolia) + - L1 Message Queue With Gas Price Oracle: [`0xF0B2293F5D834eAe920c6974D50957A1732de763`](https://sepolia.etherscan.io/address/0xF0B2293F5D834eAe920c6974D50957A1732de763) + - L2 Gas Oracle (*deprecated*): [`0x247969F4fad93a33d4826046bc3eAE0D36BdE548`](https://sepolia.etherscan.io/address/0x247969F4fad93a33d4826046bc3eAE0D36BdE548) + +#### L2 预部署合约 + +- Message Queue: [`0x5300000000000000000000000000000000000000`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000000) +- Gas Price Oracle: [`0x5300000000000000000000000000000000000002`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000002) +- Whitelist: [`0x5300000000000000000000000000000000000003`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000003) +- WETH L2: [`0x5300000000000000000000000000000000000004`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000004) +- Transaction Fee Vault: [`0x5300000000000000000000000000000000000005`](https://sepolia.scrollscan.com/address/0x5300000000000000000000000000000000000005) + +### Sepolia 上协议 + +### Uniswap v3 + +- 前端网站: [https://uniswap-showcase.sepolia.scroll.xyz/](https://uniswap-showcase.sepolia.scroll.xyz/) +- 主要合约 + - Core Factory: [`0xB856587fe1cbA8600F75F1b1176E44250B11C788`](https://sepolia.scrollscan.com/address/0xB856587fe1cbA8600F75F1b1176E44250B11C788) + - NFT Position Manager: [`0xbbAd0e891922A8A4a7e9c39d4cc0559117016fec`](https://sepolia.scrollscan.com/address/0xbbAd0e891922A8A4a7e9c39d4cc0559117016fec) + - Router: [`0x17AFD0263D6909Ba1F9a8EAC697f76532365Fb95`](https://sepolia.scrollscan.com/address/0x17AFD0263D6909Ba1F9a8EAC697f76532365Fb95) +- 其他 Contracts + - multicall2Address: [`0x8c181f4B9040F1a2C941EfD3b608712cF86F1957`](https://sepolia.scrollscan.com/address/0x8c181f4B9040F1a2C941EfD3b608712cF86F1957) + - proxyAdminAddress: [`0xD4A9910732b6f301F6F210Ebe7a3dBf16d9E9DD4`](https://sepolia.scrollscan.com/address/0xD4A9910732b6f301F6F210Ebe7a3dBf16d9E9DD4) + - tickLensAddress: [`0x9804Da978427a49929f2E6Ea32A9594F03f9296e`](https://sepolia.scrollscan.com/address/0x9804Da978427a49929f2E6Ea32A9594F03f9296e) + - nftDescriptorLibraryAddressV1_3_0: [`0x45Bd3B62B7A3aA53371c98049b0f7A9C1A4B5a6c`](https://sepolia.scrollscan.com/address/0x45Bd3B62B7A3aA53371c98049b0f7A9C1A4B5a6c) + - nonfungibleTokenPositionDescriptorAddressV1_3_0: [`0x24d4E4a572Dc1e0dbF92a0d7768Ac80df516b2C2`](https://sepolia.scrollscan.com/address/0x24d4E4a572Dc1e0dbF92a0d7768Ac80df516b2C2) + - descriptorProxyAddress: [`0xa8986417d0EAe50607696b9b0cb7ec5aFBE67765`](https://sepolia.scrollscan.com/address/0xa8986417d0EAe50607696b9b0cb7ec5aFBE67765) + - v3MigratorAddress: [`0x38E33D067F03a5cDc02C301b2c306cb0414549Bf`](https://sepolia.scrollscan.com/address/0x38E33D067F03a5cDc02C301b2c306cb0414549Bf) + - v3StakerAddress: [`0xe7b82794Cab21e665a3e6f8ea562d392AA6E0619`](https://sepolia.scrollscan.com/address/0xe7b82794Cab21e665a3e6f8ea562d392AA6E0619) + - quoterV2Address: [`0xd5dd33650Ef1DC6D23069aEDC8EAE87b0D3619B2`](https://sepolia.scrollscan.com/address/0xd5dd33650Ef1DC6D23069aEDC8EAE87b0D3619B2) + +#### Aave + +查看该 [Github gist](https://gist.github.com/dghelm/7fe68f0a524f30846e1142721c081d84). + +#### 以太坊认证服务 (EAS) + +- EAS: [`0xaEF4103A04090071165F78D45D83A0C0782c2B2a`](https://sepolia.scrollscan.com/address/0xaEF4103A04090071165F78D45D83A0C0782c2B2a) +- SchemaRegistry: [`0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797`](https://sepolia.scrollscan.com/address/0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797) +- EIP712Proxy: [`0xB3574f76b1720E61FdA98702c7016674CD6Eaa7b`](https://sepolia.scrollscan.com/address/0xB3574f76b1720E61FdA98702c7016674CD6Eaa7b) +- Indexer: [`0x7C2cb1eDC328491da52de2a0afc44D3B0Ae7ee17`](https://sepolia.scrollscan.com/address/0x7C2cb1eDC328491da52de2a0afc44D3B0Ae7ee17) + +### 其他合约 + +- Multicall3: [`0xcA11bde05977b3631167028862bE2a173976CA11`](https://sepolia.scrollscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11) + +### 代币 + + + +- Gho Token: [`0xD9692f1748aFEe00FACE2da35242417dd05a8615`](https://sepolia.scrollscan.com/address/0xD9692f1748aFEe00FACE2da35242417dd05a8615) diff --git a/src/content/docs/zh/developers/transaction-fees-on-scroll.mdx b/src/content/docs/zh/developers/transaction-fees-on-scroll.mdx new file mode 100644 index 000000000..6319a8394 --- /dev/null +++ b/src/content/docs/zh/developers/transaction-fees-on-scroll.mdx @@ -0,0 +1,171 @@ +--- +section: developers +date: Last Modified +title: "Scroll上的交易手续费" +lang: "zh" +permalink: "developers/transaction-fees-on-scroll" +whatsnext: { "合约部署教程": "/zh/developers/guides/contract-deployment-tutorial/" } +excerpt: "Understand how L1 and L2 transaction fees work on Scroll " +--- + +import Aside from "../../../../components/Aside.astro" + +## 概览 + +Scroll Sepolia测试网的费用明显低于其底层。对于用户和开发者来说,Scroll上的交易费用看上去与以太坊主网上的交易费用类似,现有的工具,钱包和代码可能会像以前一样工作。但是,钱包中显示的交易费用并不是全部,除非软件特别了解Scroll的费用计算。 + +由于 L2 rollups的设计,交易成本取决于 L1 的成本。为了利用以太坊的安全性,Scroll必须考虑必须在L1上存储和验证交易数据和证明的成本。 + +与以太坊主网相比,Scroll Sepolia为交易费用计算引入了一些新的维度。交易的最终成本由以下几个部分构成: + +- **L2 费用** + - 与 L1 计算方式相同,等于 `gas_price * gas_used` +- **L1 fee** + - 额外费用包括将数据发送到 L1 以获得数据可用性。在L1上发起的交易无需支付此费用。 + - 根据交易的calldata的大小计算. + - ETH 会自动从 Scroll 上的账户余额中扣除费用 + +从更高的视角看,**L2 费用**是在 L2 排序器上执行交易的成本,**L1 费用**是将该交易提交到 L1 的成本。 + +简而言之,`totalTxFee = l2Fee + l1Fee`,全部以 ETH 计价,这是Scroll网络的原生gas代币。 + + + +## L2 费用 + +与以太坊一样,Scroll上的交易必须支付执行计算和存储产生的数据成本。 + +### 计算执行费用 + +L2执行费用很简单: + +```javascript +l2TransactionExecutionFee = l2TransactionGasUsed * l2TransactionGasPrice +``` +总费用取决于交易gas使用情况( `l2TransactionGasUsed` )以及当前的市场状况( `l2TransactionGasPrice` )。用户设置 gas 价格,并通过在 Scroll 节点上调用 `estimateGas` 端口来预估“使用的gas”。 + +换句话说,执行费用的计算方式与[EIP1559](https://eips.ethereum.org/EIPS/eip-1559)之前的以太坊完全相同。 + +## L1 费用 + +每笔交易的调用数据(calldata)必须提交到以太坊,这会产生额外的交易费用,称为“L1费用”。如果不这样做,则无法仅从 L1 数据重新恢复 Scroll。 + +交易不是逐一提交的 - 它们是区块(和交易的区块)的批次收集的。单个交易的成本是根据其负载(payload)中的零和非零字节计算的。 + +### 预估 L1 数据费用 + +Scroll 预先部署了 L1GasPriceOracle 合约 ,可在 Scroll Sepolia 上访问([`0x5300000000000000000000000000000000000002`](https://sepolia-blockscout.scroll.io/address/0x5300000000000000000000000000000000000002))。它提供了 `getL1Fee` 的方法,可以估算给定交易原始数据的 L1 数据费用。 + +```solidity +function getL1Fee(bytes memory _data) external view override returns (uint256); +``` + + + +### 使用 Gas 预言机计算 L1 数据费用 + +如前所述,`L1GasPriceOracle` 用于在给定原始交易数据的情况下估计 L1 gas 费用。这是一个**推送预言机**,由 Scroll 运行的中继器更新。 + +数据费用基于多种因素: + +- 带签名的 RLP 编码交易的 `nonzeros` 和 `zeros` 字节 +- `l1BaseFee` - 当前 L1 的base fee +- `overhead` - 数据承诺交易的额外 gas 开销 +- `scalingFactor` - 用于计算价格飙升的扩展因子 +- `PRECISION` - 用于缩放最终费用的常量 + +计算L1数据费用的步骤如下: + +1. 从 `L1GasPriceOracle` 合约中读取三个字段 `l1BaseFee` ,`overhead` 和 `scalar`,合约中这些字段的slot是: + + | 字段 | Slot | + | --------- | ---- | + | l1BaseFee | 1 | + | overhead | 2 | + | scalar | 3 | + +2. 计算交易中的零字节和非零字节数。 +3. 计算 L1 数据费用,给定 TX_DATA_ZERO_GAS = 4,TX_DATA_NON_ZERO_GAS = 16[^eip-2028] 和 PRECISION = 1e9: + + ```javascript + l1Gas = zeros * TX_DATA_ZERO_GAS + (nonzeros + 4) * TX_DATA_NON_ZERO_GAS + l1GasFee = ((l1Gas + overhead) * l1BaseFee * scalar) / PRECISION + ``` + + 我们在非零字节中保留额外的 4 个字节,以存储 RLP 编码交易中的字节数。 + +[^eip-2028]: 参阅 [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) 获取更多信息 + +### L1GasPriceOracle API + +#### overhead + +```solidity +function overhead() external view returns (uint256); +``` + +返回当前的 L1 费用开销 + +#### scalar + +```solidity +function scalar() external view returns (uint256); +``` + +返回当前 l1 费用标量 + +#### l1BaseFee + +```solidity +function l1BaseFee() external view returns (uint256); +``` + +返回最新的已知 l1 base fee + +#### getL1Fee + +```solidity +function getL1Fee(bytes memory _data) external view returns (uint256); +``` + +根据 RLP 编码输入交易的大小、当前 L1 base fee和各种动态参数计算 L1 部分的费用。 + +**返回值:** 应为交易支付的L1费用 + +| 参数 | 描述 | +| --------- | ----------------------------------------------------------- | +| data | 已签名的完全 RLP 编码交易的 L1 费用 | + +#### getL1GasUsed + +```solidity +function getL1GasUsed(bytes memory data) external view returns (uint256); +``` + +计算用于交易的 L1 gas数量。将开销相加,该开销表示将交易和状态根发布到 L1 的每个交易的 gas 开销。填充添加 74 字节的表明输入没有签名。 + +**返回值:** 用于发布交易的 L1 gas 数量 + +| 参数 | 描述 | +| --------- | ----------------------------------------------------------- | +| data | 已签名的完全 RLP 编码交易的 L1 费用 | + +## 未来路线图 + +目前,证明生成所需的计算由Scroll和各种证明合作伙伴完成并补贴。 + +随着证明者网络变得去中心化,需要将证明生成的激励措施纳入协议中,以使系统具有可持续性和可扩展性。 + +我们预计最终的gas成本将包括证明生成的成本。通过协议的进一步优化,用户的证明成本应该是最小的,因为每个证明都包含许多交易。 \ No newline at end of file diff --git a/src/content/docs/zh/developers/verifying-smart-contracts.mdx b/src/content/docs/zh/developers/verifying-smart-contracts.mdx new file mode 100644 index 000000000..1e2e4dbf4 --- /dev/null +++ b/src/content/docs/zh/developers/verifying-smart-contracts.mdx @@ -0,0 +1,135 @@ +--- +section: developers +date: Last Modified +title: "验证智能合约" +lang: "zh" +permalink: "developers/verifying-smart-contracts" +whatsnext: { "Scroll 合约": "/zh/developers/scroll-contracts" } +excerpt: "Easily verify your smart contracts with Scroll-supported developer tooling or the Blockscout Web API" +--- + +import Aside from "../../../../components/Aside.astro" +import ClickToZoom from "../../../../components/ClickToZoom.astro" +import verify1 from "./_images/verify1.png" +import CodeSample from "../../../../components/CodeSample/CodeSample.astro" + +部署智能合约后,在[我们的区块浏览器](https://sepolia-blockscout.scroll.io/)上验证您的代码非常重要。这可以使用您的开发者工具或使用Blockscout的网页以自动化方式完成。 + + + +## 使用开发者工具 + +大多数智能合约工具都有插件,可以在Etherscan上轻松验证您的合约。Blockscout支持Etherscan的合约验证API,将这些工具与Scroll Sepolia测试网一起使用非常简单。 + +| 网络 | Scroll | Scroll Sepolia | +| ---------- | -------------------------------- | ---------------------------------------- | +| Scrollscan | https://api.scrollscan.com/api | https://api-sepolia.scrollscan.com/api | +| Blockscout | https://blockscout.scroll.io/api | https://sepolia-blockscout.scroll.io/api | + + + +### Hardhat + +首先,修改 `hardhat.config.ts` 以指向 Scroll 的 RPC 和 `sepolia-blockscout.scroll.io/api`. `apyKey` 设置为虚拟值是必需的,但任何内容都适合其 `apyKey` 值。 + +例如,如果您在 Blockscout 上使用 Scroll Sepolia,您的配置将如下所示: +```javascript +... + +const config: HardhatUserConfig = { + ... + networks: { + scrollSepolia: { + url: 'https://sepolia-rpc.scroll.io' || '', + accounts: + process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], + }, + }, + etherscan: { + apiKey: { + scrollSepolia: 'abc', + }, + customChains: [ + { + network: 'scrollSepolia', + chainId: 534351, + urls: { + apiURL: 'https://sepolia-blockscout.scroll.io/api', + browserURL: 'https://sepolia-blockscout.scroll.io/', + }, + }, + ], + }, +} + +... +``` + +现在,您可以通过运行以下命令来验证智能合约。 + +```solidity +npx hardhat verify --network scrollSepolia +``` + +例如,如下是在智能合约的构造函数中接收两个 uint 参数的: + +```solidity +npx hardhat verify --network scrollSepolia 0xD9880690bd717189cC3Fbe7B9020F27fae7Ac76F 123 456 +``` + + + +### Foundry + +在使用 Foundry 时,`verify-contract` 命令有助于自动化合约验证的过程。如果您的合约具有构造函数参数,您可以使用 `--constructor-args` 选项以 ABI 编码形式指定这些参数。例如,如果您的构造函数接受两个 `uint256` 变量: +```bash + --constructor-args $(cast abi-encode "constructor(uint256,uint256)" 0 7) +``` + +请参考 [Foundry 文档](https://book.getfoundry.sh/reference/forge/forge-verify-contract) 以获取您可以指定的更多选项。 + + +#### Scrollscan + +```bash +forge verify-contract \ + --verifier-url https://api-sepolia.scrollscan.com/api \ + --etherscan-api-key \ + --constructor-args +``` + + +#### Blockscout + +将验证提供者指定为 `blockscout`。 + +##### Scroll +```bash +forge verify-contract \ + --verifier-url https://blockscout.scroll.io/api\? \ + --verifier blockscout \ + --constructor-args +``` + +##### Scroll Sepolia +```bash +forge verify-contract \ + --verifier-url https://sepolia-blockscout.scroll.io/api\? \ + --verifier blockscout \ + --constructor-args +``` + + diff --git a/src/content/docs/zh/getting-started/overview.md b/src/content/docs/zh/getting-started/overview.md new file mode 100644 index 000000000..a404cbd45 --- /dev/null +++ b/src/content/docs/zh/getting-started/overview.md @@ -0,0 +1,41 @@ +--- +section: gettingStarted +date: Last Modified +title: "Scroll概览" +lang: "zh" +permalink: "docs/conceptual-overview/" +excerpt: "ZK Rollups and Scroll" +whatsnext: { "用户指南": "/zh/user-guide/", "在Scroll上开发": "/zh/developers/" } +--- + +#### 欢迎来到 Scroll 的文档 + +Scroll 是以安全为中心的以太坊扩容解决方案,通过设计上的创新和零知识证明在以太坊上构建 Layer2。与以太坊相比,Scroll 网络更易于访问,响应更快,并且可以同时支持更多用户,如果您曾经在以太坊上使用或开发过应用程序,那么您在 Scroll 上开发会和到家了一样感到熟悉和亲切。 + +想试用 Scroll 的 Sepolia 测试网吗?请查看我们的 [用户指南](/zh/user-guide/)。 + +## Scroll 在构建什么? + +Scroll 正在构建扩容以太坊的技术。 + +虽然以太坊是用于为去中心化应用程序提供动力的领先区块链网络,但它的普及也带来了更高的成本,为下一波用户和开发人员的采用创造了障碍。 + +利用零知识证明(zero knowledge proofs,“zk”)的前沿研究,Scroll 正在以太坊上构建二层 Rollup 网络。Scroll 团队通过开源合作的方式,与以太坊社区中的其他人共同创建了“zkEVM”,允许网络上的所有交易活动(就像以太坊一样)通过以太坊上的智能合约进行安全保证。Scroll 网络会将所有交易发布到以太坊,zkEVM 创建并发布加密“证明”,证明 Scroll 网络遵循了以太坊的规则。 + +最终,以太坊智能合约将通过每笔证明验证 Scroll 上的每笔交易都是有效的,为网络提供了难以置信的安全性,去中心化和抗审查性。继承以太坊的这种安全性和可扩展性只有在零知识证明密码学、区块链协议设计和硬件加速方面的最新突破下,才可能实现。 + + + +关于我们架构的详细信息,请参阅[Scroll 架构](/zh/technology/). + +## 现在可以使用 Scroll 吗? + +Scroll 在以太坊上的主网已经上线!我们还在以太坊 Sepolia 上运行了一个测试网,即 Scroll Sepolia 测试网。 虽然我们有一个 [完整指南](zh//user-guide/), 但如果您熟悉以太坊,您可以在几分钟内就开始使用: + +- 访问我们的 [跨链桥](https://scroll.io/bridge) 或 [Scroll Sepolia 跨链桥](https://sepolia.scroll.io/bridge) 并连接您的钱包。 +- 从以太坊主网发送代币到 Scroll(或使用 Scroll Sepolia 的 [水龙头](/user-guide/faucet))。 +- 尝试使用 Scroll Sepolia 测试网的 dApp,比如我们的 [Uniswap 展示](http://uniswap-showcase.sepolia.scroll.xyz/) 或者 [Aave](https://app.aave.com/),只需确保选择了 Scroll Sepolia 网络! + +## Scroll 的未来方向? + +我们已经在以太坊上发布了我们的主网,但还有更多工作要做,接下来将去中心化堆栈的每个组件。查看 [我们的路线图](https://scroll.io) 或者关注 [我们的 Discord](https://discord.gg/scroll) 或者 [Twitter](https://twitter.com/scroll_zkp)。 diff --git a/src/content/docs/zh/learn/index.mdx b/src/content/docs/zh/learn/index.mdx new file mode 100644 index 000000000..f670971d2 --- /dev/null +++ b/src/content/docs/zh/learn/index.mdx @@ -0,0 +1,30 @@ +--- +section: learn +title: "学习" +lang: "zh" +permalink: "learn/" +excerpt: "Learn more about Ethereum scalability and zero knowledge cryptography." +--- + +import NavCard from "../../../../components/NavCard.astro" +import TechnologySvg from "../../../../assets/svgs/home/home-technology.svg?raw" +import LearnSvg from "../../../../assets/svgs/home/home-learn.svg?raw" + +Scroll 汇集了区块链协议和零知识证明密码学的研究和工程资料。如果您想更深入地了解,请继续阅读并查看补充资料。 + +想要看到我们覆盖特定的话题吗?快来我们的 Github 仓库中创建 [issue](https://github.com/scroll-tech/scroll-documentation/issues/new?assignees=&labels=new+content%2Ctriage&projects=&template=new_content.yml&title=%5BNew+Content%5D%3A+%3Cyour-title-here%3E)。 + + diff --git a/src/content/docs/zh/learn/intro-to-rollups.md b/src/content/docs/zh/learn/intro-to-rollups.md new file mode 100644 index 000000000..3178e2f01 --- /dev/null +++ b/src/content/docs/zh/learn/intro-to-rollups.md @@ -0,0 +1,51 @@ +--- +section: learn +date: Last Modified +title: "Rollups 介绍" +lang: "zh" +permalink: "learn/intro-to-rollups" +excerpt: "Rollups are the most predominant layer 2 scaling solution in the Ethereum ecosystem." +whatsnext: { "Scroll Rollup Process": "/zh/technology/chain/rollup" } +--- + +## 什么是 rollup? + +Rollups 是以太坊生态系统中最主要的 L2 扩容解决方案,被视为以太坊路线图的 [核心部分](https://ethereum-magicians.org/t/a-rollup-centric-ethereum-roadmap/4698)。 + +Rollup 在链下(即不在 L1 )处理交易的批次,然后将结果数据发布到链上(即在 L1)。 + +每笔交易的执行都是在链下执行的,不需要在 L1 节点上重新执行。这可以大幅提高交易的吞吐量,而不会影响 L1 的去中心化。 + +为了确保 rollup 的安全,它必须证明其链下计算(交易处理)已经正确执行。证明链下计算有效性的机制主要有两种:有效性证明和欺诈证明。 + +## 什么是 optimistic rollup? + +Optimistic rollup 是使用欺诈证明来确保其计算有效性的 rollup。 + +欺诈证明机制下,允许用户挑战和证明在 L2 上执行的任何计算是无效的。如果成功提交欺诈证明,则可以将 L2 回滚到之前的状态,从而更正无效的计算。欺诈证明基于至少有一个诚实的一方在检查 L2 交易是否正确执行。 + +## 什么是 ZK rollup? + +ZK rollup 是使用有效性证明来确保其计算有效性的 rollup。 + +当 ZK rollup 执行交易的批次并将结果状态发布到 L1 时,它还会发布有效性证明。这个数学证明,可以证明结果状态确实是正确执行一批交易后所生成的状态。 + +如今,有多种类型的 ZK rollup,广义上定义为 zkVM(零知识虚拟机)或 zkEVM(零知识以太坊虚拟机)。 + +zkVM 从头开始设计,可与 ZK 电路很好地配合使用,并且与 zkEVM 相比,需要完全不同的开发工作流程。其中的例子包括 Starkware 和 Aztec。 + +zkEVM 旨在模拟 EVM。zkEVM 主要有两种类型:字节码层面兼容和语言层面兼容。字节码兼容的 zkEVM 在非常低的水平上模拟 EVM,与以太坊 L1 相比,可实现几乎相同的开发和用户体验。语言层面兼容的 zkEVM 将 Solidity 和其他高级语言编译为不同的字节码,这可能会导致工作流程发生变化。zkSync 是最流行的语言层面兼容的 zkEVM。 + +Scroll 是字节码兼容的。之所以选择这种方案,是因为它带来了如下好处: + +- Solidity, Vyper 和 Huff 开箱即用 +- 无需重新进行合约审计 +- 继承大多数现有工具 +- 与以太坊几乎相同的用户体验和开发者体验 + +有关 Scroll 方案的更多详细信息,请参阅“技术”部分。 + +## 延伸阅读 + +- [Rollups 的不完全指南](https://vitalik.ca/general/2021/01/05/rollup.html) - Vitalik Buterin +- [扩容](https://ethereum.org/en/developers/docs/scaling/) - 以太坊文档 diff --git a/src/content/docs/zh/learn/the-scalability-problem.md b/src/content/docs/zh/learn/the-scalability-problem.md new file mode 100644 index 000000000..263b41473 --- /dev/null +++ b/src/content/docs/zh/learn/the-scalability-problem.md @@ -0,0 +1,27 @@ +--- +section: learn +date: Last Modified +title: "扩容问题" +lang: "zh" +permalink: "learn/intro-to-rollups" +excerpt: "以太坊强大的去中心化和安全性是以牺牲可扩展性为代价的:为了确保所有参与节点都能跟上网络的进度,网络的吞吐量是有限的。这样的限制最终会导致用户端的成本和延迟增加。" +whatsnext: { "Rollups 介绍": "/zh/learn/intro-to-rollups" } +--- + +## 以太坊的扩容问题 + +[以太坊](https://ethereum.org/en/developers/docs/intro-to-ethereum/#what-is-ethereum) 是一个通用的区块链平台,支持 [智能合约](https://ethereum.org/en/developers/docs/intro-to-ethereum/#what-are-smart-contracts) 的部署和执行。 + +以太坊的核心价值是它坚持于安全和去中心化。以太坊的设计使得世界各地的计算机(甚至是便宜的计算机,如 [树莓派](https://ethereum-on-arm-documentation.readthedocs.io/))都可以参与网络,运行区块链的本地节点并处理新交易。 + +然而,以太坊强大的去中心化和安全性是以牺牲可扩展性为代价的:为了确保所有参与节点都能跟上网络的进度,网络的吞吐量是有限的。这样的限制最终会导致用户端的成本和延迟增加。 + +## 扩容解决方案 + +以太坊的扩容解决方案旨在在不牺牲去中心化或安全性的情况下提高网络的吞吐量。 + +扩容解决方案主要有两种类型:一层(Layer 1)扩容解决方案和二层(Layer 2)扩容解决方案。 + +**Layer 1** (后文简称 **L1**) 扩容解决方案尝试通过直接修改以太坊区块链来扩展网络。这里的术语“Layer 1”是指核心的以太坊区块链。通常,很难设计出能够提高吞吐量并同时保持高级别安全性和去中心化的一层扩展解决方案。因此,最近的扩容工作已从一层解决方案转向二层解决方案。 + +**Layer 2** (后文简称 **L2**) 扩容解决方案是位于以太坊一层之上的网络 - 它们本质上是独立的区块链,以某种方式“锚定”到底层以太坊区块链。这些二层网络通常可以比底层网络以更高的速率处理交易,因为它们不受相同的限制。“锚定”机制的细节在各个二层中有所不同,使二层网络能够继承以太坊一层网络的强大安全性和去中心化性。 diff --git a/src/content/docs/zh/learn/zero-knowledge/additional-zk-learning-resources.md b/src/content/docs/zh/learn/zero-knowledge/additional-zk-learning-resources.md new file mode 100644 index 000000000..c750f9810 --- /dev/null +++ b/src/content/docs/zh/learn/zero-knowledge/additional-zk-learning-resources.md @@ -0,0 +1,26 @@ +--- +section: learn +date: Last Modified +title: "其他 ZK 学习资源" +lang: "zh" +permalink: "learn/zero-knowledge/additional-zk-learning-resources" +excerpt: "想要更深入学习 ZK?以下是我们最收藏的一些资源。" +--- + +想要更深入学习 ZK?以下是我们最收藏的一些资源。 + +## 视频 + +- [ZK Whiteboard Sessions](https://youtube.com/playlist?list=PLj80z0cJm8QErn3akRcqvxUsyXWC81OGq) + - ZK Whiteboard Sessions 系列是了解 ZK 的绝佳方式。Dan Boneh 的前三场演讲提供了一个很好的基础况下,以下讲座在此基础上讨论了最近的发展。 +- [Zero Knowledge Proofs MOOC](https://youtube.com/playlist?list=PLS01nW3Rtgor_yJmQsGBZAg5XM4TSGpPs) + - 涵盖了零知识证明的第一性原理到行业前沿话题的慕课 +- [The 9th BIU Winter School on Cryptography - Zero Knowledge](https://youtube.com/playlist?list=PL8Vt-7cSFnw29cLUVqAIuMlg1QJ-szV0K) + - 这些讲座需要一定的零知识理论基础 —— 它们所针对的是具有数学背景的学者和听众。 +- [ZK Symposium](https://www.youtube.com/playlist?list=PLrzRr7okCcmbAlgYpuFjzUJv8tAyowDQY) + - 来自零知识证明领域一些顶级研究员和产品开发者的应用和理论演讲的合集。 + +## 文档 + +- [Proofs, Arguments, and Zero Knowledge](https://people.cs.georgetown.edu/jthaler/ProofsArgsAndZK.html) - Justin Thaler + - 一本关于零知识理论的综合教科书。 diff --git a/src/content/docs/zh/learn/zero-knowledge/introduction-to-zero-knowledge.mdx b/src/content/docs/zh/learn/zero-knowledge/introduction-to-zero-knowledge.mdx new file mode 100644 index 000000000..b6523eecb --- /dev/null +++ b/src/content/docs/zh/learn/zero-knowledge/introduction-to-zero-knowledge.mdx @@ -0,0 +1,85 @@ +--- +section: learn +date: Last Modified +title: "零知识证明介绍" +lang: "zh" +permalink: "learn/zero-knowledge/introduction-to-zero-knowledge" +whatsnext: { "多项式承诺方案": "/zh/learn/zero-knowledge/polynomial-commitment-schemes" } +excerpt: '在过去的十年中,称为“零知识证明”的密码学领域一直在迅速发展。它提供了构建应用程序的新范式,并使协议能够提高效率、安全性和隐私性。' +--- + +import Aside from "../../../../../components/Aside.astro" + +在过去的十年中,称为“零知识证明”的密码学领域一直在迅速发展。它提供了构建应用程序的新范式,并使协议能够提高效率、安全性和隐私性。 + +让我们看看是什么让零知识证明领域如此令人兴奋,以及它帮助工程师解决了哪些问题。 + +## 无需信任的区块链和可验证性 + +区块链通常用于处理用户提交的交易。这些交易通常会触发区块链所需执行的一些计算。 + +为了使区块链是无需信任的(即不依赖于信任单独的一方),网络中的参与者必须可以验证交易是否有效,以及它们所含的计算是否正确执行。 + +验证交易是否有效通常需要数字签名验证 - 这需要验证交易的发送方确实是交易的发起人。验证交易的计算是否正确执行通常需要在本地重新执行交易。 + +## 可验证性的局限性 + +这种验证每个交易的方法在验证者无法重新运行计算的情况下会面临崩溃。 +参与者出于某些原因可能无法重新执行计算,例如: +(1)(出于隐私原因)某些数据可能不应当公开,或者(2)对于参与验证的计算机来说,重新执行所有交易可能太昂贵了 - 在考虑每秒有大量交易的高吞吐量区块链时,第二个原因尤其重要。 + +## 零知识证明的力量 + +零知识证明 (以下简称 ZKP) 有克服这些限制的神奇魔力。 + +ZKP 允许验证者验证计算结果,同时 (1) 保护计算中所使用的任何敏感数据的隐私,以及 (2) 验证比重新执行计算便宜得多。ZKP 的这两个性质分别称为 **零知识** 和 **简洁性** 。 + +ZKP 的上述特性在无需信任的区块链的可验证性方面非常有用。 +如果没有 ZKP,验证者需要重新执行每笔交易的计算结果。这要求所有验证者都能看到每次计算中使用的所有(潜在敏感)数据,这也限制了整个系统的吞吐量。 +使用 ZKP,一方可以执行计算,然后生成计算正确执行的证明。其他参与方可以通过验证证明是否有效来验证计算是否正确执行,而无需自己重新执行计算。 +验证证明 (1) 不会泄露有关原始计算中使用的敏感数据的信息,并且 (2) 在计算上比重新执行原始计算便宜得多。这两个属性将为无需信任的区块链实现隐私和可扩展性。 + +## 电路、证明和验证器 + +在实践中,ZKP 在系统中的实现可能非常复杂,但在概览的层面,您需要了解零知识证明有几个组件:电路、证明和验证器。 + +电路是一个程序,它接收输入数据,并根据输入数据必须满足的一些“约束”来确保输入数据是有效的。输入数据可以是公开的(每个人都知道)、隐私的(只有证明者知道)或混合的(有些输入是公开的,有些是隐私的)。 + +证明生成可以用来确保满足电路。证明不会泄漏有关隐私输入的信息,并且非常之小。 + +验证器可以验真 (1) 证明是否有效,(2) 证明是否符合电路规定的约束(而不仅仅是虚假证明),以及 (3) 用于生成证明的公开输入是否与验证器使用的输入像匹配。请注意,验证器执行的此类检查通常是一种开销较低的计算 + + + +### 电路、证明和验证器 — 一个例子 + +让我们以数独为例。假设有一个数独题,爱丽丝想向鲍勃证明她知道谜题的答案,但不想透露答案是什么。 + +在这种情况下,特定的谜题将是一个公开输入(Alice 和 Bob 都知道它),而解决方案是一个隐私输入(Alice 知道它,但会对 Bob 保密)。**电路** 将接受这两个输入,并通过以标准方法、逐行逐列地检查答案来断言答案是正确的。 +电路在这个例子中,约束了隐私输入的答案确实是公开输入的谜题的解,并且电路只有在答案检查通过时才“满足”。 + +然后即可以生成一个 **证明** ,说明爱丽丝知道满足特定谜题电路(公开输入)的隐私输入。 + +证明可以和谜题一起传递给鲍勃,然后鲍勃可以使用与数独检查电路相对应的 **验证器** 来判断证明是否有效,从而证明爱丽丝确实知道谜题的解。最重要的是,鲍勃没有获得任何关于爱丽丝所知道的解的信息,但他仍然可以验证她是否知道有效的解! + +## 零知识证明和区块链 + +ZKPs 最近取得进展的主要原因是它在区块链中的应用。 +去中心化区块链面临的两个关键挑战是隐私和可扩展性 —— 所有数据都是公开的,网络中的每个节点都必须在网络上重新执行每个计算。 +ZKP 可以帮助解决这两个挑战。 + +虽然有一些项目利用 ZKP 的零知识特性来构建隐私保护的应用程序,但我们 Scroll 仅使用了 ZKP 的简洁性来扩容以太坊。 + +## Scroll 和零知识证明 + +驱动 Scroll 的想法非常简单。如果我们可以使用以太坊智能合约来验证另一个版本的以太坊的所有计算呢?我们可以运行另一个网络,提供对以太坊虚拟机(“EVM”)的更快、更便宜的访问,而以太坊本身将提供验证所有计算所需的安全性,并确保另一个网络不会违反 EVM 规范。 + +“学习”和“技术”部分的其余部分更详细地讲解了其工作原理, +但简单理解,只需记住,零知识依赖于电路、证明和验证器。 + +在我们的架构中,电路(实际上是一组电路)对 EVM 的规则进行了编码,来“约束”对链状态更改的输入交易的可接受行为。 +使用这个“zkEVM”,GPU 网络获取一组区块的交易并生成证明。 +然后回到以太坊,智能合约将验证该批次交易的证明,证明需要与智能合约中所规定的电路相匹配。 +如果确实满足,这些交易可以被认为是“最终确认的”,网络将向前推进,而我们已经为以太坊的发展创造了快速、安全和可负担得起的区块空间。 \ No newline at end of file diff --git a/src/content/docs/zh/learn/zero-knowledge/kzg-commitment-scheme.md b/src/content/docs/zh/learn/zero-knowledge/kzg-commitment-scheme.md new file mode 100644 index 000000000..914c59fa0 --- /dev/null +++ b/src/content/docs/zh/learn/zero-knowledge/kzg-commitment-scheme.md @@ -0,0 +1,70 @@ +--- +section: learn +date: Last Modified +title: "KZG 承诺方案" +lang: "zh" +permalink: "learn/zero-knowledge/kzg-commitment-scheme" +excerpt: "KZG 用于以太坊的 Proto-Danksharding,也用于 Scroll 的证明系统。本节将概述 KZG 承诺方案。" +whatsnext: { "其他资源": "/zh/learn/zero-knowledge/additional-zk-learning-resources" } +--- + +使用最广泛的多项式承诺方案之一是 KZG 承诺方案。该方案最早由 Kate、Zaverucha 和 Goldberg 于 2010 年[发布](https://www.iacr.org/archive/asiacrypt2010/6477178/6477178.pdf)。 + +KZG 用于以太坊的 [Proto-Danksharding](https://notes.ethereum.org/@vbuterin/proto_danksharding_faq), 也用于 Scroll 的证明系统。 + +本节将概述 KZG 承诺方案。 + +## 初步工作和符号表示 + +回顾一下多项式承诺方案的假设,我们需要对一些多项式 $P(x)$ 进行承诺。我们假设多项式的阶数小于 $l$. + +KZG 承诺依赖于 [椭圆曲线配对](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)。假设 $\mathbb{G}_1$ 和 $\mathbb{G}_2$ 是两个阶为 $p$ 的椭圆曲线群,满足 non-trivial [双线性配对](https://en.wikipedia.org/wiki/Bilinear_map) $e: \mathbb{G}_1 \times \mathbb{G}_2 \rightarrow \mathbb{G}_T$。假设 $g$ 是群 $\mathbb{G}_1$ 的生成元,$h$ 是群 $\mathbb{G}_2$ 的生成元。我们使用符号表示为 $[x]_1 := x \cdot g$ 和 $[x]_2 := x \cdot h$,其中 $x \in \mathbb{F}_p$. + +## 1. 可信设置 + +在计算任何 KZG 承诺之前,必须执行一次性的可信设置。一旦可信设置完成,就可以重复使用它来承诺和揭示所需的任意数量的不同多项式。可信设置的工作流程如下: + +- 选择随机的域元素 $\tau \in \mathbb{F}_p$ +- 假设 $l \in \mathbb{Z}$ 是我们想要承诺的多项式的最大次数 + - 可信设置只能阶数 $\leq l$ 的多项式有效 +- 计算 $([\tau^0]_1,[\tau^1]_1,[\tau^{2}]_1\ldots,[\tau^{l}]_1)$ 和 $([\tau]_2)$,并公开发布这些值。 + +请注意,$\tau$ 不应该被揭示 - 它是可信设置的秘密参数,应在可信设置仪式完成后丢弃,以便没有人知道它的值。 + +使用[多方计算](https://en.wikipedia.org/wiki/Secure_multi-party_computation) (MPC) 在弱信任假设(N 个信任假设中为 1 个)的情况下,有一些已有的方法来执行可信设置仪式。有关可信设置如何工作的更多信息,请参阅 Vitalik 的这篇[文章](https://vitalik.ca/general/2022/03/14/trustedsetup.html)。 + +## 2. 承诺多项式 + +- 给定 $P(x) = \sum_{i=0}^{l} p_i x^i$ +- 计算并输出承诺 $c = [P(\tau)]_1$ + - 虽然承诺者不能直接计算 $P(\tau)$ (因为他不知道 $\tau$),但他可以使用可信设置的输出来计算它: + - $[P(\tau)]_1 = [\sum_{i=0}^{l} p_i \tau^i]_1 = \sum_{i=0}^{l} p_i [\tau^i]_1$ + +## 3. 证明求值 + +- 给定多项式的点求值 $P(a) = b$ +- 计算并输出证明 $\pi = [Q(\tau)]_1$ + - 其中 $Q(x) := \frac{P(x)-b}{x-a}$ + - 这称为“商多项式”。请注意,当且仅当 $P(a) = b$ 时,存在 $Q(x)$。因此,这个商多项式的存在可以作为求值的证明。 + +## 4. 验证求值证明 + +- 给定承诺 $c = [P(\tau)]_1$, 求值 $P(a) = b$ 和证明 $\pi = [Q(\tau)]_1$ +- 验证 $e(\pi, [\tau - a]_2) = e(c - [b]_1, h)$ + - 根据代数推导,这等价于检查商多项式是否正确构造 $\tau$: $Q(\tau) = \frac{P(\tau) -b}{\tau-a}$ + $$ + \begin{align*} + & e(\pi, [\tau - a]_2) = e(c - [b]_1, h) \\ \iff + & e([Q(\tau)]_1, [\tau -a]_2) = e([P(\tau)]_1 - [b]_1, h) \\ \iff + & Q(\tau) \cdot (\tau - a) \cdot e(g, h) = (P(\tau)-b) \cdot e(g,h) \\ \iff + & Q(\tau) \cdot (\tau -a) = P(\tau) - b + \end{align*} + $$ + - 双线性映射 $e$ 使我们能够在不知道秘密设置参数 $\tau$ 的情况下检验该属性。 +- 一旦验证完成,我们可以(以极高的概率)得出结论:商多项式是正确构造的,因此计算是正确的。 + +## 了解更多 + +- [https://dankradfeist.de/ethereum/2020/06/16/kate-polynomial-commitments.html](https://dankradfeist.de/ethereum/2020/06/16/kate-polynomial-commitments.html) +- [https://alinush.github.io/2020/05/06/kzg-polynomial-commitments.html](https://alinush.github.io/2020/05/06/kzg-polynomial-commitments.html) +- [https://www.iacr.org/archive/asiacrypt2010/6477178/6477178.pdf](https://www.iacr.org/archive/asiacrypt2010/6477178/6477178.pdf) diff --git a/src/content/docs/zh/learn/zero-knowledge/polynomial-commitment-schemes.md b/src/content/docs/zh/learn/zero-knowledge/polynomial-commitment-schemes.md new file mode 100644 index 000000000..a2739f1f0 --- /dev/null +++ b/src/content/docs/zh/learn/zero-knowledge/polynomial-commitment-schemes.md @@ -0,0 +1,35 @@ +--- +section: learn +date: Last Modified +title: "多项式承诺方案" +lang: "zh" +permalink: "learn/zero-knowledge/polynomial-commitment-schemes" +excerpt: "多项式承诺方案是零知识证明系统(以及其他加密协议)的核心组成部分" +whatsnext: { "KZG 承诺方案": "/zh/learn/zero-knowledge/kzg-commitment-scheme" } +--- + +多项式承诺方案是零知识证明系统(以及其他加密协议)的核心组成部分。 + +顾名思义,多项式承诺方案是承诺方案,其中要承诺的对象是多项式。这类方案的一个特殊属性是,多项式的计算可以通过仅访问多项式的承诺来验证。 + +## 承诺方案 + +A **[承诺方案](https://en.wikipedia.org/wiki/Commitment_scheme)** 是一种加密原语,涉及两方:_承诺者_ 和 _验证者_。承诺者对值 $v$ 进行计算承诺 $c$,并将其揭示给验证者。随后,承诺者可以揭示原始值,验证者可以验证承诺是否与所揭示的原始值相对应。 + +安全的承诺方案有两个属性: + +1. **绑定**: 一旦发布承诺 $c$,承诺者就无法找到与 $v$ 不同的值 $v’$ 与承诺 $c$ 相对应。也就是说,承诺 $c$ 将承诺者与他的原始价值 $v$ 绑定。 +2. **隐藏**: 验证者无法从承诺 $c$ 中获知有关原始值 $v$ 的任何信息。也就是说,承诺 $c$ 隐藏了有关原始值 $v$ 的所有信息。 + +## 多项式承诺方案 + +**多项式承诺方案** 中,承诺者通过计算承诺 $c$,对多项式 $P(x)$ 进行承诺。与常规的承诺方案一样,承诺者稍后可以揭示原始多项式,验证者可以检查承诺是否与所揭示的多项式相对应。然而,多项式承诺方案还有一个额外的属性:承诺者可以在不透露多项式本身的情况下证明对所承诺多项式的特定计算。例如,承诺者可以证明多项式上的一点 $P(a) = b$, 而验证者可以仅使用承诺 $c$ 来验证这样的证明。 + +多项式承诺方案在零知识应用中非常有用。证明者可以使用这样的方案来证明他知道一些满足某些性质的多项式(例如,它通过某个特定的点 $(a,b)$),而无需揭示潜在的多项式。 + +多项式方案有用的另一个原因是,承诺  $c$  通常比它所表示的多项式小得多,因此可以认为是多项式 $P(x)$ 的**压缩**。压缩的程度取决于特定的方案。例如,在 KZG 多项式承诺方案中,任意大小次数的多项式可以压缩为由单个群元素组成的承诺。 + +## 了解更多 + +- [https://en.wikipedia.org/wiki/Commitment_scheme](https://en.wikipedia.org/wiki/Commitment_scheme) +- [https://learn.0xparc.org/materials/halo2/miscellaneous/polynomial-commitment](https://learn.0xparc.org/materials/halo2/miscellaneous/polynomial-commitment) diff --git a/src/content/docs/zh/technology/_images/L1-to-L2.png b/src/content/docs/zh/technology/_images/L1-to-L2.png new file mode 100644 index 000000000..89d140909 Binary files /dev/null and b/src/content/docs/zh/technology/_images/L1-to-L2.png differ diff --git a/src/content/docs/zh/technology/_images/L2-to-L1.png b/src/content/docs/zh/technology/_images/L2-to-L1.png new file mode 100644 index 000000000..0e8cbbf87 Binary files /dev/null and b/src/content/docs/zh/technology/_images/L2-to-L1.png differ diff --git a/src/content/docs/zh/technology/_images/arch.png b/src/content/docs/zh/technology/_images/arch.png new file mode 100644 index 000000000..7c0b2db02 Binary files /dev/null and b/src/content/docs/zh/technology/_images/arch.png differ diff --git a/src/content/docs/zh/technology/_images/batching.png b/src/content/docs/zh/technology/_images/batching.png new file mode 100644 index 000000000..a101859bb Binary files /dev/null and b/src/content/docs/zh/technology/_images/batching.png differ diff --git a/src/content/docs/zh/technology/_images/deposit.png b/src/content/docs/zh/technology/_images/deposit.png new file mode 100644 index 000000000..1ba61ec9c Binary files /dev/null and b/src/content/docs/zh/technology/_images/deposit.png differ diff --git a/src/content/docs/zh/technology/_images/rollup.png b/src/content/docs/zh/technology/_images/rollup.png new file mode 100644 index 000000000..345826c28 Binary files /dev/null and b/src/content/docs/zh/technology/_images/rollup.png differ diff --git a/src/content/docs/zh/technology/_images/withdraw-trie.png b/src/content/docs/zh/technology/_images/withdraw-trie.png new file mode 100644 index 000000000..fe602e973 Binary files /dev/null and b/src/content/docs/zh/technology/_images/withdraw-trie.png differ diff --git a/src/content/docs/zh/technology/_images/withdraw.png b/src/content/docs/zh/technology/_images/withdraw.png new file mode 100644 index 000000000..faecae833 Binary files /dev/null and b/src/content/docs/zh/technology/_images/withdraw.png differ diff --git a/src/content/docs/zh/technology/_images/zkevm1.png b/src/content/docs/zh/technology/_images/zkevm1.png new file mode 100644 index 000000000..39f45db33 Binary files /dev/null and b/src/content/docs/zh/technology/_images/zkevm1.png differ diff --git a/src/content/docs/zh/technology/_images/zkevm2.png b/src/content/docs/zh/technology/_images/zkevm2.png new file mode 100644 index 000000000..4e5ff8a2a Binary files /dev/null and b/src/content/docs/zh/technology/_images/zkevm2.png differ diff --git a/src/content/docs/zh/technology/_images/zkevm3.png b/src/content/docs/zh/technology/_images/zkevm3.png new file mode 100644 index 000000000..31e268f23 Binary files /dev/null and b/src/content/docs/zh/technology/_images/zkevm3.png differ diff --git a/src/content/docs/zh/technology/_images/zktrie-arch.png b/src/content/docs/zh/technology/_images/zktrie-arch.png new file mode 100644 index 000000000..38f74e6f8 Binary files /dev/null and b/src/content/docs/zh/technology/_images/zktrie-arch.png differ diff --git a/src/content/docs/zh/technology/_images/zktrie-deletion.png b/src/content/docs/zh/technology/_images/zktrie-deletion.png new file mode 100644 index 000000000..c47fc7267 Binary files /dev/null and b/src/content/docs/zh/technology/_images/zktrie-deletion.png differ diff --git a/src/content/docs/zh/technology/_images/zktrie-insertion.png b/src/content/docs/zh/technology/_images/zktrie-insertion.png new file mode 100644 index 000000000..da0ae521a Binary files /dev/null and b/src/content/docs/zh/technology/_images/zktrie-insertion.png differ diff --git a/src/content/docs/zh/technology/bridge/cross-domain-messaging.mdx b/src/content/docs/zh/technology/bridge/cross-domain-messaging.mdx new file mode 100644 index 000000000..d7f2f5e4a --- /dev/null +++ b/src/content/docs/zh/technology/bridge/cross-domain-messaging.mdx @@ -0,0 +1,278 @@ +--- +section: technology +date: Last Modified +title: "跨链消息传递" +lang: "zh" +permalink: "technology/bridge/cross-domain-messaging" +whatsnext: { "存款网关": "/zh/technology/bridge/deposit-gateways/" } +--- + +import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import ToggleElement from "../../../../../components/ToggleElement.astro" + +import L1ToL2 from "../_images/L1-to-L2.png" +import L2ToL1 from "../_images/L2-to-L1.png" +import WithdrawTrie from "../_images/withdraw-trie.png" + +Scroll 有任意消息传递的跨链桥,可实现代币传输,并允许去中心化应用在 Layer 1 和 Layer 2 之间进行通信。这意味着Layer 1的去中心化应用可以触发 Layer 2 的合约方法,反之亦然。接下来,我们将解释如何在 Layer 1 和 Layer 2 之间中继消息。 + +## 从 L1 向 L2 发送消息 + + + +将消息从 L1 发送到 L2 有两种主要方法: +通过`L1ScrollMessenger`合约发送任意消息,或是通过 `EnforcedTxGateway` 合约发送强制交易。 +这两种方法都允许用户在 L1 上发起 L2 交易,并在 L2 上调用任意合约。 +对于任意消息,L2 交易的发送方是别名,是 `L1ScrollMessenger` 合约的地址。 +对于强制交易,L2 发送方是外部所有者帐户(EOA)。 +此外,我们还提供多种标准代币网关,使用户更容易存入ETH和其他标准代币,包括ERC-20、ERC-677、ERC-721和ERC-1155。 +从本质上讲,这些网关将代币存款编码为消息,并通过 `L1ScrollMessenger` 合约将其发送给 L2 上的对应方。 +你可以在[存款网关](/technology/bridge/deposit-gateways)中找到更多关于 L1 代币网关的信息。 + +如图 1 所示,任意消息和强制交易都将增加到存储在 `L1MessageQueue` 合约的消息队列中。合约 `L1MessageQueue` 提供两个方法 `appendCrossDomainMessage`,`appendEnforcedTransaction` 分别用于添加任意消息和强制交易。 + +```solidity +/// @notice Append an arbitrary L1-to-L2 message into this contract. +/// @param target The target address on L2. +/// @param gasLimit The maximum gas can be used for this transaction on L2. +/// @param data The calldata of the L1-initiated transaction. +function appendCrossDomainMessage( + address target, + uint256 gasLimit, + bytes calldata data +) external; + +/// @notice Append an enforced transaction to this contract. +/// @param sender The sender address of this transaction. +/// @param target The target address of this transaction. +/// @param value The value to be transferred on L2. +/// @param gasLimit The maximum gas should be used for this transaction on L2. +/// @param data The calldata of the L1-initiated transaction. +function appendEnforcedTransaction( + address sender, + address target, + uint256 value, + uint256 gasLimit, + bytes calldata data +) external; +``` + +这两个方法都使用 Scroll 链中引入的新交易类型 `L1MessageTx` 构造 L1 发起的交易,并计算交易哈希(更多详细信息请参阅[L1 消息交易](/technology/chain/transactions#l1-message-transaction)中)。 +随后,`L1MessageQueue` 将交易哈希增加到消息队列中,并发出事件 `QueueTransaction(sender, target, value, queueIndex, gasLimit, calldata)`。 +在构造 L1 消息交易时,`appendCrossDomainMessage` 和 `appendEnforcedTransaction` 的区别是: + +- `appendCrossDomainMessage` 只能被 `L1ScrollMessenger` 合约所调用,并且其 `msg.sender` 使用 [别名地址](#address-alias),即`L1ScrollMessenger`地址作为交易发送方。 +- `appendEnforcedTransaction` 只能被 `EnforcedTxGateway` 合约所调用,并且其 `sender` 使用方法的参数作为交易的发送方。这允许用户通过跨链桥强制从 L2 提款或转账。 + +在 L1 上成功执行交易后,Scroll 排序器中的观察程序将监听 `L1MessageQueue` 合约,从 L1 区块收集新的 `QueueTransaction` 事件。 +然后,排序器为每个事件构造一个新的 `L1MessageTx` 交易,并将其添加到其本地 L1 交易队列中去。 +在构造新的 L2 区块时,排序器将包括来自其 L1 交易队列和 L2 内存池的交易。 +请注意,L1 消息交易必须按照 `L1MessageQueue` 合约中的 L1 消息队列顺序,按顺序包含在区块内。 +`L1MessageTx` 交易总是在 L2 区块排序在前,然后再是 L2 交易。 +目前,我们将 L2 区块中的 `L1MessageTx` 交易数量限制为 `NumL1MessagesPerBlock` (当前设置为 10)。 + +接下来,我们将进一步介绍通过 `L1ScrollMessenger` 发送任意消息,和通过 `EnforcedTxGateway` 发送强制交易的具体过程。 + +### 发送任意消息 + +合约 `L1ScrollMessenger` 提供了两个 `sendMessage` 函数来发送任意消息。唯一的区别是第二个允许用户指定发送方地址以外的退款地址来接收手续费退款。 + + +
sendMessage 函数签名
+```solidity +/// @param target The target address on L2. +/// @param value The value to deposit to L2 from `msg.value`. +/// @param message The message passed to target contract. +/// @param gasLimit The maximum gas can be used for this transaction on L2. +function sendMessage( + address target, + uint256 value, + bytes memory message, + uint256 gasLimit +) external payable; + +/// @param target The target address on L2. +/// @param value The value to deposit to L2 from `msg.value`. +/// @param message The message passed to target contract. +/// @param gasLimit The maximum gas can be used for this transaction on L2. +/// @param refundAddress The address to refund excessive fee on L1. +function sendMessage( + address target, + uint256 value, + bytes calldata message, + uint256 gasLimit, + address refundAddress +) external payable; +```` +
+ +这两个函数都需要用户在L2上为对应的 `L1MessageTx` 交易提供gas上限,并预付根据gas上限计算而来的 L1 的[消息中继费用](#message-relay-fee)。 +该费用通过 L1 上的 `feeVault` 合约收取。 +如果由于用户没有为其L1上的消息设置正确的 gas 上限而导致 L2 上的交易失败,则用户可以用更高的 gas 上限重放相同的消息。 +您可以在[重放失败消息](#retrying-failed-messages)部分,找到更多详细信息。但由于这些费用的任何未使用部分都会退还给用户,因此高估 gas 限制不会有任何惩罚。 + +`sendMessage` 函数将参数编码进跨链消息(请参考下面的代码片段),其中消息 nonce 是 L1 消息队列中下一条消息的索引值。然后,编码的数据将被用于在 L2 上执行的 `L1MessageTx` 交易中的调用数据(calldata)。 +请注意,此类跨链消息始终调用 L2 上 `L2ScrollMessenger` 合约的 `relayMessage` 函数。 + +```solidity +abi.encodeWithSignature( + "relayMessage(address,address,uint256,uint256,bytes)", + _sender, + _target, + _value, + _messageNonce, + _message +) +```` + +存入的 `value` 数量的 ETH 被锁定在 `L1ScrollMessenger` 合约中。 +如果消息中的 ETH 无法支付消息中继费和存入金额,则交易将被回退。 +`L1ScrollMessenger` 合约会将超出部分退还给指定的 `refundAddress` 或交易发送方。 +最后, `L1ScrollMessenger` 通过 `appendCrossDomainMessage` 方法将跨链消息添加到 `L1MessageQueue` 中。 + +### 发送强制交易 + +`EnforcedTxGateway` 合约提供了两个 `sendTransaction` 函数来发送强制交易。 +在第一个函数中,生成的 `L1MessageTx` 交易的发送方是交易发送方。 +而第二个函数中,使用传入的 `sender` 的地址作为 `L1MessageTx` 交易的发送方。 +这允许第三方代表用户发送强制交易并支付中继费。 +请注意,第二个函数需要提供与 `sender` 地址匹配的生成 `L1MessageTx` 交易的有效签名。 +这两个函数都要求 sendTransaction 发送方是外部所有者帐户(EOA)。 + + +
sendTransaction 函数签名
+ +```solidity +/// @param target The target address on L2. +/// @param value The value to withdraw from the `tx.origin` address on L2. +/// @param gasLimit The maximum gas can be used for this transaction on L2. +/// @param data The calldata passed to target contract. +function sendTransaction( + address target, + uint256 value, + uint256 gasLimit, + bytes calldata data +) external payable; + +/// @param sender The sender address who will initiate this transaction on L2. +/// @param target The target address on L2. +/// @param value The value to withdraw from the `sender` address on L2. +/// @param gasLimit The maximum gas can be used for this transaction on L2. +/// @param data The calldata passed to target contract. +/// @param signature The signature for the corresponding `L1MessageTx` transaction. +/// @param refundAddress The address to refund excessive fee on L1. +function sendTransaction( + address sender, + address target, + uint256 value, + uint256 gasLimit, + bytes calldata data, + bytes memory signature, + address refundAddress +) external payable; +``` + +
+ +与任意消息中继类似, `sendTransaction` 扣除消息中继费用后将其转入L1的 `feeVault` 账户。 +但一个关键的区别是,传递给函数的 `value` 代表的是发送方账户在 L2 上要转账的 ETH 数量,而不是在 L1 上。 +因此, `msg.value` 只需要[支付消息中继费](#message-relay-fee)。 +如果消息中的ETH数量无法支付费用,那么交易将失败。 +在第一个函数中,任何多余的费用将退还给交易发送方,在第二个函数,将退还给 `refundAddress` 地址。 +最后, `EnforcedTxGateway` 将调用 `L1MessageQueue.appendEnforcedTransaction` 将交易添加到消息队列中。 + +### 重放失败消息 + +如果由于gas不足而导致L2上的 `L1MessageTx` 交易失败,用户可以用更高的gas上限重放消息。 +`L1ScrollMessenger` 合约提供了 `replayMessage` 方法,允许用户发送与上一个失败消息相同的信息 ,但有更高的 gas 上限。 +该消息将成为 L2 上新的一条 `L1MessageTx` 交易。 +请注意,我们不会退还上一条失败交易的gas费,因为它已经在L2上进行处理。 + + +
replayMessage 函数签名
+ +```solidity +/// @param from The address of the sender of the message. +/// @param to The address of the recipient of the message. +/// @param value The msg.value passed to the message call. +/// @param queueIndex The queue index for the message to replay. +/// @param message The content of the message. +/// @param newGasLimit New gas limit to be used for this message. +/// @param refundAddress The address of account who will receive the refunded fee. +function replayMessage( + address from, + address to, + uint256 value, + uint256 queueIndex, + bytes memory message, + uint32 newGasLimit, + address refundAddress +) external payable; +``` + +
+ +由于 `L2ScrollMessenger` 合约记录了成功中继到 L2 的所有 L1 消息,因此如果原始消息成功,重放消息交易将在 L2 上被回退。 + +### 消息中继费 + +部署在 L1 上的 `L2GasPriceOracle` 合约会在给定消息的 gas 上限的情况下,计算消息的中继费用。 +该合约将 `l2BaseFee` 存储在其存储中,当前由 Scroll 运行的专用中继器更新。 +因此,L1 到 L2 的消息中继费为 `gasLimit * l2BaseFee` 。 + +### 地址别名(Address Alias) + +由于 `CREATE` 操作码,使得可以在 L1 和 L2 上的相同地址上部署字节码不同的合约。 +为避免恶意用户利用此漏洞,当消息发送方是 L1 上的合约时,跨链桥会应用地址别名。 +L1 消息交易的发送方地址别名为 `l1_contract_address + offset offset`,其中 `offset` 为 `0x1111000000000000000000000000000000001111`。 + +## 从 L2 向 L1 发送消息 + + + +在L2上,用户可以向 `L2ScrollMessenger` 合约发送任意消息来提取代币并调用L1合约。与L1类似,我们构建了几个标准代币网关,以便更容易地发起代币提款。有关L2代币网关的更多详细信息,请参阅[提款网关](/technology/bridge/withdraw-gateways)。 + +`L2ScrollMessenger` 合约还提供了一个 `sendMessage` 函数方法。 +与 `L1ScrollMessenger.sendMessage` 函数的区别在于,`L1ScrollMessenger.sendMessage` 省略了 `gasLimit` 参数,因为 L1 上的提现交易由用户提交,交易费直接在 L1 上支付。 +因此,L2的 `sendMessage` 函数要求 `msg.value` 等于参数 `value` +并将按照与 [`L1ScrollMessenger`](#sending-arbitrary-messages) 相同的机制将参数编码为跨链消息。 + + +
sendMessage 函数签名
+ +```solidity +/// @param target The target address on L1. +/// @param value The value to withdraw to L1 from `msg.value`. +/// @param message The message passed to target contract. +/// @param _gasLimit Ignored in the L2ScrollMessenger because the withdrawal execution on L1 is done by the user. +function sendMessage( + address target, + uint256 value, + bytes memory message, + uint256 _gasLimit +) external payable; +``` + +
+ +接下来, 通过调用其 `appendMessage` 函数将跨链消息哈希添加至 `L2MessageQueue`。 +`L2MessageQueue` 合约维护了 [提款树 (Withdraw Trie)](#withdraw-trie),一个仅支持新增的默克尔树。 +每次将新消息增加至队列时,合约都会将其插入提款树并更新树的根哈希。 + +在 L1 的rollup合约最终确认了包含用户从L2发送至L1消息的交易批次后, +用户需要提交相应的执行提款交易,来调用 `L1ScrollMessenger`合约的 `relayMessageWithProof` 方法,在L1上执行提款。 +由于默克尔树证明,L1上的提款交易的最终确认是无需信任的,可以由用户自己提交,也可以由第三方代替用户提交。 + +为了更容易地构建提款树的默克尔包含证明(Merkle Inclusion Proof,MIP),Scroll 维护了一个名为跨链桥历史记录 API 的服务。跨链桥历史记录 API 监听了从 `L2ScrollMessenger` 合约发出的 `SentMessage` 事件并在内部维护了一个提款树。 +它不断为每条提款消息生成默克尔证明。用户和第三方服务可以从跨链桥历史记录 API 查询默克尔树证明,以包含在执行提款交易中。 + +请注意,执行提款交易可以由用户自己提交,也可以由第三方服务提交。 + +### 提款树 + + + +提款树是一个密集的二元默克尔树。叶节点的哈希继承自消息哈希,而非叶节点的哈希是其两个子节点的连接哈希的 Keccak 哈希摘要。 +提款树的深度根据添加到树中的消息数量动态增长。 + +图3(a)显示了完整的三层提款树的示例。当叶子的数量不能填满一个完整的二叉树时,我们用哈希 0 填充叶节点,如图 3(b) 和 3(c) 所示。将新消息添加到不完整的提款树时,先前填充的叶节点将被具有实际消息哈希的新叶节点替换。 \ No newline at end of file diff --git a/src/content/docs/zh/technology/bridge/deposit-gateways.mdx b/src/content/docs/zh/technology/bridge/deposit-gateways.mdx new file mode 100644 index 000000000..156fcb7d3 --- /dev/null +++ b/src/content/docs/zh/technology/bridge/deposit-gateways.mdx @@ -0,0 +1,192 @@ +--- +section: technology +date: Last Modified +title: "存款网关" +lang: "zh" +permalink: "technology/bridge/deposit-gateways" +whatsnext: { "提款网关": "/zh/technology/bridge/withdraw-gateways/" } +--- + +import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import DepositWorkflow from "../_images/deposit.png" + +本文档介绍了用户和开发者如何使用网关将代币从 L1 存入 L2。 +我们在 L2 上为标准代币提供了多个网关,并提供了一个网关路由器,如下表所示。 + +| 网关合约 | 描述 | +| ------------------------ | ---------------------------------------------------------------- | +| `L1GatewayRouter` | 支持ETH和ERC20代币存款的网关路由器 | +| `L1ETHGateway` | ETH 存款的网关 | +| `L1StandardERC20Gateway` | 标准 ERC20 代币存款的网关 | +| `L1CustomERC20Gateway` | 自定义 ERC20 代币存款的网关 | +| `L1WETHGateway` | WETH 存款的网关 | +| `L1ERC721Gateway` | ERC721 代币存款的网关 | +| `L1ERC1155Gateway` | ERC1155 代币存款的网关 | + +## 概览 + + + +上图描述了从 L1 存款至 L2 的工作流程。 +用户调用网关来发起代币存款。 +然后该笔存款将被编码为消息发送至 `L1ScrollMessenger` 合约,相应的 L1 发起的交易将被添加至 `L1MessageQueue`。 +为了在 L2 上最终确认存款,L2 排序器会收集新的 L1 交易事件,并将相应的交易包含在它创建的 L2 区块中。 +后续部分将详细介绍如何进行不同代币的存款。您可以在[跨链消息传递](/technology/bridge/cross-domain-messaging#sending-messages-from-l1-to-l2)中找到有关 L1 至 L2 消息中继工作流的更多详细信息。 + +## 存入 ETH + +Scroll将 ETH 视为原生代币。 +我们在创世区块中为 `L2ScrollMessenger` 合约预先分配了足够数量的 ETH,以便它可以将原生的 ETH 代币转账到 L2 账户而无需铸造。 +存入ETH的工作原理如下。 + +1. `L1GatewayRouter` 合约提供了三个函数,将 ETH 从 L1 存入 L2。其中 `depositETHAndCall` 函数可以同时转账 ETH 并执行合约调用。 + + ```solidity + function depositETH(uint256 _amount, uint256 _gasLimit) external payable; + + function depositETH(address _to, uint256 _amount, uint256 _gasLimit) public payable; + + function depositETHAndCall( + address _to, + uint256 _amount, + bytes calldata _data, + uint256 _gasLimit + ) external payable; + ``` + +2. 所有三个 `depositETH` 函数都调用 `L1ETHGateway` 合约。`L1ETHGateway` 将存款编码为发送至 `L1ETHGateway` 合约的消息。 + +3. 存入的 ETH 将被锁定在 `L1ScrollMessenger` 合约中。 `L1ScrollMessenger` 合约将消息添加至 `L1MessageQueue` 合约的消息队列中。 + +4. 存款交易在 L1 上最终确认后,排序器将在 L2 区块中包含相应的 L2 交易,来最终确认存款并将 ETH 转账至 L2 上的收款方地址。 + +5. L2 交易将调用 `L2ScrollMessenger.relayMessage` 函数,来执行被中继的消息。在存入 ETH 的情况下,该 `relayMessage` 函数会调用 `L2ETHGateway.finalizeDepositETH`,将 ETH 转账至 L2 的收款方账户。 + +6. 如果用户调用 L1 的 `depositETHAndCall` 函数,`L2ETHGateway` 合约的 `finalizeDepositETH` 函数会将附加数据转发至目标的 L2 合约。 + +## 存入 ERC20 代币 + +我们提供了几种 ERC20 网关合约来桥接不同类型的 ERC20 代币,例如标准 ERC20 代币、自定义 ERC20 代币和 WETH 代币。 +`L1GatewayRouter` 合约记录了 ERC20 代币至 L1 相应 ERC20 代币网关的规范映射。 +除非已经设置自定义网关。`L1GatewayRouter` 合约使用 `standardERC20Gateway` 作为新的 ERC20 代币的默认网关 + +ERC20 代币存款的工作原理如下。 + +1. 如下所示,要将 ERC20 代币从 L1 存入 L2 ,用户可以使用 `L1GatewayRouter.depositERC20` 和 `L1GatewayRouter.depositERC20AndCall` 。 + + ```solidity + function depositERC20(address _token, uint256 _amount, uint256 _gasLimit) external payable; + + function depositERC20(address _token, address _to, uint256 _amount, uint256 _gasLimit) external payable; + + function depositERC20AndCall( + address _token, + address _to, + uint256 _amount, + bytes memory _data, + uint256 _gasLimit + ) public payable; + ``` + +2. 根据 ERC20 代币到网关的映射,`L1GatewayRouter` 合约调用对应的网关: `L1StandardERC20Gateway`,`L1CustomERC20Gateway` 或是 `L1WETHGateway`。余下步骤将分别描述。 + +### 标准 ERC20 代币 + +标准 ERC20 代币是不需要任何自定义逻辑的代币。对于此类代币,其 L2 的 ERC20 代币合约由 `L2StandardERC20Gateway` 创建。标准 ERC20 代币的存款的余下步骤为: + +3. `L1StandardERC20Gateway` 合约通过将 ERC20 代币从发送方转账给自己来锁定它们。 +4. 如果此 ERC20 代币之前未通过 `L1StandardERC20Gateway` 合约进行过提款,`L1StandardERC20Gateway` 合约将在 L2 上计算一个确定的 ERC20 代币地址,并将代币元数据(符号、名称和小数位)添加至消息以进行合约部署。如果 L2 代币地址已经存储在 `tokenMapping` 合约中,`L1StandardERC20Gateway` 合约将直接从映射中加载 L2 代币地址。 +5. `L1StandardERC20Gateway` 合约将编码代币存款消息,并调用 `L1ScrollMessenger` 合约来发送消息。 +6. 对应的 L2 交易调用 `L2ScrollMessenger.relayMessage` 函数来最终确认 L2 上的存款。在标准 ERC20 代币存款的情况下,交易随后调用 `L2StandardERC20Gateway.finalizeDepositERC20`。 +7. 如果此 ERC20 代币合约尚未在 L2 上部署,`L2StandardERC20Gateway` 合约则将从消息中提取代币元数据,并调用 `ScrollStandardERC20Factory` 合约以在 L2 上部署标准 ERC20 代币。 +8. `L2StandardERC20Gateway` 合约调用 L2 上相应的 ERC20 代币合约的铸造(Mint)函数。 +9. 如果用户在 L1 上调用 `depositERC20AndCall`,`L2StandardERC20Gateway` 合约将使用附加数据调用目标 L2 合约。 + +### 自定义 ERC20 代币 + +与标准 ERC20 代币相比,L2 上的自定义 ERC20 代币合约由代币所有者部署。自定义 ERC20 代币存款的余下步骤为: + +3. `L1CustomERC20Gateway` 合约通过将 ERC20 代币从发送方转账给自己来锁定它们。 +4. `L1CustomERC20Gateway` 合约需要 `tokenMapping` 合约中存在的 L2 ERC20 代币地址。它将检索相应的 ERC20 代币地址,对代币存款消息进行编码,并将其转发给 `L1ScrollMessenger` 合约。 +5. 对应的 L2 交易调用 `L2ScrollMessenger.relayMessage` 函数来最终确认 L2 上的存款。在自定义 ERC20 代币存款的情况下,交易随后调用 `L2CustomERC20Gateway.finalizeDepositERC20`。 +6. `L2CustomERC20Gateway` 合约调用 L2 上相应的 ERC20 代币合约的铸造(Mint)函数。L2 的 ERC20 代币合约需要授予 `L2CustomERC20Gateway` 合约铸造权限。 +7. 如果用户在 L1 上调用 `depositERC20AndCall`,`L2CustomERC20Gateway` 合约将使用附加数据调用目标 L2 合约。 + +### WETH 代币 + +我们为 L1 上的 WETH 代币提供了一个自定义网关 `L1WETHGateway`,并将网关地址记录在 `L1GatewayRouter` 合约中。WETH 代币存款的工作原理如下。 + +3. `L1WETHGateway` 合约通过将 WETH 代币从发送方转账给自己并将 WETH 代币解包为原生 ETH 代币,来锁定 WETH 代币。然后将 ETH 代币和 `msg.value` (用于支付中继费)一起发送至 `L1ScrollMessenger` 合约。 +4. `L1WETHGateway` 合约对代币存款消息进行编码并将其转发至 `L1ScrollMessenger` 合约。 +5. 对应的 L2 交易调用 `L2ScrollMessenger.relayMessage` 函数来最终确认 L2 上的存款。在 WETH 代币存款的情况下,交易随后调用 `L2WETHGateway.finalizeDepositERC20`。 +6. `L2WETHGateway` 再次将存入的 ETH 包装为 L2 上的 WETH 代币,并将其转账至 L2 上的接收地址。 +7. 如果用户在 L1 上调用 `depositERC20AndCall`,`L2WETHGateway` 合约将使用附加数据调用目标 L2 合约。 + +## 存入 ERC-721 / ERC-1155 代币 + +ERC-721 或 ERC-1155 代币的存款与 ERC20 代币非常相似。 +可以使用网关 `L1ERC721Gateway` 或 `L1ERC1155Gateway` 从 L1 存入 ERC-721 / ERC-1155代币。 + +```solidity +function depositERC721( + address _token, + uint256 _tokenId, + uint256 _gasLimit +) external payable; + +function depositERC721( + address _token, + address _to, + uint256 _tokenId, + uint256 _gasLimit +) external payable; + +function depositERC1155( + address _token, + uint256 _tokenId, + uint256 _amount, + uint256 _gasLimit +) external payable; + +function depositERC1155( + address _token, + address _to, + uint256 _tokenId, + uint256 _amount, + uint256 _gasLimit +) external payable; +``` + +为了方便大额的 ERC-721 或 ERC-1155 代币存款,我们在 `L1ERC721Gateway` 和 `L1ERC1155Gateway` 合约中提供通过如下函数,实现了批量存款功能: + +```solidity +function batchDepositERC721( + address _token, + uint256[] calldata _tokenIds, + uint256 _gasLimit +) external payable; + +function batchDepositERC721( + address _token, + address _to, + uint256[] calldata _tokenIds, + uint256 _gasLimit +) external payable; + +function batchDepositERC1155( + address _token, + uint256[] calldata _tokenIds, + uint256[] calldata _amounts, + uint256 _gasLimit +) external payable; + +function batchDepositERC1155( + address _token, + address _to, + uint256[] calldata _tokenIds, + uint256[] calldata _amounts, + uint256 _gasLimit +) external payable; +``` + +ERC-721 或 ERC-1155 代币在 L2 上对应的合约是 `L2ERC721Gateway` 和 `L2ERC1155Gateway`,用于在 L2 上最终确认存款。 \ No newline at end of file diff --git a/src/content/docs/zh/technology/bridge/withdraw-gateways.mdx b/src/content/docs/zh/technology/bridge/withdraw-gateways.mdx new file mode 100644 index 000000000..b8a9d5c44 --- /dev/null +++ b/src/content/docs/zh/technology/bridge/withdraw-gateways.mdx @@ -0,0 +1,172 @@ +--- +section: technology +date: Last Modified +title: "提款网关" +lang: "zh" +permalink: "technology/bridge/withdraw-gateways" +whatsnext: { "排序器": "/zh/technology/sequencer/execution-node/" } +--- + +import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import WithdrawWorkflow from "../_images/withdraw.png" + +本文档介绍了用户和开发者如何使用网关将代币从 L2 提取至 L1。 +我们在 L2 上为标准代币提供了多个网关,并提供了一个网关路由器,如下表所示。 + +| 网关合约 | 描述 | +| ------------------------ | ------------------------------------------------------------------- | +| `L2GatewayRouter` | 支持ETH和ERC20代币提款的网关路由器 | +| `L2ETHGateway` | ETH 提款的网关 | +| `L2StandardERC20Gateway` | 标准 ERC20 代币提款的网关 | +| `L2CustomERC20Gateway` | 自定义 ERC20 代币提款的网关 | +| `L2WETHGateway` | WETH 提款的网关 | +| `L2ERC721Gateway` | ERC721 代币提款的网关 | +| `L2ERC1155Gateway` | ERC1155 代币提款的网关 | + +## 概览 + + + +上图描述了从 L2 提款至 L1 的工作流程。 +用户调用网关来发起代币提款。 +然后该笔提款将被编码为消息发送至 `L2ScrollMessenger` 合约,随后添加至 `L2MessageQueue`。 +`L2MessageQueue` 维护了一个提款树,在每次添加新消息时更新根哈希。 +提款树根会和 L2 状态树根在 L1 rollup 合约上最终确认。 +在新的提款树根在 L1 上最终确认后,用户或者第三方可以构建有效的默克尔包含证明(Merkle Inclusion Proof),并在 L1 上发送 *执行提款* 交易来最终确认提款。 +您可以在[跨链消息传递](/technology/bridge/cross-domain-messaging#sending-messages-from-l1-to-l2)中找到有关 L1 至 L2 消息中继工作流的更多详细信息。 + +后续部分将详细介绍如何对不同的代币进行提款。 + +## 提取 ETH + +提取 ETH 的工作原理如下。 + +1. `L2GatewayRouter` 合约提供了三个函数,将 ETH 从 L2 提取至 L1。其中 `withdrawETHAndCall` 函数可以同时提取 ETH 并执行合约调用。 + + ```solidity + function withdrawETH(uint256 _amount, uint256 _gasLimit) external payable; + + function withdrawETH(address _to, uint256 _amount, uint256 _gasLimit) public payable; + + function withdrawETHAndCall( + address _to, + uint256 _amount, + bytes calldata _data, + uint256 _gasLimit + ) external payable; + ``` + +2. `withdrawETHAndCall` 函数调用 `L2ETHGateway` 合约。`L2ETHGateway` 合约编码提款消息并将其与要提取的 ETH 发送至 `L2ScrollMessenger` 合约。 +3. 提取的 ETH 再一次被锁定在 `L2ScrollMessenger` 合约中。 `L2ScrollMessenger` 合约将将消息添加至 `L2MessageQueue` 合约中的消息队列中. +4. L1 的提款执行交易调用 `L1ScrollMessenger.relayMessageWithProof` 函数来最终确认提款。在提取 ETH 的情况下, 该 `relayMessageWithProof` 函数会调用 `L1ETHGateway.finalizeWithdrawETH`, 将 ETH 发送回 L1 的收款方账户。 +5. 如果用户调用 L2 的 `withdrawETHAndCall`,`L1ETHGateway` 合约的 `finalizeWithdrawETH` 函数会将附加数据转发至目标的 L1 合约。 + +## 提取 ERC20 代币 + +ERC20 代币提款的工作原理如下。 + +1. 如下所示,要将 ERC20 代币从 L2 提取至 L1,用户可以使用 `L2GatewayRouter.withdrawERC20` 和 `L2GatewayRouter.withdrawERC20AndCall` 。 + + ```solidity + function withdrawERC20(address _token, uint256 _amount, uint256 _gasLimit) external payable; + + function withdrawERC20(address _token, address _to, uint256 _amount, uint256 _gasLimit) external payable; + + function withdrawERC20AndCall( + address _token, + address _to, + uint256 _amount, + bytes memory _data, + uint256 _gasLimit + ) public payable; + ``` + +2. 根据 ERC20 代币到网关的映射,`L2GatewayRouter` 合约调用对应的网关:`L2StandardERC20Gateway`, `L2CustomERC20Gateway` 或是 `L2WETHGateway`。余下步骤将分别描述。 + +### 标准和自定义 ERC20 代币 + +如下所示,标准和自定义 ERC20 代币的提款原理一样。 + +3. `L2StandardERC20Gateway` 或 `L2CustomERC20Gateway` 合约销毁要提取的 ERC20 代币,将提款编码至消息并发送给 `L2ScrollMessenger` 合约。 +4. L1 的提款执行交易调用 `L1ScrollMessenger.relayMessageWithProof` 函数来最终确认提款。 在标准和自定义 ERC20 代币的提款情况下,交易分别调用 `L1StandardERC20Gateway` 或是 `L1CustomERC20Gateway` 合约的 `finalizeWithdrawERC20` 函数。 + - 在 `L1StandardERC20Gateway` 合约中,如果这是 ERC20 代币的第一次提款,`finalizeWithdrawERC20` 函数会更新 `tokenMapping` 中的 L1 代币地址与 L2 代币地址的映射关系。 +5. L1 的 ERC20 代币网关将释放锁定的 ERC20 代币,从自己的地址转账至 L1 上的收款方地址。 +6. 如果用户在 L2 上调用 `withdrawERC20AndCall`函数,网关会用附加数据调用目标的 L1 合约。 + +### WETH 代币 + +我们为 L2 上的 WETH 代币提供了一个自定义网关 `L2WETHGateway`,并将网关地址记录在 `L2GatewayRouter` 合约中。WETH 代币的提款工作原理如下。 + +3. `L2WETHGateway` 合约将要提款的 WETH 代币转账至自己,并解包 WETH 为原生的 ETH 代币。ETH 代币随后发送回 `L2ScrollMessenger` 合约。 +4. `L2WETHGateway` 合约将编码代币提款消息并转发给 `L2ScrollMessenger` 合约。 +5. L1 的提款执行交易调用 `L1ScrollMessenger.relayMessageWithProof` 函数来在 L1 上最终确认提款。 在 WETH 代币提款的情况下,交易调用 `L1WETHGateway.finalizeWithdrawERC20` 并发送提取的 ETH 至 `L1WETHGateway` 合约。 +6. `L1WETHGateway` 合约再次包装提取的 ETH 为 L1 的 WETH 代币,并发送至 L1 的收款方地址。 +7. 如果用户在 L2 上调用 `withdrawERC20AndCall`,`L1WETHGateway` 合约会用附加数据调用目标的 L1 合约。 + +## 提取 ERC-721 / ERC-1155 代币 + +The withdrawal of ERC-721 or ERC-1155 tokens works very similar to ERC20 tokens. One can use the gateway `L2ERC721Gateway` or `L2ERC1155Gateway` to withdraw ERC-721 /ERC-1155 tokens from L2. + +```solidity +function withdrawERC721( + address _token, + uint256 _tokenId, + uint256 _gasLimit +) external payable; + +function withdrawERC721( + address _token, + address _to, + uint256 _tokenId, + uint256 _gasLimit +) external payable; + +function withdrawERC1155( + address _token, + uint256 _tokenId, + uint256 _amount, + uint256 _gasLimit +) external payable; + +function withdrawERC1155( + address _token, + address _to, + uint256 _tokenId, + uint256 _amount, + uint256 _gasLimit +) external payable; +``` + +为了方便大额的 ERC-721 或 ERC-1155 代币提款,我们也在 `L2ERC721Gateway` 和 `L2ERC1155Gateway` 合约中提供通过如下函数,实现了批量提款功能: + +```solidity +function batchWithdrawERC721( + address _token, + uint256[] calldata _tokenIds, + uint256 _gasLimit +) external payable; + +function batchWithdrawERC721( + address _token, + address _to, + uint256[] calldata _tokenIds, + uint256 _gasLimit +) external payable; + +function batchWithdrawERC1155( + address _token, + uint256[] calldata _tokenIds, + uint256[] calldata _amounts, + uint256 _gasLimit +) external payable; + +function batchWithdrawERC1155( + address _token, + address _to, + uint256[] calldata _tokenIds, + uint256[] calldata _amounts, + uint256 _gasLimit +) external payable; +``` + +ERC-721 或 ERC-1155 代币在 L1 上对应的合约是 `L1ERC721Gateway` 和 `L1ERC1155Gateway`,用于在 L1 上最终确认提款。 \ No newline at end of file diff --git a/src/content/docs/zh/technology/chain/accounts.mdx b/src/content/docs/zh/technology/chain/accounts.mdx new file mode 100644 index 000000000..8fd6f2817 --- /dev/null +++ b/src/content/docs/zh/technology/chain/accounts.mdx @@ -0,0 +1,29 @@ +--- +section: technology +date: Last Modified +title: "账户和状态" +lang: "zh" +permalink: "technology/chain/accounts-and-state" +whatsnext: { "交易": "/zh/technology/chain/transactions/" } +--- + +## 账户 + +与以太坊相同,Scroll有两种账户类型:外部所有者账户(EOA)和存储智能合约和额外存储的合约账户。 + +Scroll 将合约字节码的其他信息存储在账户中,方便zkEVM电路更高效地证明状态转换。 + +Scroll 的帐户包含以下字段: + +- `nonce`: 已发送交易数量的计数器 +- `balance`: 账户余额中的 `ETH` 代币余额(单位为wei) +- `storageRoot`: 存储树的根哈希。由于 Scroll 使用 [zkTrie](/technology/sequencer/zktrie) 树进行存储,因此 `storageRoot` 将波塞冬哈希(Poseidon hash)摘要存储在 256 位整数中。 +- `codeHash`: 合约字节码的 Keccak 哈希摘要。 +- `PoseidonCodeHash` (**新字段**): 256 位整数的合约字节码的波塞冬哈希摘要。 +- `CodeSize` (**新字段**): 合约字节码中的字节数。 + +## 状态 + +区块链的状态是帐户数据的集合。状态树将帐户数据及其相应的地址编码为[默克尔树](https://en.wikipedia.org/wiki/Merkle_tree)数据结构。状态树的根或区块链的状态是树中包含的所有帐户数据的加密摘要。 + +以太坊使用一种名为[Patricia Merkle Trie](https://ethereum.org/en/developers/docs/data-structures-and-encoding/patricia-merkle-trie/) 的数据结构,用于状态树和存储树中存储智能合约中的键值条目。在 Scroll 中,我们将 Patricia Merkle Trie 替换为一种对 zk 更友好的数据结构,称为 zkTrie,用于状态树和存储树。从更高的视角上,zkTrie数据结构是一个稀疏的二元默克尔树,使用zk友好的哈希函数 — [Poseidon哈希](https://eprint.iacr.org/2019/458.pdf)。[zkTrie](/technology/sequencer/zktrie) 文档描述了有关此数据结构的更多详细信息。 \ No newline at end of file diff --git a/src/content/docs/zh/technology/chain/blocks.mdx b/src/content/docs/zh/technology/chain/blocks.mdx new file mode 100644 index 000000000..5b7e97512 --- /dev/null +++ b/src/content/docs/zh/technology/chain/blocks.mdx @@ -0,0 +1,39 @@ +--- +section: technology +date: Last Modified +title: "区块" +lang: "zh" +permalink: "technology/chain/blocks" +whatsnext: { "Rollup 流程": "/zh/technology/chain/rollup/" } +--- + +区块是若干交易和先前区块链接的集合。 + +## 区块头 + +Scroll 中的区块头映射了以太坊的结构。但是修改了区块头中的某些字段来适应 Layer 2的背景,如下表所述: + +| 字段 | 描述 | +| ------------------- | ------------------------------------------------------------------ | +| `parentHash` | 父区块哈希。 | +| `uncleHash` | `keccak256(rlp([]))`。 | +| `coinbase` | 手续费收集至预先部署的费用合约地址 `0x5300000000000000000000000000000000000005`。大多数情况下,RPC 返回字段 `"miner"` 是零地址 `0x0000000000000000000000000000000000000000`。 | +| `stateRoot` | 状态树的根哈希,是波塞冬哈希。 | +| `transactionsRoot ` | 交易树的根哈希。 | +| `receiptsRoot ` | 交易收据树的根哈希。 | +| `logsBloom` | 包括事件日志的数据结构。 | +| `difficulty` | 始终为 1 或者 2。 | +| `number` | 区块号。 | +| `gasLimit` | 区块中允许的gas上限。 | +| `gasUsed` | 区块中使用的gas。 | +| `timestamp` | 区块时间。 | +| `extraData` | 由区块的签名者签名,跟随任意附加数据。 | +| `mixHash` | 始终为 0。 | +| `nonce` | 始终为 0。 | +| `baseFee` | 目前在Scroll中为空,因为我们尚未启用 EIP-1559。 | + +## 区块时间 + +区块时间是指两个连续区块之间的间隔。在Scroll中,区块时间设置为 3s。减少的区块时间提升了用户体验并增强了Scroll链的可扩展性。 + +3 秒区块时间是理想状态下,而不是协议保证或者强制执行。 diff --git a/src/content/docs/zh/technology/chain/differences.mdx b/src/content/docs/zh/technology/chain/differences.mdx new file mode 100644 index 000000000..6519b0d37 --- /dev/null +++ b/src/content/docs/zh/technology/chain/differences.mdx @@ -0,0 +1,46 @@ +--- +section: technology +date: Last Modified +title: "和以太坊 EVM的区别" +lang: "zh" +permalink: "technology/chain/differences" +whatsnext: { "跨链桥": "/zh/technology/bridge/cross-domain-messaging/" } +--- + +## 操作码 + +| 操作码 | Scroll 实现 | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `BLOCKHASH` | 返回最后256个区块的 `keccak(chain_id \|\| block_number)` | +| `COINBASE` | 返回费用地址 (预部署合约 `0x5300000000000000000000000000000000000005`) | +| `DIFFICULTY` / `PREVRANDAO` | 始终返回 0 | +| `BASEFEE` | 未启用,因为我们目前禁用了 EIP-1559。 如果引入了该操作码,交易将会回退 | +| `SELFDESTRUCT` | 未启用,如果引入了该操作码,交易将会回退 | + +## 预编译合约 + +| 地址 | 名称 | Scroll 实现 | +| ------- | ------------ | ----------------------------------------------------------------------------------------------- | +| `0x02` | `SHA2-256` | 当前未支持 | +| `0x03` | `RIPEMD-160` | 当前未支持 | +| `0x05` | `modexp` | 将输入值 `B, E, M` 限制为小于 $2^{256}$ 的无符号整数 | +| `0x08` | `ecPairing` | 输入仍然是 6 个 32字节的倍数,但限制元组数量最多为4 | +| `0x09` | `blake2f` | 当前未支持 | + +剩余的预编译合约和以太坊实现相同。但是,它们在一个区块内的最大使用量受 zkEVM电路容量相关限制的约束。 + +## 以太坊改进提案(EIPs) + +我们的排序器最初是基于伦敦升级开发的。我们在伦敦升级中禁用了一些 EIP,并从上海升级引入了一些 EIP 来提高兼容性。 + +伦敦升级中禁用的EIPs: + +- [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559): 费用市场升级和 EIP-1559 交易类型 +- [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930): 可选的访问列表 +- [EIP-3198](https://eips.ethereum.org/EIPS/eip-3198): `BASEFEE` 操作码 + +上海升级中引入的EIPs: + +- [EIP-3651](https://eips.ethereum.org/EIPS/eip-3651): `COINBASE` 热地址 +- [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855): `PUSH0` 指令 +- [EIP-3860](https://eips.ethereum.org/EIPS/eip-3860): 初始化代码量限制 diff --git a/src/content/docs/zh/technology/chain/rollup.mdx b/src/content/docs/zh/technology/chain/rollup.mdx new file mode 100644 index 000000000..3fc5cb43b --- /dev/null +++ b/src/content/docs/zh/technology/chain/rollup.mdx @@ -0,0 +1,156 @@ +--- +section: technology +date: Last Modified +title: "Rollup 流程" +lang: "zh" +permalink: "technology/chain/rollup" +whatsnext: { "和以太坊 EVM的区别": "/zh/technology/chain/differences/" } +--- + +import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import RollupProcess from "../_images/rollup.png" + +本文档介绍Scroll中的Rollup流程。 + +## 工作流程 + + + +该图说明了Rollup工作流。L2 排序器包含三个模块: + +- **同步服务** 将订阅从 L1 跨链桥合约中发出的事件。一旦检测到,将附加到 L1 收件箱,同步服务将相应地生成一个新的 `L1MessageTx` 交易,并将其添加到本地 L1 交易队列中。 +- **内存池** 收集直接提交给 L2 排序器的交易。 +- **执行器** 从 L1 交易队列和 L2 内存池中提取交易,执行它们来构造新的 L2 区块。 + +The rollup node contains three modules: +Rollup 节点包含三个模块: + +- **中继器(Relayer)** 提交承诺交易并将在rollup合约中最终确认,以实现数据可用性和最终性。 +- **块提议者(Chunk Proposer)** 和 **批次提议者(Batch Proposer)** 按照[交易批处理](/technology/chain/transactions#transaction-batching)中描述的约束提议新块和新批次。 + +Rollup 流程可以分为三个阶段:交易执行、批处理和数据承诺,以及证明生成和最终确认。 + +### 阶段 1. 交易执行 + +1. 用户将交易提交到 L1 跨链桥合约或 L2 排序器。 +2. L2 排序器中的同步服务将从跨链桥合约中提取最新添加的 L1 交易。 +3. L2 排序器处理来自 L1 消息队列和 L2 内存池的交易,以构建 L2 区块。 + +### 阶段 2. 批处理和数据承诺 + +4. Rollup 节点监听最新的 L2 区块并获取交易数据。 +5. 如果满足条件(如[交易批处理](/technology/chain/transactions#transaction-batching)中所描述的),则Rollup节点将提议一个新块或批次并将其写入数据库。否则,Rollup节点会继续等待更多区块或者块。 +6. 创建新批次后,Rollup 中继器将收集此批次中的交易数据,并将承诺事务提交到Rollup合约以实现数据可用性。 + +### Phase 3. 证明生成和最终确认 + +7. 一旦协调器(coordinator)从数据库中轮询新的块或批次: + - 在新块上,协调器将从 L2 排序器中查询该块中所有区块的执行踪迹(execution traces),然后将块证明任务发送到随机选择的 zkEVM 证明器。 + - 在新批次上,协调器将从数据库中收集该批次中所有块的块证明,并将批次证明任务分配给随机选择的聚合证明器。 +8. 当协调器从证明器那里收到块或批次证明时,它会将证明写入数据库。 +9. 一旦Rollup中继器从数据库中轮询得到新的批次证明,它将向Rollup合约提交最终确认交易来验证证明。 + +## 承诺交易 + +承诺交易将区块信息和交易数据提交到 L1 以获得数据可用性。该交易包括父批次头,块数据和跳过的 L1 消息的位图。父批次头指定此批次链接到前一个批次。父批次必须在之前提交;否则,交易将被回退。请参考下面的 `commitBatch` 签名。 + +```solidity +function commitBatch( + uint8 version, + bytes calldata parentBatchHeader, + bytes[] memory chunks, + bytes calldata skippedL1MessageBitmap +) external override OnlySequencer +``` + +在 `commitBatch` 验证先前是否提交父批次后,它会构造批次的批次头,并将批次头的哈希存储在 `ScrollChain` 合约中。 + +```solidity +mapping(uint256 => bytes32) public committedBatches; +``` + +[编解码器](#codec) 中介绍了批次头和块数据的编码。批次头中的大多数字段都可以直接从块数据派生出来。需要注意的一个重要字段是 `dataHash` ,它将成为验证有效性证明的公共输入的一部分。假设一个批处理包含 `n` 个区块,其 `dataHash` 计算方法如下 + +``` +batch.dataHash := keccak(chunk[0].dataHash || ... || chunk[n-1].dataHash) +``` + +假设一个块包含 `k` 个区块,其 `dataHash` 计算方法如下 + +``` +chunk.dataHash := keccak(blockContext[0] || ... || blockContext[k-1] || + block[0].l1TxHashes || block[0].l2TxHashes || ... || + block[k-1].l1TxHashes || block[k-1].l2TxHashes) +``` + +其中 `block.l1TxHashes` 是该区块中 L1 交易的连接交易(concatenated transaction)哈希, `block.l2TxHashes`是该区块中 L2 交易的连接交易哈希。请注意,L1 交易的哈希不是由Rollup节点上传的,而是给定此区块中包含的 L1 消息的索引范围,直接从 `L1MessageQueue` 合约加载而来。L2 交易哈希是根据[`块`](#Chunk-Codec)中 `l2Transactions` 字段的 RLP 编码字节计算而来。 + +此外,该 `commitBatch` 方法还包含跳过的 L1 消息的位图。不幸的是,由于证明溢出的问题。如果对应于 L1 消息的 L1 交易超过电路容量限制,我们将无法为此交易生成有效证明,因此无法在 L1 上最终确认它。Scroll正在积极努力,通过升级我们的证明系统来消除证明溢出问题。 + +## 最终确认交易 + +最终确认交易将利用有效性证明确认先前提交的批次。交易还会在批次后提交状态根和提款状态根。以下是 `finalizeBatchWithProof` 方法的签名: + +```solidity +function finalizeBatchWithProof( + bytes calldata batchHeader, + bytes32 prevStateRoot, + bytes32 postStateRoot, + bytes32 withdrawRoot, + bytes calldata aggrProof +) external override OnlyProver +``` + +该 `finalizeBatchWithProof` 方法将首先验证批次是否已在合约中提交。然后,它将按如下方式计算公共输入哈希 + +``` +publicInputHash := keccak(chainId || prevStateRoot || postStateRoot || withdrawRoot || batch.dataHash) +``` + +公共输入哈希和有效性证明被发送到 plonk solidity 验证器。验证通过后,新的状态根和提款状态根将存储在 `ScrollChain` 合约中。 + +```solidity +mapping(uint256 => bytes32) public override finalizedStateRoots; +mapping(uint256 => bytes32) public override withdrawRoots; +``` + +在这个阶段,可以无需信任地使用最新最终确认的批次的状态根,并且可以使用提款状态根的默克尔证明在 L1 上执行该批次中的提款交易。 + +## 编解码器 + +本节将介绍“Rollup”合约中三种数据结构的编解码器:`BatchHeader` 、 `Chunk` 和 `BlockContext` 。 + +### `BatchHeader` 编解码器 + +| 字段 | 字节 | 类型 | 偏移量 | 描述 | +| ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- | +| `version` | 1 | `uint8` | 0 | 批次头版本 | +| `batchIndex` | 8 | `uint64` | 1 | 批次序号 | +| `l1MessagePopped` | 8 | `uint64` | 9 | 批次中弹出的 L1 消息的数量 | +| `totalL1MessagePopped` | 8 | `uint64` | 17 | 批次后弹出的 L1 消息的数量 | +| `dataHash` | 32 | `bytes32` | 25 | 批次的数据哈希 | +| `parentBatchHash` | 32 | `bytes32` | 57 | 父批次的哈希 | +| `skippedL1MessageBitmap` | dynamic | `uint256[]` | 89 | 在批次中跳过的 L1 消息的位图 | + +### `Chunk` 编解码器 + +| 字段 | 字节 | 类型 | 偏移量 | 描述 | +| ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `numBlocks` | 1 | `uint8` | 0 | 块中的区块数量 | +| `block[0]` | 60 | `BlockContext` | 1 | 第一个区块的区块信息 | +| ... | ... | ... | ... | ... | +| `block[i]` | 60 | `BlockContext` | `60*i+1` | 第 `i+1` 个区块的区块信息 | +| ... | ... | ... | ... | ... | +| `block[n-1]` | 60 | `BlockContext` | `60*n-59` | 最后a一个区块的区块信息 | +| `l2Transactions` | dynamic | `bytes` | `60*n+1` | 带签名的 L2 交易的连接 RLP 编码。RLP 编码的字节长度 ( uint32 ) 在每笔交易之前插入。 | + +### `BlockContext` 编解码器 + +| 字段 | 字节 | 类型 | 偏移量 | 描述 | +| ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- | +| `blockNumber` | 8 | `uint64` | 0 | 区块编号 | +| `timestamp` | 8 | `uint64` | 8 | 区块时间 | +| `baseFee` | 32 | `uint256` | 16 | 区块的base fee,当前始终为0,因为我们禁用了EIP1559。 | +| `gasLimit` | 8 | `uint64` | 48 | 区块的 gas 上限 | +| `numTransactions` | 2 | `uint16` | 56 | 区块中的交易数量,包括 L1 和 L2 的交易 | +| `numL1Messages` | 2 | `uint16` | 58 | 区块中的 L1 消息数量 | diff --git a/src/content/docs/zh/technology/chain/transactions.mdx b/src/content/docs/zh/technology/chain/transactions.mdx new file mode 100644 index 000000000..4d9895d2e --- /dev/null +++ b/src/content/docs/zh/technology/chain/transactions.mdx @@ -0,0 +1,91 @@ +--- +section: technology +date: Last Modified +title: "交易" +lang: "zh" +permalink: "technology/chain/transactions" +whatsnext: { "区块": "/zh/technology/chain/blocks/" } +--- + +import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import TransactionBatching from "../_images/batching.png" + +交易是加密签名的消息,用于发起链状态的转换。它可以是简单的余额转移,或是调用智能合约来执行程序改变状态。 + +## 交易类型 + +目前,Scroll 支持三种类型的交易。 + +- Pre-EIP-155 交易: 以支持 [Singleton Factory](https://eips.ethereum.org/EIPS/eip-2470) 合约。 +- Legacy 交易 (参考 [EIP-155](https://eips.ethereum.org/EIPS/eip-155)) +- `L1MessageTx` 类型交易 (类型: `0x7E`): 这是 Scroll 引入的一种新的 [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) 交易,如下所述。此交易类型适用于在 L1 上发起的交易。 + +请注意,Scroll 当前不支持 [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) 和 [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) 交易类型。Scroll 未来将会引入这两种交易类型。 + +### L1 Message 交易 + +我们为L1发起的交易引入了一种新型的交易 `L1MessageTx` 。这种类型的交易在 L1 跨链桥合约上发起。每次新消息将附加到 L1 上的 `L1MessageQueue` 合约,L2 排序器都会创建一个相应的 `L1MessageTx` 交易包含在 L2 区块中。由于当用户在 L1 上发起交易时,签名已经已经隐式验证,因此 `L1MessageTx` 交易没有签名。 + +`L1MessageTx` 交易类型为 `0x7E` ,其负载定义如下。 + +```go +type L1MessageTx struct { + QueueIndex uint64 // The queue index of the message queue in L1 contract + Gas uint64 // Gas limit + To *common.Address // Cannot be nil, we do not allow contract creation from L1 + Value *big.Int + Data []byte + Sender common.Address +} +``` + +`L1MessageTx` 交易的 RLP 编码遵循 [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) 规则 `TransactionType || TransactionPayload`,其中 `TransactionType` 为 `0x7E`,而 `TransactionPayload = RLP(L1MessageTx)`。 + +`L1MessageTx` 交易的两个显著特征: + +- 与 `Sender` 账户的`Nonce`不同,交易中的 `QueueIndex` 是 L1 消息队列的排序序号。 但交易发送者的 `Nonce` 在交易后仍然会增加1。 +- 该类型的交易不支付 [L2 费用](/developers/transaction-fees-on-scroll#l2-fee)和[L1 费用](/developers/transaction-fees-on-scroll#l1-fee)。当用户在 L1 上发起交易时,L2 费用已经支付了。不收取 L1 费用,是因为 `L1MessageTx` 交易的数据已经存在于 L1 跨链桥合约中。 + +## 交易生命周期 + +Scroll 中的交易生命周期包含以下三个阶段: + +1. **已确认(Confirmed)**: 用户向 L1 跨链桥合约或 L2 排序器提交交易。交易执行并包含在 L2 区块中后变为 `已确认` 。 +2. **已提交(Committed)**: 交易被包含在批次(batch)中,并且包含此批处理数据的 *承诺交易(commit transaction* 将提交到 L1。在 L1 区块中确认承诺事务后,此批处理中的交易变为`已提交`。 +3. **最终确认(Finalized)**: 该批次的证明生成并在L1上得到验证。在 *最终确认交易(finalize transaction)* 在 L1 上最终确认后,交易状态变为 `最终确认` 并成为 Scroll L2 链的一部分。 + +### 提交交易 + +用户可以在两个入口点将交易提交到 Scroll。 + +第一,用户可以直接将提交给 L2 排序器。为此,用户只需要配置他们的钱包,连接 Scroll RPC 端点。排序器将验证交易并存储在本地交易池中。 + +第二,来自于 L1 的存款和强制交易。Scroll L1 跨链桥合约为用户和智能合约提供了三个入口点,以从 L1 发送交易。通过这三个入口点发送的所有消息都将附加到 `L1MessageQueue` 合约中。 + +- `ScrollGatewayRouter` 合约和几个标准代币 gateway 允许用户和合约将标准代币存入L2。更多细节参阅 [代币存款 Gateways](/technology/bridge/deposit-gateways)。 +- `L1ScrollMessenger` 合约允许用户和合约向 L2 发送任意消息。更多详细信息,请参阅[发送任意消息](/UPyw7afFQE6q-9CIdIRBag#Sending-Arbitrary-Messages)。 +- `EnforcedTxGateway` 合约允许EOA从同一地址发起强制交易,以提取代币或在L2上调用其他合约。更多详细信息,请参阅[发送强制交易](/UPyw7afFQE6q-9CIdIRBag#Sending-Enforced-Transactions)。 + +Scroll 排序器会定期开始新的mining任务。它会从 `L1MessageQueue` 合约和 L2 内存池中的交易中提取 L1 消息并密封一个区块。一旦交易被包含在 L2 区块中,其状态将变为 `Confirmed` 。 + +### 承诺交易数据 + +Rollup 节点收集新的 L2 区块并将其打包为块(Chunks)和批次(Batches)(请参阅及[交易批处理](/RxRWLFtiQ7W_wbc0jMnQNA)中的更多详细信息)。它会定期发送一个承诺交易,将一批交易的数据发布到 L1 `ScrollChain` 合约。承诺交易在 L1 区块中被最终确认后,此批次中交易的状态变为 `已提交(Committed)`。此时,用户可以完全根据来自 L1 合约提交的数据自行重构 L2 状态。 + +### 最终确认交易 + +生成有效性证明后,rollup 节点在发送包含该批次有效性证明和新状态根的*最终确认交易*来进行链上验证。一旦最终确认交易成功在 L1 区块中确认,此批次中 L2 交易的状态将变为 `最终确认(Finalized)`。新的状态根可以被第三方无需信任地使用。 + +## 交易批处理 + + + +在 Scroll 中,交易在多个层中进行批处理。 + +1. 一组排序好的交易被打包进一个区块。 +2. 一系列相邻的区块被分组进入一个块(chunk)中,块是生成 zkEVM 电路证明的基本单元。 +3. 一系列相邻的块被分组到一个批次(batch)中,批次是 L1 上数据承诺和证明验证的基础单元。*批次证明*是此批次中区块证明的聚合证明。 + +这种多层批处理模式的目标是降低链上数据承诺和证明验证的gas成本。考虑到电路容量固定的情况下,此方法增加了 L1 上 Rollup 单元的颗粒度。因此,批处理减少了要存储在合约中的数据,并将证明验证成本摊销到更多的 L2 交易中。 + +一旦块创建之后,将生成相应的块证明任务并发送到 zkEVM 证明器。创建新的批次时,将发生两个后续操作:(a) Rollup节点将此批次中的交易数据和块信息提交到 L1 合约,以及 (b) 将聚合块证明的批处理证明任务分派给证明聚合器证明者。[Rollup节点](/technology/sequencer/rollup-node)中详细介绍了提议块和批次的标准。 \ No newline at end of file diff --git a/src/content/docs/zh/technology/index.mdx b/src/content/docs/zh/technology/index.mdx new file mode 100644 index 000000000..a7a31dc60 --- /dev/null +++ b/src/content/docs/zh/technology/index.mdx @@ -0,0 +1,24 @@ +--- +section: technology +date: Last Modified +title: "Scroll 架构" +lang: "zh" +permalink: "technology" +whatsnext: + { "Scroll 链": "/zh/technology/chain/accounts", "跨链桥": "/zh/technology/bridge/cross-domain-messaging", "排序器": "/zh/technology/sequencer/execution-node", "zkEVM": "/zh/technology/zkevm/zkevm-overview" } +--- + +import ClickToZoom from "../../../../components/ClickToZoom.astro" +import Architecture from "./_images/arch.png" + + + +如上图所示,Scroll 链由三层组成: + +- **结算层**: 为的 Scroll 链提供数据可用性和排序,验证有效性证明,并允许用户和去中心化应用程序在以太坊和Scroll之间发送消息和资产。我们使用以太坊作为结算层,并将跨链桥和Rollup合约部署到以太坊上。 +- **排序器**: 包含一个*执行节点*,用于执行提交到 Scroll 排序器的交易和提交给 L1 跨链桥合约的交易并生成 L2 区块,以及一个*Rollup节点*,用于批处理交易,将交易数据和区块信息发布到以太坊以获得数据可用性,并将有效性证明提交给以太坊以进行最终确认。 +- **证明层**: 由一个证明器池组成,这些证明器负责生成验证 L2 交易正确性的 zkEVM 有效性证明,以及一个协调器,将证明任务分配给证明器并将证明中继到Rollup节点以在以太坊上最终确认。 + +文档的这一部分提供有关Scroll协议规范、跨链桥协议、排序器和 zkEVM 电路的全面信息。 + +*在本节的剩下部分,L1 将指代以太坊,而 L2 将指代Scroll。* \ No newline at end of file diff --git a/src/content/docs/zh/technology/prover/proof-generation.mdx b/src/content/docs/zh/technology/prover/proof-generation.mdx new file mode 100644 index 000000000..028be2e2a --- /dev/null +++ b/src/content/docs/zh/technology/prover/proof-generation.mdx @@ -0,0 +1,7 @@ +--- +section: technology +date: Last Modified +title: "Proof Generation" +lang: "en" +permalink: "technology/prover/proof-generation" +--- diff --git a/src/content/docs/zh/technology/security/audits-and-bug-bounty.mdx b/src/content/docs/zh/technology/security/audits-and-bug-bounty.mdx new file mode 100644 index 000000000..4653ec16f --- /dev/null +++ b/src/content/docs/zh/technology/security/audits-and-bug-bounty.mdx @@ -0,0 +1,79 @@ +--- +section: technology +date: Last Modified +title: "审计与漏洞赏金计划" +lang: "zh" +permalink: "technology/security/audits-and-bug-bounty" +--- + +import Aside from "../../../../../components/Aside.astro" + +Scroll 将安全性视为重中之重。 + +除了严格的测试、内部安全团队和全面的代码审核外, +我们还与多家安全审计公司合作,对我们的代码库进行审计。 +我们还启动了一个漏洞赏金计划,来鼓励社区参与加强我们协议的安全性。 + + + +## 独立审计 + +Scroll 已经与多家业内领先的安全审计公司合作,来审查我们的代码库, +我们的核心代码接受了多个审计团队的审计,包括 [Trail of Bits](https://www.trailofbits.com/), [OpenZeppelin](https://www.openzeppelin.com/), [Zellic](https://www.zellic.io/) 和 [KALOS](https://www.kalos.xyz/)。 + +- Trail of Bits, Zellic 和 KALOS 审计了我们的 zkEVM 电路 +- OpenZeppelin 和 Zellic 对我们的跨链桥和 Rollup 合约进行了独立审计 +- Trail of Bits 分析了我们的节点实现 + + + +### zkEVM 电路 + +- Trail of Bits + - [Wave 1](https://github.com/trailofbits/publications/blob/master/reviews/2023-04-scroll-zkEVM-wave1-securityreview.pdf) + - [Wave 2](https://github.com/trailofbits/publications/blob/master/reviews/2023-08-scroll-zkEVM-wave2-securityreview.pdf) + - [Wave 3](https://github.com/trailofbits/publications/blob/master/reviews/2023-09-scroll-zkEVM-wave3-securityreview.pdf) +- Zellic and Kalos + - [Wave 1](https://github.com/Zellic/publications/blob/master/Scroll%20zkEVM%20-%20Part%201%20-%20Audit%20Report.pdf) + - [Wave 2](https://github.com/Zellic/publications/blob/master/Scroll%20zkEVM%20-%20Part%202%20-%20Audit%20Report.pdf) + +### 节点实现 + +- Trail of Bits + - [zkTrie](https://github.com/trailofbits/publications/blob/master/reviews/2023-07-scroll-zktrie-securityreview.pdf) + - [L2geth](https://github.com/trailofbits/publications/blob/master/reviews/2023-08-scrollL2geth-initial-securityreview.pdf) + - [L2geth diff](https://github.com/trailofbits/publications/blob/master/reviews/2023-08-scrollL2geth-securityreview.pdf) + +### 跨链桥和 Rollup 合约 + +- OpenZeppelin + - [Phase 1](https://blog.openzeppelin.com/scroll-layer-1-audit-1) + - [Phase 2](https://blog.openzeppelin.com/scroll-phase-2-audit) + - [GasSwap, Multiple Verifier, Wrapped Ether and Diff](https://blog.openzeppelin.com/scroll-gasswap-multiple-verifier-wrapped-ether-and-diff-audit) + - [ScrollOwner and Rate Limiter](https://blog.openzeppelin.com/scrollowner-and-rate-limiter-audit) + - [USDC Gateway](https://blog.openzeppelin.com/scroll-usdc-gateway-audit) + - [Contract diff](https://blog.openzeppelin.com/scroll-diff-audit-report) +- Zellic + - [Report 1](https://github.com/Zellic/publications/blob/master/Scroll%20-%2005.26.23%20Zellic%20Audit%20Report.pdf) + - [Report 2](https://github.com/Zellic/publications/blob/master/Scroll%20-%2009.27.23%20Zellic%20Audit%20Report.pdf) + +## 漏洞赏金计划 + +Scroll 在业内知名的漏洞赏金平台 Immunefi 上有一个活跃的 [漏洞赏金计划](https://immunefi.com/bounty/scroll/)。 +该计划向公众开放,我们鼓励任何人参与。 + +奖励取决于报告漏洞的严重程度: + +- **严重**: 高达 \$1,000,000 +- **高风险**: \$10,000 - \$50,000 +- **中风险**: \$5,000 + +### 范围 + +漏洞赏金计划的范围涵盖区块链基础设施以及用于跨链桥和 rollup 的智能合约。有关漏洞类别的详细细分情况,请参阅漏洞赏金页面。 + +除了漏洞赏金计划中列出的范围外,我们还鼓励向 Immunefi 报告任何发现的漏洞,我们也将考虑对其进行奖励。如果发现漏洞赏金计划范围之外的任何关键漏洞,也请向 security@scroll.io 发送报告。 \ No newline at end of file diff --git a/src/content/docs/zh/technology/sequencer/execution-node.mdx b/src/content/docs/zh/technology/sequencer/execution-node.mdx new file mode 100644 index 000000000..3a738df18 --- /dev/null +++ b/src/content/docs/zh/technology/sequencer/execution-node.mdx @@ -0,0 +1,88 @@ +--- +section: technology +date: Last Modified +title: "执行节点" +lang: "zh" +permalink: "technology/sequencer/execution-node" +whatsnext: { "Rollup 节点": "/zh/technology/sequencer/rollup-node/" } +--- + +import Aside from "../../../../../components/Aside.astro" + +执行节点是 Scroll 协议的核心组件:负责维护 L2 区块链。 +执行节点还确保 Scroll 上的用户和开发者体验与以太坊非常相似。它通过直接继承以太坊的 EVM 和 RPC 设计,只进行极少的修改来实现这一点。 + +Scroll 执行节点的主要功能是: +- 从 L2 和 L1 收集交易。 +- 验证交易并将其打包到 L2 区块中。 +- 执行区块并维护 L2 区块链状态。 + +值得强调的是,将消息和代币从 L1 桥接到 L2(存款)也是执行节点的责任。 +另一方面,从 L2 到 L1(提款)的消息可以由 L1 上的任何用户执行。 + +Scroll执行节点的次要功能是: +- 提供标准的以太坊 RPC API 和一些 Scroll 的扩展 API。 +- 允许节点(跟随节点)使用以太坊的 p2p 协议同步区块链。 + +执行节点作为 [go-ethereum](https://github.com/ethereum/go-ethereum) 的一个分支,从以太坊继承了它的大部分功能。这包括交易和区块数据结构、EVM 执行层、RPC 和 p2p 协议。由于这些不是重新实现的,而是直接继承自 go-ethereum ,我们很确信 Scroll 与以太坊的兼容性非常高。 + +以下部分将介绍执行节点的主要组件、附加验证规则以及修改部分细节的总结。 + +## `l2geth` 组件 + +[`l2geth`](https://github.com/scroll-tech/go-ethereum) 是 Scroll 的 [go-ethereum](https://github.com/ethereum/go-ethereum) 分支。 它负责构建和执行区块并维护区块链状态。 l2geth 从以太坊继承了它的大部分功能,下文中列出了一些显著的差异。 `l2geth` 具有以下子模块(不是完整列表): +- **Storage**: 使用 LevelDB 实现的账本和状态存储。 +- **EVM**: 以太坊的状态转换规则。 +- **Worker:** 负责创建新的 L2 区块。 +- **L1 SyncService**: 在 `l2geth` 本地数据库中同步和存储 L1 消息。 +- **API layer**: 标准以太坊 RPC 和 p2p 接口。 +- **Transaction pool**: 用于 L2 交易的内存池。 +- **Circuit capacity checker**: 检查交易或区块是否超过电路容量限制。 + +### 电路容量检查器 + +使用 Scroll 当前的zkEVM电路,可能会构建出无法证明的交易和区块,因为它们无法适配进 zkEVM 电路。我们称之为 *证明溢出*。 +为了避免这种情况,我们实现了一个 *电路容量检查器* 模块作为 l2geth 的一部分。电路容量检查器在区块创建和区块验证期间都会使用。 + +在区块创建过程中,如果下一笔交易会导致证明溢出,那么我们会封装区块并将交易留给下一个区块。 +如果单个交易导致证明溢出,l2geth 会丢弃它。我们称这种机制为 *跳过*。 + +跳过 L2 交易意味着丢弃它们。在这种情况下,用户需要提交另一个具有相同随机数且不会导致证明溢出的交易才能继续。 + +跳过 L1 交易有一个更详尽的流程。L1 上的 `ScrollChain` 合约和 zkEVM 本身都会验证 `L1MessageQueue` 中的每笔 L1 交易是否被包含并执行或是跳过。 +虽然批次(batch)的编码不包含 L1 交易,但是它会包含一个 *跳过位图(skip bitmap)*,向 `ScrollChain` 合约传达哪些 L1 消息被跳过。 +如果 L1 的存款消息被跳过,用户可以在 L1 上获得代币退款。 + + + +由于zkEVM证明的单位是块(chunk),因此也必须避免块的证明溢出。 +我们将电路容量检查器集成到Rollup中继器中来实现,以确保永远不会提出无法证明的块 + +## 验证规则 + +除了以太坊的区块验证规则外,Scroll还添加了一些额外的验证规则,来约束 L2 上包含 L1 消息和 zkEVM 电路容量限制。 +- 上述的 [电路容量检查器](#circuit-capacity-checker) 模块将验证区块大小在 zkEVM 的电路空间容量之内。 +- 与 L1 消息相关的规则: + - 区块中的 L1 消息必须是连续的,并且排列在区块的最前面。 + - 区块中的 L1 消息必须按照其在 `L1MessageQueue` 中的顺序,即他们必须按照递增的 `QueueIndex` 排序。 + - 区块中的 L1 消息必须与 `L1MessageQueue` 合约中的消息匹配。 +- 这些大多数规则在区块创建和验证期间都有考虑到。因此,如果区块提议者节点违反任何这些规则,跟随节点将拒绝其区块。 + + +## 对以太坊的修改小结 + +Scroll 执行节点继承了以太坊的大部分行为。但是,我们需要对 `l2geth` 进行一些重大更改,来实现更高效的证明。本节提供了非完整版的修改列表及其基本原理。 + +- **状态和存储树**:以太坊使用 MPT (Merkle-Partricia Trie) 作为其状态和合约存储的数据结构。该树的结构以及其使用的 Keccak 哈希使得 ZK 电路变得非常昂贵。 而 `l2geth` 使用 [zkTrie](/technology/sequencer/zktrie):一种使用 Poseidon 哈希默克尔二叉树,来存储状态和合约数据。 +- **状态账户(StateAccount)**:对于状态账户的修改已经在 [账户和状态](/technology/chain/accounts) 中说明。 +- **EVM**:对 EVM 的修改已经在 [和以太坊 EVM的区别](/technology/chain/differences) 中说明。 +- **交易手续费** + - 在 L2 上收取的所有费用都将发送到 Scroll 维护的 L2 费用库合约。 + - L1 费用: 除了覆盖 L2 区块空间和执行成本的 L2 gas 费用外,我们还收取 L1 费用,用于支付将交易提交到 L1 的成本。此费用与 RLP 编码的交易大小成正比。实际成本取决于 L2上 `L1GasOracle` 合约中存储的当前设置。这笔费用直接从交易发送方的余额中扣除(而不是从 gas 补贴中扣除)。 +- **L1MessageTx交易**:我们引入了一种新的交易类型 `L1MessageTx`。我们还添加了用于存储此类交易和相关元数据的数据库接口。 +- **同步服务**:监听 L1 上最终确认的区块,并从中收集 L1 消息。 +- **新的API**:`l2geth` 提供了新的API `scroll_traceBlockByNumberOrHash`,供证明器查询踪迹(trace)信息以生成证明。 diff --git a/src/content/docs/zh/technology/sequencer/rollup-node.mdx b/src/content/docs/zh/technology/sequencer/rollup-node.mdx new file mode 100644 index 000000000..18eadbf7a --- /dev/null +++ b/src/content/docs/zh/technology/sequencer/rollup-node.mdx @@ -0,0 +1,33 @@ +--- +section: technology +date: Last Modified +title: "Rollup 节点" +lang: "zh" +permalink: "technology/sequencer/rollup-node" +whatsnext: { "zkTrie": "/zh/technology/sequencer/zktrie/" } +--- + +Rollup 节点负责将 Scroll 区块拆分成适合在 L1 上证明和提交的部分,其中的两个主要单元是 *块(Chunk)* 和 *批次(batches)* 处理。 +* 块(Chunk)是 L2 账本中连续的一部分,是 L2 区块的集合,而块是 zkEVM 证明的单位。 +* 批次(batches)是块的集合,最终和聚合证明提交给L1。 + +Rollup 节点具有以下子模块: +- 块提议者(Chunk Proposer):收集 L2 区块并提出块,同时强制执行某些约束(见下文)。 +- 批次提议者(Batch Proposer):收集块并提出批次,同时强制执行某些约束(见下文)。 +- 中继器: 提交批次数据和证明至 L1。 + +## 块和批次约束 + +与执行节点相比,rollup 节点是一个更直观,更简单的组件。 +它收集 L2 区块,创建块和批次,并将它们提交给 L1。 +在本节中,我们概述了 rollup 节点在块和批处理创建期间必须强制执行的主要约束。 + +块约束: +- **无证明溢出:** 使用电路容量检查器,我们确保在一个块中包含尽可能多的区块,而仍然不会导致证明溢出。 +- **L1 负载:** 从批次提议者中继承的约束,交易负载不能超过128KB。 + +批次约束: +- **L1 负载:** 以太坊对交易有效负载大小有 128KB 的硬编码限制 +- **L1 提交 gas:** 提交批次的 gas 成本与其中的区块和交易数量成正比。我们必须确保此成本不会超过 L1 区块的 Gas 限制。 +- **块数量:** 对于聚合证明器而言,批次中包含的最佳块数。 + diff --git a/src/content/docs/zh/technology/sequencer/zktrie.mdx b/src/content/docs/zh/technology/sequencer/zktrie.mdx new file mode 100644 index 000000000..90f3e137c --- /dev/null +++ b/src/content/docs/zh/technology/sequencer/zktrie.mdx @@ -0,0 +1,209 @@ +--- +section: technology +date: Last Modified +title: "zkTrie" +lang: "zh" +permalink: "technology/sequencer/zktrie" +whatsnext: { "zkEVM": "/zh/technology/zkevm/intro-to-zkevm/" } +excerpt: "zkTrie 是一种使用 Poseidon 哈希的稀疏 MPT 二叉树" +--- + +import Aside from "../../../../../components/Aside.astro" +import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import zktrie1 from "../_images/zktrie-arch.png" +import zktrie2 from "../_images/zktrie-insertion.png" +import zktrie3 from "../_images/zktrie-deletion.png" + +本文档介绍了 zkTrie,一种稀疏默克尔帕特里夏(以下简称MPT,Merkle Patricia Trie)二叉树,用于有效存储键值对。我们解释了树结构、构造、节点哈希和树操作,包括插入和删除。 + +您也可以浏览我们的 [zktrie 仓库](https://github.com/scroll-tech/zktrie). + +## 树结构 + +如上图所示,zkTrie 是一种稀疏 MPT 二叉树。 +在深入研究稀疏默克尔帕特里夏二叉树之前,让我们简单介绍一下 Merkle Trees 和 Patricia Tries。 +* **默克尔树(Merkle Tree)**: 默克尔树是一种树型结构,其中每个叶节点表示数据块的哈希值,每个非叶节点表示其子节点的哈希值。 +* **帕特里夏树(Patricia Trie)**: 帕特里夏树是一种压缩的树型结构,用于有效地存储键值对。它对具有相同键前缀的节点进行编码,来共享相同的路径,其中路径由节点键值确定。 + +如图 1 所示,zkTrie 中有三种类型的节点。 +- 分支节点: zkTrie 是一个二叉树,因此一个分支节点有两个子节点。 +- 叶节点: 叶节点保存键值对的数据。 +- 空节点:空节点是一种特殊类型的节点,表示拥有相同前缀的子节点为空。 + +在 zkTrie 中,我们使用 Poseidon 哈希来计算节点哈希,因为在 zk 电路中证明它更友好、更高效。 + + + +## 树的构建 + +给定一个键值对,我们首先使用 Poseidon 哈希函数对原始密钥(即帐户地址和存储密钥)进行哈希计算,得到相应叶节点的 *安全密钥(secure key)*。 +这可以使密钥均匀分布在密钥空间上。节点键值的哈希方法在下面的[节点哈希](#node-hashing)部分中进行了介绍。 + +我们通过遍历从最低有效位 (LSB, Least Significant Bit) 到最高有效位 (MSB, Most Significant Bit) 的安全密钥来编码新的叶节点的路径。在 +在每一个节点,如果位为 0,我们将遍历至左子节点;否则,遍历至右子节点。 + +我们将 zkTrie 的最大深度限制为 248,这意味着树只会遍历密钥较低的 248 位。 +因为安全密钥空间是 Poseidon 哈希使用的一个有限域,不占满整个 $2^{256}$ 的空间范围。 +而密钥的位表示在有限域下位数是不确定的,会在 ZK 电路中导致健全性问题。 +因此我们将密钥截断至较低的 248 位来完全占满 $2^{248}$ 的范围空间,这样在位表示上就不会有不确定因素。 + +此外,我们将只有一个叶节点的子树收缩为单个叶节点,来优化降低树的深度。例如在图 1 中,树总共有三个节点,键分别是 `0100`,`0010` 和 `1010`。 +因为只有一个节点的键后缀为 `00`,`0100` 的叶节点只遍历后缀`00`,并没有完全展开其键至深度为 4 处。 + +## 树的操作 + +### 插入 + + + +当我们向 zkTrie 插入新的叶节点时,如图 2 所示,有两种情况。 + +1. 当遍历节点键的路径时,它会到达一个空节点(如图 2a)。在这种情况下,我们只需要用这个叶节点替换这个空节点,并回溯路径以更新分支节点的默克尔哈希,直到根节点。 +2. 当遍历节点键的路径时,它会到达另一个叶节点 b (如图 2b)。在这种情况下,我们需要向下推送现有的叶节点 `b`,直到两个叶节点的键的下一个位不同。每一步下推中,我们需要将一个空的同级节点插入到分支节点。当我们达到位不同的层级时,我们根据位放置两个叶节点 `b` 和 `d`。最后,我们回溯路径并更新所有分支节点的默克尔哈希。 + +### 删除 + + + +叶节点的删除类似于插入。如图 2 所示,也有两种情况。 + +1. 要删除的叶节点的同级节点是分支节点(如图 3a)。在这种情况下,我们可以简单地用一个空节点替换节点 `a`,并更新其的父节点哈希,直到根节点。 +2. 要删除的叶节点的同级节点是叶节点(如图 3b)。与情况 1 类似,我们首先用空节点替换叶节点,并开始向上收缩其同级节点,直到其同级节点不是空节点。例如在图 3b 中,我们将叶节点 `b` 替换为空节点。由于节点的同级节点现在变为空节点,因此我们需要将节点 `c` 向上移动一级并替换其父节点。此时,节点 `c` 的新同级节点 `e` 仍然是空节点。因此,我们再次向上移动节点 c 。现在 `c` 节点的同级是节点 `a`,一个叶节点,自此删除过程完成。 + +请注意,有效的 zkTrie 中叶节点的同级节点不能是空节点。否则,我们应该一直修剪子树并将叶节点向上移动。 + +## 节点哈希 + +在本节中,我们将介绍如何计算叶节点的安全密钥和默克尔哈希值。两类哈希计算中,我们都是用 arity 为 2 的 Poseidon 哈希算法。在 Scroll 中,Poseidon 哈希函数被配置为每次接受两个域元素和 `domain_value` 作为输入,`domain_value`为域分离的初始上下文,Poseidon 哈希函数表示如下 +``` +h{domain_value}(input1, input2) +``` + +### 空节点 + +空节点的节点哈希值为 0。 + +### 分支节点 + +分支节点哈希的计算方式如下 + +```go +branchNodeHash = h{BranchNodeType}(leftChildHash, rightChildHash) +``` + +### 叶节点 + +叶节点的节点哈希计算如下。 + +```go +leafNodeHash = h{LeafNodeType}(nodeKey, valueHash) +``` + +计算涉及两个字段 `nodeKey` 和 `valueHash`. +- `nodeKey` 对原始密钥哈希处理而来。Poseidon 哈希中使用的域值为 256。 +- `valueHash` 通过对叶节点值进行哈希处理来计算。Poseidon 哈希中使用的域值为 `256 * n`,其中 `n` 是叶节点值中的元素数。 + +叶节点有两种类型:以太坊账户和存储键值对。接下来,我们将分别介绍每个叶节点类型的节点键和值哈希的计算方法。 + +#### 以太坊账户叶节点 +对于以太坊账户叶节点,它由以太坊地址和账户状态数据结构组成。安全密钥源自以太坊地址。 +```go +var address byte[20] // 20 bytes in big-endian +valHi := address[0:16] +valLo := address[16:20] * 2^96 // padding 12 bytes of 0 at the end +nodeKey := h{256}(valHi, valLo) +``` + +Scroll 中的帐户状态结构由以下字段组成( Fr 表示有限域,为 254 位值) + +- `Nonce`: u64 +- `Balance`: u256, 但视为 Fr +- `StorageRoot`: Fr +- `KeccakCodeHash`: u256 +- `PoseidonCodeHash`: Fr +- `CodeSize`: u64 + +在计算值哈希之前,首先将状态帐户封装至 `u256` 值列表中。封装方案是 + +```text +(The following scheme assumes the big-endian encoding) +[0:32] + [0:16] Reserved with all 0 + [16:24] CodeSize, uint64 in big-endian + [24:32] Nonce, uint64 in big-endian +[32:64] Balance +[64:96] StorageRoot +[96:128] KeccakCodeHash +[128:160] PoseidonCodehash +(total 160 bytes) +``` + +封装函数同样会返回一个 `flag` 值和 `u256` 的值向量。其中 `flag` 是一个位图,表示向量中的每一个 `u256` 值是否可以被视作域元素 (Fr)。状态帐户的 `flag` 值为 8,如下所示。 + +``` + +--------------------+---------+------+----------+----------+ + index | 0 | 1 | 2 | 3 | 4 | + +--------------------+---------+------+----------+----------+ + u256 | nonce||codesize||0 | balance | root | keccak | poseidon | + +--------------------+---------+------+----------+----------+ +flag bit | 0 | 0 | 0 | 1 | 0 | + +--------------------+---------+------+----------+----------+ + (LSB) (MSB) +``` + +值哈希分为两步计算: +1. 将不能表示为 Poseidon 哈希的域元素的值转换为域元素。 +2. 在二叉树结构中组合字段元素,直到树的根节点为值哈希。 + +第一步中,当 `flag` 中位为 1,表示 `u256` 值不能作为域元素处理时,我们将该值拆分成 high-128bit 和 low-128bit 值,再将其传递给 Poseidon 哈希派生出一个域元素值,即 `h(valueHi, valueLo)`。 + +```go +// convert Keccak codehash to a field element +compressedKeccakCodeHash := h{512}(keccakCodeHash[0:16], keccakCodeHash[16:32]) +``` + +其次,值哈希的计算方式如下所示。 + +```go +domain := 256 * 5 // 5 elements to compute the valueHash +valueHash := + h{domain}( + h{domain}( + h{domain}(nonce||codesize||0, balance), + h{domain}( + storageRoot, + compressedKeccakCodeHash, + ), + ), + poseidonCodeHash, + ) +``` + +#### 存储叶节点 + +存储叶节点对键值对进行编码,键和值都是 `u256` 值。该叶节点的安全密钥派生自存储密钥。 + +```go +var storageKey byte[32] // 32 bytes in big-endian +valHi := storageKey[0:16] +valLo := storageKey[16:32] +nodeKey := h{256}(valHi, valLo) +``` + +存储值是一个 `u256` 值。存储值的 `flag` 值为 1,如下所示。 + +``` + +--------------+ + index | 0 | + +--------------+ + u256 | storageValue | + +--------------+ +flag bit | 1 | + +--------------+ +``` + +值哈希的计算方式如下 + +```go +valueHash = h{512}(storageValue[0:16], storageValue[16:32]) +``` diff --git a/src/content/docs/zh/technology/zkevm/intro-to-zkevm.md b/src/content/docs/zh/technology/zkevm/intro-to-zkevm.md new file mode 100644 index 000000000..d004333fb --- /dev/null +++ b/src/content/docs/zh/technology/zkevm/intro-to-zkevm.md @@ -0,0 +1,30 @@ +--- +section: technology +date: Last Modified +title: "zkEVM 介绍" +lang: "zh" +permalink: "technology/intro-to-zkevm" +excerpt: "ZK rollups 被广泛认同为以太坊的理想扩容方案。" +whatsnext: { "zkEVM 概览": "/zh/technology/zkevm/zkevm-overview" } +--- + +## 入门介绍和出发点 + +ZK rollups 被广泛认为是以太坊的理想扩容解决方案。它们继承了以太坊一层的强大安全性,与其他二层解决方案相比,它们提供了最快的交易最终确认。 + +ZK rollup 的基本思想是在链下执行交易,并生成执行有效性的简洁证明。然后,这些简洁的证明可以发布在以太坊一层上并得到验证。ZK rollups 提高了可扩展性,因为验证一批次交易的证明要比重新执行一批次交易便宜得多。 + +ZK rollup 可以根据它们支持的交易类型分为特定应用程序的 rollups 和通用 rollups。特定应用程序的 ZK rollups 专为特定交易集而设计,例如支付和互换,或玩家在链上游戏中的操作集合。在这些情况下,rollup 只需要生成证明可以支持特定原语的正确性,例如游戏玩家的有效状态转换。 + +另一方面,通用 ZK rollup 支持更广泛的交易和计算。这些 rollups 使用虚拟机 (VM) 执行汇编代码,然后生成证明,以证明已根据虚拟机的规范正确执行交易。不同 ZK rollup 中用于计算的虚拟机有所不同。一些项目选择构建自己的虚拟机,针对快速生成证明进行了优化。其他项目选择使用 EVM,以实现与以太坊生态系统的最佳兼容性。 + +Scroll 是一个通用的 ZK rollup,它使用 EVM 进行链下计算。Scroll 的执行层功能与以太坊类似 —— 交易被打包至区块,然后区块根据 [EVM](https://ethereum.org/en/developers/docs/evm/) (我们实际上使用的一个 [修改版本](https://github.com/scroll-tech/go-ethereum) 的 [Geth](https://geth.ethereum.org/))的规范执行。这意味着用户可以像与以太坊交互一样与 Scroll 进行交互。这也意味着开发者可以在 Scroll 之上进行开发,就像他们在以太坊之上进行开发一样。 + +然而,实现以太坊与 ZK rollup 的兼容性带来了一个巨大的挑战 —— rollup 必须能够生成链下 EVM 计算已正确执行的证明。这就是 “zkEVM” 的本质:**zkEVM 是一个证明 EVM 正确执行的系统。** + +EVM 最初在设计时没有考虑 ZK rollups,因此事实证明,构建 zkEVM 非常具有挑战性。然而,我们 Scroll 并没有因为挑战而退缩,并且一直在与 [以太坊隐私和扩容研究团队](https://appliedzkp.org/) 合作,努力使 zkEVM 成为现实。 + +## 了解更多 + +- [博客文章](https://scroll.io/blog/zkEVM) - zkEVM 介绍 +- [zkEVM 概览](https://youtu.be/NHwd-gJ8xg4) - Haichen Shen diff --git a/src/content/docs/zh/technology/zkevm/zkevm-overview.mdx b/src/content/docs/zh/technology/zkevm/zkevm-overview.mdx new file mode 100644 index 000000000..653425853 --- /dev/null +++ b/src/content/docs/zh/technology/zkevm/zkevm-overview.mdx @@ -0,0 +1,62 @@ +--- +section: technology +date: Last Modified +title: "zkEVM 概览" +lang: "zh" +permalink: "technology/zkevm-overview" +excerpt: "为了了解如何构建 zkEVM 来证明 EVM 的执行,我们需要首先回到 EVM 本身。" +whatsnext: { "跨链桥概览": "/zh/technology/bridge/bridge-overview" } +--- + +import ClickToZoom from "../../../../../components/ClickToZoom.astro" +import zkevm1 from "../_images/zkevm1.png" +import zkevm2 from "../_images/zkevm2.png" +import zkevm3 from "../_images/zkevm3.png" + +## EVM + +为了了解如何构建 zkEVM 来证明 EVM 的执行,我们需要首先回到 EVM 本身 + +EVM 可以建模为一个状态转换函数。它指定了一个转换函数,该函数 `f` 在给定初始世界状态和交易 `T` 的情况下,输出一个新的世界状态 `S’`:`f(S,T) = S'`。 + +“世界状态”被建模为[修改版本的默克尔-帕特里夏树(MPT)](https://ethereum.org/en/developers/docs/data-structures-and-encoding/patricia-merkle-trie/) 。 +其中包含网络的所有持久性数据。这包括所有外部所有账户 (EOA) 和智能合约账户的信息。智能合约账户具有保存智能合约字节码和持久存储的子树。 + +EVM 通过执行新的交易计算生成计算结果,并相应对世界状态进行更改。EVM 计算适用于瞬态数据存储(堆栈和内存)以及持久数据存储(合约字节码和存储)。 + + + +由单个交易触发的计算将被分解为称为“操作码”的小型机器指令,EVM 可以直接理解和执行这些指令。每个操作码的表现在[以太坊黄皮书](https://ethereum.github.io/yellowpaper/paper.pdf)中都有规定。因此,交易的执行可以用“执行踪迹(execution trace)”来概括,它只是操作码执行的有序列表。 +以太坊执行客户端(例如 [Geth](https://geth.ethereum.org/))可以显式输出其所执行计算的分步执行踪迹。 + + + +当操作码被执行时,状态树会发生变化。这会产生具有新状态根的新状态树。 + +## 证明 EVM 执行 + +zkEVM 的目标是生成证明,确保交易执行的有效性。 +换言之,给定一个初始世界状态 `S`、一个交易 `T` 和一个由此产生的世界状态 `S'`,zkEVM 必须证明 `f(S,T) = S'` ,其中 `f` 是以太坊黄皮书中指定的状态转换函数。 + +为了证明转换函数执行的有效性,我们将交易执行分解为分步执行踪迹。 +`f(S,T)` 的执行将展开为按顺序执行的操作码执行列表。 +执行跟踪可以视为“见证”,证明状态转换 `f(S,T) = S'` 的正确性 - 从某种意义上说,踪迹是状态如何从 `S` 到 `S'` 的逐步分解。 + +然后,问题被简化为证明以下内容: + +- 执行踪迹是 _正确的_. + - 每个单独的操作码都根据以太坊黄皮书规范正确执行。 + - 例如, `ADD` 操作码必须从堆栈中弹出两个值,并将其总和推送到堆栈。 + - 证明必须证明每个操作码都以正确的行为执行,包括对瞬态数据存储(堆栈和内存)或持久数据存储(合约字节码和存储)的任何更改。 + - 正在执行的操作码的有序列表本质上是正确的由交易触发的操作码列表。 + - 这包括正确加载初始交易调用数据,以及任何调用的合约的字节码。 +- 执行踪迹从初始状态 `S` 开始,结果为状态 `S'`。 + + + +在后续章节中,我们将深入探讨如何证明 EVM 执行跟踪的正确性。 + +## 了解更多 + +- Cypherpunks 中关于 EVM 的 [GitBook 章节](https://cypherpunks-core.github.io/ethereumbook/13evm.html) +- [zkEVM 概览](https://youtu.be/NHwd-gJ8xg4) - Haichen Shen diff --git a/src/content/docs/zh/user-guide/_images/bridge1.png b/src/content/docs/zh/user-guide/_images/bridge1.png new file mode 100644 index 000000000..dd552310e Binary files /dev/null and b/src/content/docs/zh/user-guide/_images/bridge1.png differ diff --git a/src/content/docs/zh/user-guide/_images/bridge2.png b/src/content/docs/zh/user-guide/_images/bridge2.png new file mode 100644 index 000000000..e3fe4701f Binary files /dev/null and b/src/content/docs/zh/user-guide/_images/bridge2.png differ diff --git a/src/content/docs/zh/user-guide/_images/bridge3.png b/src/content/docs/zh/user-guide/_images/bridge3.png new file mode 100644 index 000000000..03772fee9 Binary files /dev/null and b/src/content/docs/zh/user-guide/_images/bridge3.png differ diff --git a/src/content/docs/zh/user-guide/_images/bridge4.png b/src/content/docs/zh/user-guide/_images/bridge4.png new file mode 100644 index 000000000..a060b2ce3 Binary files /dev/null and b/src/content/docs/zh/user-guide/_images/bridge4.png differ diff --git a/src/content/docs/zh/user-guide/_images/bridge5.png b/src/content/docs/zh/user-guide/_images/bridge5.png new file mode 100644 index 000000000..7e75aeb4d Binary files /dev/null and b/src/content/docs/zh/user-guide/_images/bridge5.png differ diff --git a/src/content/docs/zh/user-guide/_images/bridge6.png b/src/content/docs/zh/user-guide/_images/bridge6.png new file mode 100644 index 000000000..80066a330 Binary files /dev/null and b/src/content/docs/zh/user-guide/_images/bridge6.png differ diff --git a/src/content/docs/zh/user-guide/_images/bridge7.png b/src/content/docs/zh/user-guide/_images/bridge7.png new file mode 100644 index 000000000..66ee3ff94 Binary files /dev/null and b/src/content/docs/zh/user-guide/_images/bridge7.png differ diff --git a/src/content/docs/zh/user-guide/_images/bridge8.png b/src/content/docs/zh/user-guide/_images/bridge8.png new file mode 100644 index 000000000..4b78a8b9e Binary files /dev/null and b/src/content/docs/zh/user-guide/_images/bridge8.png differ diff --git a/src/content/docs/zh/user-guide/bridge.mdx b/src/content/docs/zh/user-guide/bridge.mdx new file mode 100644 index 000000000..b53f10cc8 --- /dev/null +++ b/src/content/docs/zh/user-guide/bridge.mdx @@ -0,0 +1,126 @@ +--- +section: gettingStarted +date: Last Modified +title: "跨链桥" +lang: "zh" +permalink: "user-guide/bridge/" +excerpt: "To start bridging assets from Sepolia, navigate to the portal bridge app." +--- + +{/* // import ClickToZoom from "../../../../components/ClickToZoom.astro" */} +{/* // import bridge1 from "./\_images/bridge1.png" */} +{/* // import bridge2 from "./\_images/bridge2.png" */} +{/* // import bridge3 from "./\_images/bridge3.png" */} +{/* // import bridge4 from "./\_images/bridge4.png" */} +{/* // import bridge5 from "./\_images/bridge5.png" */} +{/* // import bridge6 from "./\_images/bridge6.png" */} +{/* // import bridge7 from "./\_images/bridge7.png" */} +{/* // import bridge8 from "./\_images/bridge8.png" */} + +{/* TODO: Update all instructions after being able to walk through the whole flow. */} + +从访问我们的[跨链桥](https://scroll.io/bridge) 应用开始![^thanks-hop] 跨链桥同时支持 **存款** and **提款** 操作, 允许用户无需信任地将资产从Sepolia测试网转移到Scroll Sepolia测试网。 +[^thanks-hop]: 从[Hop Exchange]('https://hop.exchange/')的 UI 分叉而来 🙌 + +存款最多可能需要 15 分钟才能在 Scroll 上可用。 + +提款需要在提款完成后在 Sepolia 上进行第二次互动,可能需要更长的时间。 + +:::caution[跨链交易需要等待很长时间?] +上述时间预估是正常网络行为和活动时的值。由于我们每个 L2 区块仅处理队列中一定的 L1 交易,因此在网络异常拥堵时,跨链桥消息可能需要更长的时间才能包含在 Scroll 中 +::: + +## 从 Sepolia 存款到 Scroll Sepolia + +### 操作 + +1. 首先,导航到[Scroll 跨链桥](https://scroll.io/bridge),然后按“连接钱包”。 +1. 在应用程序中,确保以太坊 **Sepolia** 位于顶部,**Scroll Sepolia** 位于底部。您可以单击“↓”按钮切换其位置。 +1. 选择要从 **Sepolia** 转移到 **Scroll Sepolia** 的代币。如果您是第一次桥接,请尝试“ETH”。 +1. 如果这是您第一次转移特定的ERC20代币,您必须批准Sepolia 跨链桥合约才能访问您的ERC20代币 +1. 接下来,点击 **发送到Scroll Sepolia** 按钮进行存款。您的钱包将要求确认转账交易。 +1. 一旦发送并确认转账交易后,代币将从您的Sepolia钱包中扣除。 +1. 您可以随时通过按右上角钱包地址旁边的“历史记录”图标来检查交易状态。 + +### 代币何时到达您的 Scroll Sepolia 钱包? + +可能需要 8 到 14 分钟(等待区块在 Sepolia 上变得[_安全_](https://www.alchemy.com/overviews/ethereum-commitment-levels#what-are-ethereum-commitment-levels)),代币才会显示在您的 Scroll Sepolia 钱包中。 + +{/* You can check the progress of deposit transactions as follows: */} + +{/* ##### 1. Click the "History" icon next to your wallet address in the top-right corner. */} + +{/* */} + +{/* The pop-up panel lists the most recent transactions made in the Bridge app. There are two statuses: Sepolia status and Scroll Sepolia status. For deposit transactions (L1 -> L2), once your transaction becomes _Safe_ on Sepolia (**8 to 14 minutes**), you will see the **`success`** status shown. Your funds will be relayed to Scoll Sepolia after this. */} + +{/* The Recent Bridge Transactions window should give you an estimate of the time expected before your transaction is _Safe_ on Sepolia. */} + +{/* ##### 2. Click on the most recent transaction’s Sepolia transaction hash. */} + +{/* */} + +{/* It will open the Transaction Details page in a new tab. You can see this transaction is confirmed on Sepolia. To check the Block's confirmation status, click the Block number and read the "Status" field. */} + +{/* */} + +{/* ##### 3. Return to the Bridge app and wait! */} + +{/* Once your transaction status shows **`success`** on Scroll Sepolia, you should see the funds in your Scroll L2 wallet and a transaction hash: */} + +{/* */} + +## 从 Scroll Sepolia 往 Sepolia 提款 + +### 操作 + +#### 提交您的提款交易 + +1. 首先,切换到钱包中的**Scroll Sepolia**网络。 +1. 在应用程序中,确保 **Scroll Sepolia** 位于顶部,以太坊 **Sepolia** 位于底部。您可以单击“↓”按钮切换位置。 +1. 选择要从 **Scroll Sepolia** 转移到 **Sepolia** 的代币。如果您是第一次桥接,请尝试“ETH”。 +1. 如果这是您第一次转移特定的ERC20代币,您必须**批准**Scroll Sepolia 跨链桥合约才能访问您的ERC20代币。 +1. 接下来,点击 **发送到以太坊 Sepolia** 按钮进行提款。您的钱包将要求确认转账交易。 +1. 一旦转账交易被发送并确认,代币将从您的Scroll Sepolia钱包中扣除。 + +#### 提交执行提款交易 + +{/* TODO: finish the additional instructions, better estimate "wait time" */} + +_其余步骤发生在Scroll Sepolia上,但您首先必须等待您的交易在以太坊Sepolia上得到完全证明(“最终确认”)。此过程最多可能需要四个小时。._ + +1. 当您的提款交易在以太坊Sepolia上完成时,您将看到“最近交易”区域中的“认领”按钮。 +1. 点击“认领”按钮提交执行提款交易。 +1. 一旦提交后,您提取的资金应立即出现在您的Sepolia钱包中。 + +### 代币什么时候会到达您的Sepolia钱包? + +转移的代币将在包含您的执行提款交易的区块在Sepolia上确认后,立即到达您的Sepolia钱包。 + +{/* TODO: check architecture link is live */} + +:::tip[Rollup 状态] +Rollup 状态 `最终确认` 表明,通过在Sepolia上验证链上的有效性证明,已经证明了该区块中交易的正确执行。有关Rollup状态的详细信息,请参阅 [Scroll 的架构概览](/technology)。 +::: + +{/* You can check the progress of withdrawal transactions as follows: */} + +{/* 1. Click your wallet address at the top-right corner of the Bridge web app. */} + +{/* */} + +{/* The pop-up panel lists the most recent transactions you made in the Bridge app (see the image below). There are two statuses: L1 status and L2 status. In this case, because we are bridging from L2 -> L1, we will quickly get a **`success`** status after submitting the transaction to the L2 Bridge. L1, on the other hand, takes **10 minutes to a few hours** to reach **`success`**. */} + +{/* 1. Click on the most recent transaction’s L2 transaction hash: */} + +{/* */} + +{/* It will open the _Transaction Details_ page in a new tab. You can see this transaction is confirmed on L2. */} + +{/* */} + +{/* The transaction is confirmed on L2, but still needs to be finalized on Goerli. */} + +{/* 1. Go back to the [Bridge](https://scroll.io/bridge) app. It takes about 10 minutes before the token shows up in your Goerli wallet. Once your transaction status shows success on L2, you should see the funds in your Goerli wallet and a transaction hash: */} + +{/* */} diff --git a/src/content/docs/zh/user-guide/common-errors.mdx b/src/content/docs/zh/user-guide/common-errors.mdx new file mode 100644 index 000000000..d06ebb107 --- /dev/null +++ b/src/content/docs/zh/user-guide/common-errors.mdx @@ -0,0 +1,41 @@ +--- +section: gettingStarted +date: Last Modified +title: "常见错误" +lang: "zh" +permalink: "user-guide/common-errors/" +excerpt: "Seeing an error when trying to interact with Scroll Sepolia Testnet? Here are some common configuration errors and how to quickly fix them." +--- + +## 在小狐狸钱包中发送交易时使用不正确的nonce + +当存储在小狐狸钱包中的本地nonce与Scroll 测试网节点中的nonce不同时,您会遇到此错误。这可能是因为最近有一个待处理的交易。 + +要解决此问题,您需要在小狐狸钱包中重置您的帐户以使用Scroll Sepolia 测试网。重置帐户的步骤如下 + +1. 在浏览器中打开**小狐狸钱包**扩展插件 +2. 选择顶部区域中的**Scroll Sepolia测试网** +3. 点击右上角的**账户图标** +4. 选择 **设置** +5. 前往 **高级** +6. 点击 **重置账户** + +在小狐狸钱包账户重置期间,您不会丢失任何资产。 + +:::caution[提醒] +删除和重新添加网络不足以解决此问题 - 您必须重置您的帐户。 +::: + +## 确认跨链桥/Swap交易时没有任何反应 + +如果没有出现错误或控制台日志,这可能是由于nonce问题,请按照上述[#在小狐狸钱包中发送交易时使用不正确的nonce](#incorrect-nonce-error-when-sending-a-transaction-in-metamask)中所述,重置您的小狐狸钱包帐户。 + +## 区块链浏览器显示 "内部服务器错误" + +使用隐身窗口,或打开浏览器开发者控制台并移除 Cookie(或所有 `_explorer_key` Cookie)。[请参阅本指南](https://www.contentstack.com/docs/developers/how-to-guides/clear-caches-and-cookies-in-different-browsers/),了解如何删除 Cookie。 + +## 在小狐狸钱包中发送最大数量的ETH导致“失败”错误 + +使用小狐狸钱包发送ETH时,如果您尝试发送“最大”金额,将导致“失败”错误。这是因为小狐狸钱包没有考虑Rollup在常规Gas费外的额外“L1 费用”,并且不足以支付交易Gas所需的费用。 + +要解决此问题,请手动将ETH的数量降低到比建议的要小一点,交易就可以完成。 diff --git a/src/content/docs/zh/user-guide/faucet.mdx b/src/content/docs/zh/user-guide/faucet.mdx new file mode 100644 index 000000000..ea7966159 --- /dev/null +++ b/src/content/docs/zh/user-guide/faucet.mdx @@ -0,0 +1,37 @@ +--- +section: gettingStarted +date: Last Modified +title: "水龙头" +lang: "zh" +permalink: "user-guide/faucet/" +whatsnext: { "将 ETH 桥接至 Scroll Sepolia": "/zh/user-guide/bridge" } +excerpt: "To interact with our testnet, you first need to acquire Sepolia ETH. There are a few Sepolia faucet apps to get you started." +--- + +要与我们的测试网互动,您首先需要在*Sepolia测试网*上接收测试网ETH。然后,您可以从*Sepolia测试网*桥接到*Scroll Sepolia测试网*。 + +## Sepolia 水龙头 + +每个水龙头都有自己的规则和要求,因此您可能需要尝试一些水龙头,然后才能找到适合您的水龙头。 + +以下是一些Sepolia水龙头应用程序: + +- [https://sepoliafaucet.com](https://sepoliafaucet.com/) +- [https://sepolia-faucet.pk910.de](https://sepolia-faucet.pk910.de) +- [https://faucet.quicknode.com/drip](https://faucet.quicknode.com/drip) +- [https://faucet.chainstack.com](https://faucet.chainstack.com) + +一旦您在Sepolia上收到ETH,您应该会在Sepolia网络上的钱包中看到它。它们可能需要几秒钟才能出现,但您可以通过在 [Sepolia 区块浏览器](https://sepolia.etherscan.io/) 上查找您的地址交易来检查状态。 + +:::note[适度使用!] +大多数水龙头只允许每 24 小时请求一次测试代币。 +::: + +## Scroll Sepolia 水龙头 + +如果您不想与跨链桥互动,一些水龙头可以直接发送 Scroll Sepolia ETH。 + +- [https://scroll.l2scan.co/faucet](https://scroll.l2scan.co/faucet) +- [https://www.covalenthq.com/faucet/](https://www.covalenthq.com/faucet) +- [https://faucet.quicknode.com/scroll/sepolia](https://faucet.quicknode.com/scroll/sepolia) +- [https://bwarelabs.com/faucets/scroll-testnet](https://bwarelabs.com/faucets/scroll-testnet) diff --git a/src/content/docs/zh/user-guide/index.mdx b/src/content/docs/zh/user-guide/index.mdx new file mode 100644 index 000000000..fceffe67a --- /dev/null +++ b/src/content/docs/zh/user-guide/index.mdx @@ -0,0 +1,43 @@ +--- +section: gettingStarted +date: Last Modified +title: "Scroll Sepolia 测试网用户指南" +lang: "zh" +permalink: "user-guide/" +excerpt: "Thank you for testing out our Sepolia Testnet. The Sepolia Testnet consists of Ethereum's Sepolia Testnet and the Scroll Sepolia test network." +whatsnext: { "设置你的钱包": "/zh/user-guide/setup" } +--- + +import Aside from "../../../../components/Aside.astro" + + + +感谢您测试 Scroll Sepolia 测试网。如果您有任何疑问或想提供反馈,请加入我们的 [Discord](https://discord.gg/scroll)! + +Sepolia 测试网由 _以太坊的 Sepolia 测试网_ 和 _Scroll Sepolia 测试网络_ 组成。Sepolia 是以太坊的一个测试网络,而 Scroll Sepolia 是一个部署在前者之上的 zkRollup 测试网。有一些预先部署的演示程序: 一个 Sepolia 和 Scroll Sepolia 之间的[跨链桥](https://scroll.io/bridge),[^1] 一个 Scroll Sepolia 的[区块链浏览器](https://sepolia-blockscout.scroll.io/) ,[^2]和一个[rollup 浏览器](https://scroll.io/rollupscan). + +要查看 L1 的交易,请查看 Etherscan 的[Sepolia 浏览器](https://sepolia.etherscan.io/)。要查看 L2 的交易,您可以使用 Scroll 的区块浏览器,但您可能也会想尝试[Dora](https://www.ondora.xyz/network/scroll-sepolia/interactions)或[L2Scan](https://scroll.l2scan.co/)提供的附加功能。 + +以下是体验测试网的参考流程: + +1. 将[Sepolia 测试网](https://scroll.io/portal)配置添加到您的钱包中。 +2. 从任何以太坊水龙头应用程序请求*Sepolia 网络*中的测试代币(请参阅 [水龙头](/zh/user-guide/faucet) 文章)。 +3. 通过 [跨链桥](https://scroll.io/bridge) 应用程序将测试代币从*Sepolia 网络*转移到*Scroll Sepolia*。 +4. 使用您的钱包将代币转移到*Scroll Sepolia*上的其他钱包。 +5. 探索我们的生态系统,与 [Uniswap](http://uniswap-showcase.sepolia.scroll.xyz/) 等合约互动。 +6. 通过 [跨链桥](https://scroll.io/bridge) 应用程序将测试代币从*Scroll Sepolia*提取到*Sepolia 网络*。 + +您可以在本用户指南的其余部分找到每个应用的说明。 + +## 问题与反馈 + +如果您遇到任何问题,请加入我们的 [Discord](https://discord.gg/scroll) 并在频道 #general-support 中与我们交流。我们也很乐意听到您对如何改善您的体验的想法或反馈。 + +[^1]: 从 [Hop Exchange](https://hop.exchange/) UI 分叉而来 🐇🙌 +[^2]: 使用 [Blockscout](https://blockscout.com/) 出色的开源区块链浏览器 diff --git a/src/content/docs/zh/user-guide/setup.mdx b/src/content/docs/zh/user-guide/setup.mdx new file mode 100644 index 000000000..8bfecc78b --- /dev/null +++ b/src/content/docs/zh/user-guide/setup.mdx @@ -0,0 +1,41 @@ +--- +section: gettingStarted +date: Last Modified +title: "设置" +lang: "zh" +permalink: "user-guide/setup/" +whatsnext: { "从水龙头中获取Sepolia ETH": "/zh/user-guide/faucet" } +excerpt: "You need to have a wallet to interact with the Scroll Testnet. You can find some example wallets and configuration tips here." +--- + +import Aside from "../../../../components/Aside.astro" + +## 钱包 + +您需要有一个钱包才能与Scroll Sepolia测试网上的dApp进行交互。您可以在下面找到一些示例钱包和配置提示。我们的跨链桥应用程序支持小狐狸钱包(MetaMask),Coinbase钱包或任何支持WalletConnect的钱包。 + +### 小狐狸钱包(MetaMask) + +您可以从他们的[官方网站](https://metamask.io/download/)安装小狐狸钱包。 + +您可以将 Scroll Sepolia 测试网配置导入您的小狐狸钱包。为此,请访问 [Scroll Sepolia 门户网站](https://scroll.io/portal),然后单击“连接钱包”按钮并选择小狐狸钱包。接下来,单击Sepolia测试网和Scroll Sepolia测试网的“添加到小狐狸钱包”按钮。这将导入 Scroll Sepolia 测试网的链 ID 和 RPC URL。默认情况下,Sepolia 测试网也在小狐狸钱包配置中。要显示它,请单击小狐狸钱包网络选择下拉菜单中的“显示/隐藏测试网络”。 + + +### 手动网络配置(适用于其他钱包) + +**添加到钱包**链接可能不是和每个钱包都兼容。如果您在使用它们时遇到问题,您可能需要通过插入下表中的详细配置信息来手动添加 Sepolia 测试网和Scroll Sepolia 网络: + +| 网络名称 | Scroll Sepolia 测试网 | Sepolia Testnet | +| ------------------ | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| RPC URL | [https://sepolia-rpc.scroll.io/](https://sepolia-rpc.scroll.io/) | [https://eth-sepolia-public.unifra.io](https://eth-sepolia-public.unifra.io) | +| 链 ID | 534351 | 11155111 | +| 代币符号 | ETH | ETH | +| 区块链浏览器链接 | [https://sepolia-blockscout.scroll.io](https://sepolia-blockscout.scroll.io/) | [https://sepolia.etherscan.io](https://sepolia.etherscan.io) | + + diff --git a/src/content/docs/zh/user-guide/transfer-tokens.md b/src/content/docs/zh/user-guide/transfer-tokens.md new file mode 100644 index 000000000..31910a235 --- /dev/null +++ b/src/content/docs/zh/user-guide/transfer-tokens.md @@ -0,0 +1,18 @@ +--- +section: gettingStarted +date: Last Modified +title: "转移代币" +lang: "zh" +permalink: "user-guide/transfer-tokens/" +excerpt: "You can use your wallet as usual to transfer tokens within the Scroll Sepolia Testnet." +--- + +您可以使用钱包的正常功能在 Scroll Sepolia 测试网中转移代币 - 无需其他配置。 + +## 在小狐狸钱包中发送代币 + +1. 打开你的钱包,切换到 **Scroll Sepolia 测试网**. +2. 单击中间的**发送**按钮,然后在文本框中键入要转移到的地址。 +3. 在“资产”框中选择代币,然后键入要转移的代币数量。 +4. 单击**下一步**按钮,然后单击**确认**按钮以发送交易。 +5. 发送后,您可以在钱包的**活动**选项卡中找到交易。 diff --git a/src/pages/[lang]/[...slug].astro b/src/pages/[lang]/[...slug].astro index ed531821b..af95acd26 100644 --- a/src/pages/[lang]/[...slug].astro +++ b/src/pages/[lang]/[...slug].astro @@ -45,10 +45,10 @@ if (!page.notTranslated) { const render = await page.render() Content = render.Content headings = render.headings -} else { - changeLanguage(params.lang) } +changeLanguage(params.lang) + const content = { ...page.data, lang: params.lang, diff --git a/src/pages/zh/home/ConnectUs.astro b/src/pages/zh/home/ConnectUs.astro index 7b0f46139..dedb49e10 100644 --- a/src/pages/zh/home/ConnectUs.astro +++ b/src/pages/zh/home/ConnectUs.astro @@ -8,20 +8,20 @@ import ContributeSvg from "~/assets/svgs/home/Contribute.svg?raw" const mediaList = [ { icon: DiscordSvg, - name: "Join our Discord", - content: "Connect with other Scroll developers and users.", + name: "加入我们的 Discord", + content: "与其他 Scroll 开发者和用户建立联系", link: "https://discord.gg/scroll", }, { icon: ForumSvg, - name: "Community Forum", - content: "Discuss and propose changes to Scroll’s core protocols.", + name: "社区论坛", + content: "讨论并提出对 Scroll 核心协议的更改。", link: "http://community.scroll.io/", }, { icon: ContributeSvg, - name: "Contribute to Scroll", - content: "Build with other developers.", + name: "为Scroll贡献", + content: "与其他开发者一起构建。", link: "https://github.com/scroll-tech/contribute-to-scroll", }, ] @@ -29,8 +29,8 @@ const mediaList = [
{ diff --git a/src/pages/zh/home/Navigate.astro b/src/pages/zh/home/Navigate.astro index 765074a6e..f38124f09 100644 --- a/src/pages/zh/home/Navigate.astro +++ b/src/pages/zh/home/Navigate.astro @@ -9,33 +9,33 @@ import SectionHeader from "~/components/SectionHeader/index.astro" const navList = [ { icon: StartSvg, - name: "Getting started", - content: "Bridge into Scroll and explore our dApp Ecosystem.", - link: "/en/getting-started/overview", + name: "入门", + content: "通过跨链桥进入 Scroll 并探索我们的 dApp 生态系统", + link: "/zh/getting-started/overview", }, { icon: DevelopSvg, - name: "Developers", - content: "Dive into Scroll’s developer documentation.", - link: "/en/developers", + name: "开发者", + content: "深入了解 Scroll 的开发者文档", + link: "/zh/developers", }, { icon: TechnologySvg, - name: "Technology", - content: "An overview of Scroll’s zkEVM Architecture.", - link: "/en/technology", + name: "技术", + content: "Scroll 的 zkEVM 架构概述", + link: "/zh/technology", }, { icon: LearnSvg, - name: "Learn", - content: "An introduction to the world of ZK and Scalability.", - link: "/en/learn", + name: "学习", + content: "介绍 ZK 和扩容的世界", + link: "/zh/learn", }, ] ---