From fab513e59b3df378ccf7971c0e8865006c88bc51 Mon Sep 17 00:00:00 2001 From: Kirill Date: Thu, 25 May 2023 14:23:42 -0700 Subject: [PATCH 01/40] ignore .env files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3c8122848..03f73abab 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ typechain-types cache artifacts +*.env From 2d52b467f5cf1419cdc3fcd6e77502b4ecc291ba Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 26 May 2023 16:12:36 -0700 Subject: [PATCH 02/40] add tenderly dirs to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 03f73abab..3399b131a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,7 @@ typechain-types cache artifacts +# hardhat-tenderly plugin +deployments + *.env From 3186f81bdc08e16d0d81ce59867410d4ef20b31d Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 26 May 2023 16:13:39 -0700 Subject: [PATCH 03/40] install-init tenderly and add new script to run devnet flows --- hardhat.config.ts | 46 +++-- package.json | 8 +- tenderly.yaml | 21 ++ yarn.lock | 499 ++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 540 insertions(+), 34 deletions(-) create mode 100644 tenderly.yaml diff --git a/hardhat.config.ts b/hardhat.config.ts index 00874051a..25c42a9f0 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,18 +1,20 @@ // eslint-disable-next-line @typescript-eslint/no-var-requires -require('dotenv').config(); +require("dotenv").config(); -import { HardhatUserConfig } from 'hardhat/config'; -import '@nomicfoundation/hardhat-toolbox'; -import '@nomiclabs/hardhat-ethers'; -import '@nomicfoundation/hardhat-network-helpers'; -import '@nomicfoundation/hardhat-chai-matchers'; -import 'solidity-coverage'; +import { HardhatUserConfig } from "hardhat/config"; +import * as tenderly from "@tenderly/hardhat-tenderly"; +import "@nomicfoundation/hardhat-toolbox"; +import "@nomiclabs/hardhat-ethers"; +import "@nomicfoundation/hardhat-network-helpers"; +import "@nomicfoundation/hardhat-chai-matchers"; +import "solidity-coverage"; -const config: HardhatUserConfig = { + +const config : HardhatUserConfig = { solidity: { compilers: [ { - version: '0.8.18', + version: "0.8.18", settings: { optimizer: { enabled: true, @@ -23,30 +25,42 @@ const config: HardhatUserConfig = { ], }, paths: { - sources: './contracts', - tests: './test', - cache: './cache', - artifacts: './artifacts', + sources: "./contracts", + tests: "./test", + cache: "./cache", + artifacts: "./artifacts", }, typechain: { - outDir: 'typechain', + outDir: "typechain", }, mocha: { timeout: 5000000, }, networks: { mainnet: { - url: 'https://mainnet.infura.io/v3/97e75e0bbc6a4419a5dd7fe4a518b917', + url: "https://mainnet.infura.io/v3/97e75e0bbc6a4419a5dd7fe4a518b917", gasPrice: 80000000000, }, goerli: { - url: 'https://goerli.infura.io/v3/77c3d733140f4c12a77699e24cb30c27', + url: "https://goerli.infura.io/v3/77c3d733140f4c12a77699e24cb30c27", timeout: 10000000, }, + devnet: { + // Add current URL that you spawned if not using automated spawning + url: `${process.env.DEVNET_RPC_URL}`, + chainId: 1, + }, }, etherscan: { apiKey: `${process.env.ETHERSCAN_API_KEY}`, }, + tenderly: { + project: `${process.env.TENDERLY_PROJECT_SLUG}`, + username: `${process.env.TENDERLY_ACCOUNT_ID}`, + }, }; +// TODO: do we even need this? +tenderly.setup(); + export default config; diff --git a/package.json b/package.json index de9e1fc65..e256bda33 100644 --- a/package.json +++ b/package.json @@ -20,12 +20,14 @@ "test": "hardhat test", "semantic-release": "semantic-release --tag-format='v${version}-dev'", "coverage": "hardhat coverage", - "check-coverage": "istanbul check-coverage --statements 90 --branches 87 --functions 89 --lines 90" + "check-coverage": "istanbul check-coverage --statements 90 --branches 87 --functions 89 --lines 90", + "devnet-op": "node ./tenderly/devnet-execute.ts" }, "pre-commit": [ "lint" ], "devDependencies": { + "@ensdomains/ensjs": "2.1.0", "@ethersproject/providers": "5.7.2", "@nomicfoundation/hardhat-chai-matchers": "1.0.6", "@nomicfoundation/hardhat-network-helpers": "^1.0.8", @@ -52,10 +54,10 @@ "solidity-coverage": "^0.8.2", "ts-node": "10.9.1", "typechain": "8.1.0", - "typescript": "^5.0.2", - "@ensdomains/ensjs": "2.1.0" + "typescript": "^5.0.2" }, "dependencies": { + "@tenderly/hardhat-tenderly": "^1.7.4", "dotenv": "16.0.3" }, "resolutions": { diff --git a/tenderly.yaml b/tenderly.yaml new file mode 100644 index 000000000..6b10f3b01 --- /dev/null +++ b/tenderly.yaml @@ -0,0 +1,21 @@ +account_id: e750f9f2-65bc-4765-84a8-7f8dbddd73ee +exports: + hardhat: + project_slug: whtcrw/project + rpc_address: 127.0.0.1:8545 + protocol: "" + forked_network: Mainnet + chain_config: + homestead_block: 0 + eip150_block: 0 + eip150_hash: "0x0000000000000000000000000000000000000000000000000000000000000000" + eip155_block: 0 + eip158_block: 0 + byzantium_block: 0 + constantinople_block: 0 + petersburg_block: 0 + istanbul_block: 0 + berlin_block: 0 + london_block: 0 +project_slug: project +provider: "" diff --git a/yarn.lock b/yarn.lock index 0ceb93843..fd0db91f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -318,7 +318,7 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/transactions" "^5.4.0" -"@ethersproject/contracts@5.7.0": +"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== @@ -532,7 +532,7 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/providers@5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -643,7 +643,7 @@ "@ethersproject/sha2" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/solidity@5.7.0": +"@ethersproject/solidity@5.7.0", "@ethersproject/solidity@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== @@ -742,7 +742,7 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/wordlists" "^5.4.0" -"@ethersproject/wallet@5.7.0": +"@ethersproject/wallet@5.7.0", "@ethersproject/wallet@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== @@ -1130,6 +1130,11 @@ resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.2.tgz#812d48929c3bf8fe840ec29eab4b613693467679" integrity sha512-NLDlDFL2us07C0jB/9wzvR0kuLivChJWCXTKcj3yqjZqMoYp7g7wwS157F70VHx/+9gHIBGzak5pKDwG8gEefA== +"@nomiclabs/hardhat-ethers@^2.1.1": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0" + integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== + "@nomiclabs/hardhat-etherscan@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.0.0.tgz#06e0d59787f01f1296d829e8d43fece50e7ffff1" @@ -1632,6 +1637,21 @@ dependencies: antlr4ts "^0.5.0-alpha.4" +"@tenderly/hardhat-tenderly@^1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@tenderly/hardhat-tenderly/-/hardhat-tenderly-1.7.4.tgz#1fae19005679cbc5e67c8bd6a93a58294b270eef" + integrity sha512-N1eVr/kiQQeMVAikjAEg5grEGBSl6ldvGoOF1Eg1ee7G+XRF0wWp3UF5kmsU3aBfvyLsJ1nt6wcBf/hGu/LWKA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@nomiclabs/hardhat-ethers" "^2.1.1" + axios "^0.27.2" + ethers "^5.7.0" + fs-extra "^10.1.0" + hardhat-deploy "^0.11.14" + js-yaml "^4.1.0" + tenderly "^0.5.1" + tslog "^4.3.1" + "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" @@ -1805,7 +1825,7 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== -"@types/qs@^6.2.31": +"@types/qs@^6.2.31", "@types/qs@^6.9.7": version "6.9.7" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== @@ -1969,6 +1989,14 @@ abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: module-error "^1.0.1" queue-microtask "^1.2.3" +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -2208,6 +2236,11 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" @@ -2346,6 +2379,21 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +axios@^0.27.2: + version "0.27.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" + integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== + dependencies: + follow-redirects "^1.14.9" + form-data "^4.0.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -2442,6 +2490,24 @@ bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +body-parser@1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" + integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + bottleneck@^2.18.1: version "2.19.5" resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.19.5.tgz#5df0b90f59fd47656ebe63c78a98419205cadd91" @@ -2734,7 +2800,7 @@ chokidar@3.3.0: optionalDependencies: fsevents "~2.1.1" -chokidar@3.5.3, chokidar@^3.4.0: +chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -2836,7 +2902,7 @@ cli-table3@^0.5.0: optionalDependencies: colors "^1.1.2" -cli-table3@^0.6.1, cli-table3@^0.6.3: +cli-table3@^0.6.1, cli-table3@^0.6.2, cli-table3@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg== @@ -2938,7 +3004,7 @@ columnify@^1.6.0: strip-ansi "^6.0.1" wcwidth "^1.0.0" -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -2980,6 +3046,11 @@ commander@^10.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.0.tgz#71797971162cd3cf65f0b9d24eb28f8d303acdf1" integrity sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA== +commander@^9.4.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + comment-parser@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.1.tgz#3d7ea3adaf9345594aedee6563f422348f165c1b" @@ -3031,6 +3102,13 @@ console-control-strings@^1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + content-hash@^2.5.2: version "2.5.2" resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" @@ -3040,6 +3118,11 @@ content-hash@^2.5.2: multicodec "^0.5.5" multihashes "^0.4.15" +content-type@~1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + conventional-changelog-angular@^5.0.0: version "5.0.13" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" @@ -3083,6 +3166,16 @@ conventional-commits-parser@^3.2.3: split2 "^3.0.0" through2 "^4.0.0" +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + cookie@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" @@ -3197,6 +3290,13 @@ death@^1.1.0: resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" integrity sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w== +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + debug@3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -3267,6 +3367,11 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -3295,6 +3400,11 @@ deprecation@^2.0.0, deprecation@^2.3.1: resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + detect-port@^1.3.0: version "1.5.1" resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" @@ -3378,6 +3488,11 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -3401,6 +3516,16 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +encode-utf8@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -3408,7 +3533,7 @@ encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -enquirer@^2.3.0: +enquirer@^2.3.0, enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -3515,6 +3640,11 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -3736,6 +3866,11 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + eth-ens-namehash@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" @@ -3886,7 +4021,7 @@ ethers@^4.0.40: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.0.13: +ethers@^5.0.13, ethers@^5.5.3, ethers@^5.7.0: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -3986,6 +4121,43 @@ execa@^7.0.0: signal-exit "^3.0.7" strip-final-newline "^3.0.0" +express@^4.18.1: + version "4.18.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" + integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.1" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.5.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.11.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" @@ -4073,6 +4245,19 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + find-replace@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" @@ -4158,7 +4343,14 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -follow-redirects@^1.12.1: +fmix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" + integrity sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w== + dependencies: + imul "^1.0.0" + +follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.9: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== @@ -4184,6 +4376,15 @@ form-data@^2.2.0: combined-stream "^1.0.6" mime-types "^2.1.12" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -4193,6 +4394,11 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + fp-ts@1.19.3: version "1.19.3" resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" @@ -4203,6 +4409,11 @@ fp-ts@^1.0.0: resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + from2@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" @@ -4222,6 +4433,15 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" +fs-extra@^10.0.0, fs-extra@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^11.0.0: version "11.1.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" @@ -4622,6 +4842,36 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +hardhat-deploy@^0.11.14: + version "0.11.29" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.29.tgz#e6d76e37fa2ed74d76d15b01f3849da3bda49a81" + integrity sha512-9F+MRFkEocelzB8d+SDDCcTL7edBYAj2S63ldknvfIIBSajeB6q1/jm+dlK1GjcWzAzw7EVoxtjJXzxAxZfZcg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/contracts" "^5.7.0" + "@ethersproject/providers" "^5.7.2" + "@ethersproject/solidity" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wallet" "^5.7.0" + "@types/qs" "^6.9.7" + axios "^0.21.1" + chalk "^4.1.2" + chokidar "^3.5.2" + debug "^4.3.2" + enquirer "^2.3.6" + ethers "^5.5.3" + form-data "^4.0.0" + fs-extra "^10.0.0" + match-all "^1.2.6" + murmur-128 "^0.2.1" + qs "^6.9.4" + zksync-web3 "^0.14.3" + hardhat-gas-reporter@1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.8.tgz#93ce271358cd748d9c4185dbb9d1d5525ec145e0" @@ -4887,6 +5137,11 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" +hyperlinker@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e" + integrity sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ== + iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -4943,6 +5198,11 @@ import-from@^4.0.0: resolved "https://registry.yarnpkg.com/import-from/-/import-from-4.0.0.tgz#2710b8d66817d232e16f4166e319248d3d5492e2" integrity sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ== +imul@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" + integrity sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA== + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -5043,6 +5303,11 @@ ip@^2.0.0: resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" @@ -5110,6 +5375,11 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -5275,6 +5545,13 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -5485,6 +5762,11 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" @@ -5897,6 +6179,11 @@ marked@^4.1.0: resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== +match-all@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" + integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== + mcl-wasm@^0.7.1: version "0.7.9" resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" @@ -5911,6 +6198,11 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + memory-level@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" @@ -5942,6 +6234,11 @@ meow@^8.0.0: type-fest "^0.18.0" yargs-parser "^20.2.3" +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -5952,6 +6249,11 @@ merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + micromatch@^4.0.0, micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" @@ -5965,13 +6267,18 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@~2.1.19: +mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mime@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" @@ -6259,6 +6566,11 @@ module-error@^1.0.1, module-error@^1.0.2: resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + ms@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" @@ -6314,6 +6626,15 @@ multihashes@^0.4.15, multihashes@~0.4.15: multibase "^0.7.0" varint "^5.0.0" +murmur-128@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" + integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== + dependencies: + encode-utf8 "^1.0.2" + fmix "^0.1.0" + imul "^1.0.0" + mute-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" @@ -6344,7 +6665,7 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -negotiator@^0.6.3: +negotiator@0.6.3, negotiator@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== @@ -6744,6 +7065,13 @@ obliterator@^2.0.0: resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + once@1.x, once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -6765,6 +7093,15 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" +open@^8.4.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -7007,6 +7344,11 @@ parse-json@^7.0.0: lines-and-columns "^2.0.3" type-fest "^3.8.0" +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -7057,6 +7399,11 @@ path-scurry@^1.6.1: lru-cache "^7.14.1" minipass "^4.0.2" +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -7210,6 +7557,14 @@ promise@^8.0.0: dependencies: asap "~2.0.6" +prompts@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + promzard@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/promzard/-/promzard-1.0.0.tgz#3246f8e6c9895a77c0549cefb65828ac0f6c006b" @@ -7222,6 +7577,14 @@ proto-list@~1.2.1: resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + psl@^1.1.28: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -7247,6 +7610,13 @@ qrcode-terminal@^0.12.0: resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + qs@^6.4.0, qs@^6.7.0: version "6.11.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.1.tgz#6c29dff97f0c0060765911ba65cbc9764186109f" @@ -7254,6 +7624,13 @@ qs@^6.4.0, qs@^6.7.0: dependencies: side-channel "^1.0.4" +qs@^6.9.4: + version "6.11.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" + integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== + dependencies: + side-channel "^1.0.4" + qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -7276,6 +7653,21 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + raw-body@^2.4.1: version "2.5.2" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" @@ -7686,7 +8078,7 @@ rustbn.js@~0.2.0: resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -7812,6 +8204,25 @@ semver@^7.0.0, semver@^7.1.1, semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semve dependencies: lru-cache "^6.0.0" +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -7819,6 +8230,16 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -7915,6 +8336,11 @@ sigstore@^1.0.0: make-fetch-happen "^11.0.1" tuf-js "^1.0.0" +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -8431,6 +8857,21 @@ tempy@^3.0.0: type-fest "^2.12.2" unique-string "^3.0.0" +tenderly@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/tenderly/-/tenderly-0.5.2.tgz#44096ec06bc6636b7f88c875feee7530f09f90a1" + integrity sha512-FSCAi2GoiMX0sBZVEt8fBEXsBcKdlDd6b74msRpR2uwS5pknFK0qWYgF0tJSRLURtvCjdrffJCKajFVdek1bnA== + dependencies: + axios "^0.27.2" + cli-table3 "^0.6.2" + commander "^9.4.0" + express "^4.18.1" + hyperlinker "^1.0.0" + js-yaml "^4.1.0" + open "^8.4.0" + prompts "^2.4.2" + tslog "^4.4.0" + testrpc@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" @@ -8585,6 +9026,11 @@ tslib@^1.8.1, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslog@^4.3.1, tslog@^4.4.0: + version "4.8.2" + resolved "https://registry.yarnpkg.com/tslog/-/tslog-4.8.2.tgz#dbb0c96249e387e8a711ae6e077330ba1ef102c9" + integrity sha512-eAKIRjxfSKYLs06r1wT7oou6Uv9VN6NW9g0JPidBlqQwPBBl5+84dm7r8zSOPVq1kyfEw1P6B3/FLSpZCorAgA== + tsort@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" @@ -8691,6 +9137,14 @@ type-fest@^3.8.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.8.0.tgz#ce80d1ca7c7d11c5540560999cbd410cb5b3a385" integrity sha512-FVNSzGQz9Th+/9R6Lvv7WIAkstylfHN2/JYxkyhhmKFYh9At2DST8t6L6Lref9eYO8PXFTfG9Sg1Agg0K3vq3Q== +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + typechain@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.0.tgz#fc4902ce596519cb2ccfd012e4ddf92a9945b569" @@ -8808,7 +9262,7 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -8835,6 +9289,11 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + uuid@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" @@ -8880,6 +9339,11 @@ varint@^5.0.0: resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -9233,3 +9697,8 @@ yocto-queue@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== + +zksync-web3@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.3.tgz#64ac2a16d597464c3fc4ae07447a8007631c57c9" + integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ== From dbf434d578059f1d07115287e1a36a1b02db8b1e Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 26 May 2023 16:14:22 -0700 Subject: [PATCH 04/40] create code to spawn a new devnet --- tenderly/helpers/spawn-devnet.ts | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tenderly/helpers/spawn-devnet.ts diff --git a/tenderly/helpers/spawn-devnet.ts b/tenderly/helpers/spawn-devnet.ts new file mode 100644 index 000000000..361eb32b3 --- /dev/null +++ b/tenderly/helpers/spawn-devnet.ts @@ -0,0 +1,44 @@ +/* eslint-disable @typescript-eslint/no-var-requires, no-console */ +const util = require("util"); +const fs = require("fs"); +const dotenv = require("dotenv"); + +const execAsync = util.promisify(require("child_process").exec); + +dotenv.config(); + +const { + TENDERLY_ACCESS_KEY, + TENDERLY_PROJECT_SLUG, + TENDERLY_ACCOUNT_ID, + TENDERLY_DEVNET_TEMPLATE, +} = process.env; + +// eslint-disable-next-line max-len +const command = `tenderly devnet spawn-rpc --project ${TENDERLY_PROJECT_SLUG} --template ${TENDERLY_DEVNET_TEMPLATE} --account ${TENDERLY_ACCOUNT_ID} --access_key ${TENDERLY_ACCESS_KEY}`; + + +const spawnDevNet = async () => { + const { stderr } = await execAsync(command); + const devNetUrl = stderr.trim().toString(); + + console.log(`DEVNET_RPC_URL=${ devNetUrl }`); + + // if file not exists, create it + if (!fs.existsSync(".env")) { + fs.writeFileSync(".env", ""); + } + const fileContent = fs.readFileSync(".env", "utf8"); + + const newFileContent = fileContent.replace(/DEVNET_RPC_URL=.*/g, ""); + fs.writeFileSync(".env", newFileContent); + fs.appendFileSync(".env", `DEVNET_RPC_URL=${ devNetUrl }`); +}; + +spawnDevNet() + .then(() => process.exit(0)) + .catch(error => { + // eslint-disable-next-line no-console + console.error(error); + process.exit(1); + }); \ No newline at end of file From 125f7b80b1ad26c3e0d5dfbe7a3153cd6a6f9ab8 Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 26 May 2023 16:14:40 -0700 Subject: [PATCH 05/40] add flow for deployment and verification of contracts for tenderly --- tenderly/helpers/deploy-verify-zns.ts | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tenderly/helpers/deploy-verify-zns.ts diff --git a/tenderly/helpers/deploy-verify-zns.ts b/tenderly/helpers/deploy-verify-zns.ts new file mode 100644 index 000000000..3a975aedb --- /dev/null +++ b/tenderly/helpers/deploy-verify-zns.ts @@ -0,0 +1,50 @@ +import { deployZNS } from "../../test/helpers"; +import * as hre from "hardhat"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; + + +export const deployVerifyZNS = async ({ + governor, + governorAddresses = [ governor.address ], + adminAddresses = [ governor.address ], +} : { + governor : SignerWithAddress; + governorAddresses ?: Array; + adminAddresses ?: Array; +}) => { + const zns = await deployZNS({ + deployer: governor, + governorAddresses, + adminAddresses, + }); + + // TODO: find a way to get these names from the object + const names = [ + "ZNSAccessController", + "ZNSRegistry", + "ZNSDomainToken", + "ZeroTokenMock", + "ZNSAddressResolver", + "ZNSPriceOracle", + "ZNSTreasury", + "ZNSEthRegistrar", + ]; + + // Verify and add source code to Tenderly + // for easy debugging + await Object.values(zns).reduce( + async (acc, contract, idx) => { + await hre.tenderly.verify({ + name: names[idx], + address: contract.address, + }); + + await hre.tenderly.persistArtifacts({ + name: names[idx], + address: contract.address, + }); + }, Promise.resolve({}) + ); + + return zns; +}; From 6fa8c749a3a62c3b758988135e30f76be85ecdd9 Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 26 May 2023 16:15:15 -0700 Subject: [PATCH 06/40] create prototype execution logic for full devnet flow --- tenderly/devnet-execute.ts | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tenderly/devnet-execute.ts diff --git a/tenderly/devnet-execute.ts b/tenderly/devnet-execute.ts new file mode 100644 index 000000000..9f6f18b4e --- /dev/null +++ b/tenderly/devnet-execute.ts @@ -0,0 +1,39 @@ + +// script for now: +// node ./tenderly/helpers/spawn-devnet.ts && yarn hardhat run ./tenderly/devnet-test.ts --network devnet + +const spawnCommand = "node ./tenderly/helpers/spawn-devnet.ts"; +const opCommandBase = "yarn hardhat run"; +const networkArg = "--network devnet"; +const opsPath = "./tenderly/ops/"; + +const opName = process.argv[2]; +// @ts-ignore +const util = require("util"); +// @ts-ignore +const execAsync = util.promisify(require("child_process").exec); + + +const execute = async () => { + const spawnRes = await execAsync(spawnCommand); + console.log(`OPERATION: ${opName}`); + console.log(`RESULT: ${spawnRes}`); + + const opCommand = `${opCommandBase} ${opsPath}${opName}.ts ${networkArg}`; + console.log(`OP COMMAND: ${opCommand}`); + const opRes = await execAsync(opCommand); + + return { + spawnRes, + opRes, + }; +}; + + +execute() + .then(() => process.exit(0)) + .catch(error => { + // eslint-disable-next-line no-console + console.error(error); + process.exit(1); + }); From da674f090390e14a836436690b3dea3000b8e151 Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 26 May 2023 16:15:34 -0700 Subject: [PATCH 07/40] add register() flow to run on devnet --- tenderly/ops/register.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tenderly/ops/register.ts diff --git a/tenderly/ops/register.ts b/tenderly/ops/register.ts new file mode 100644 index 000000000..26733060c --- /dev/null +++ b/tenderly/ops/register.ts @@ -0,0 +1,31 @@ +import * as hre from "hardhat"; +import { deployVerifyZNS } from "../helpers/deploy-verify-zns"; +import * as ethers from "ethers"; + + +export const registerDomainOp = async () => { + const [ + governor, + user, + ] = await hre.ethers.getSigners(); + + const zns = await deployVerifyZNS({ governor }); + + // perform ops + await zns.zeroToken.connect(user).approve(zns.treasury.address, ethers.constants.MaxUint256); + await zns.zeroToken.transfer(user.address, ethers.utils.parseEther("15")); + + await zns.registrar.connect(user).registerDomain( + "wilder", + user.address, + ); +}; + + +registerDomainOp() + .then(() => process.exit(0)) + .catch(error => { + // eslint-disable-next-line no-console + console.error(error); + process.exit(1); + }); From b6c0188d8c6efafb9c2a817dbc2d524213cbeb2e Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 26 May 2023 16:15:47 -0700 Subject: [PATCH 08/40] add new tenderly folder to eslint --- .eslintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 1ea4faa57..7c93e21c1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,7 +2,7 @@ "root": true, "overrides": [ { - "files": ["src/**/*.ts", "test/**/*.ts", "./*.ts"], + "files": ["src/**/*.ts", "test/**/*.ts", "./*.ts", "tenderly/**/*.ts"], "extends": ["@zero-tech/eslint-config-cpt/node-ts/.eslintrc.json"], "rules": { "no-unused-expressions": "off", From 03ac43bd312de6b3bcfec0eb4c4592da94ba26a3 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 12:09:12 -0700 Subject: [PATCH 09/40] move all tenderly logic to /src --- .eslintrc | 4 ++-- package.json | 2 +- {tenderly => src/tenderly}/devnet-execute.ts | 1 + {tenderly => src/tenderly}/helpers/deploy-verify-zns.ts | 2 +- {tenderly => src/tenderly}/helpers/spawn-devnet.ts | 0 {tenderly => src/tenderly}/ops/register.ts | 0 6 files changed, 5 insertions(+), 4 deletions(-) rename {tenderly => src/tenderly}/devnet-execute.ts (96%) rename {tenderly => src/tenderly}/helpers/deploy-verify-zns.ts (95%) rename {tenderly => src/tenderly}/helpers/spawn-devnet.ts (100%) rename {tenderly => src/tenderly}/ops/register.ts (100%) diff --git a/.eslintrc b/.eslintrc index 7c93e21c1..f66fc8fbe 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,10 +2,10 @@ "root": true, "overrides": [ { - "files": ["src/**/*.ts", "test/**/*.ts", "./*.ts", "tenderly/**/*.ts"], + "files": ["src/**/*.ts", "test/**/*.ts", "./*.ts"], "extends": ["@zero-tech/eslint-config-cpt/node-ts/.eslintrc.json"], "rules": { - "no-unused-expressions": "off", + "no-unused-expressions": "off" // "no-console": "off", // For debugging // "@typescript-eslint/no-unused-vars": "off" // For debugging } diff --git a/package.json b/package.json index e256bda33..f3b6f3362 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "semantic-release": "semantic-release --tag-format='v${version}-dev'", "coverage": "hardhat coverage", "check-coverage": "istanbul check-coverage --statements 90 --branches 87 --functions 89 --lines 90", - "devnet-op": "node ./tenderly/devnet-execute.ts" + "devnet-op": "node src/tenderly/devnet-execute.ts" }, "pre-commit": [ "lint" diff --git a/tenderly/devnet-execute.ts b/src/tenderly/devnet-execute.ts similarity index 96% rename from tenderly/devnet-execute.ts rename to src/tenderly/devnet-execute.ts index 9f6f18b4e..2bdcadf6a 100644 --- a/tenderly/devnet-execute.ts +++ b/src/tenderly/devnet-execute.ts @@ -13,6 +13,7 @@ const util = require("util"); // @ts-ignore const execAsync = util.promisify(require("child_process").exec); +// TODO tend: move this all to "./src" const execute = async () => { const spawnRes = await execAsync(spawnCommand); diff --git a/tenderly/helpers/deploy-verify-zns.ts b/src/tenderly/helpers/deploy-verify-zns.ts similarity index 95% rename from tenderly/helpers/deploy-verify-zns.ts rename to src/tenderly/helpers/deploy-verify-zns.ts index 3a975aedb..34fdeed2a 100644 --- a/tenderly/helpers/deploy-verify-zns.ts +++ b/src/tenderly/helpers/deploy-verify-zns.ts @@ -1,4 +1,4 @@ -import { deployZNS } from "../../test/helpers"; +import { deployZNS } from "../../../test/helpers"; import * as hre from "hardhat"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; diff --git a/tenderly/helpers/spawn-devnet.ts b/src/tenderly/helpers/spawn-devnet.ts similarity index 100% rename from tenderly/helpers/spawn-devnet.ts rename to src/tenderly/helpers/spawn-devnet.ts diff --git a/tenderly/ops/register.ts b/src/tenderly/ops/register.ts similarity index 100% rename from tenderly/ops/register.ts rename to src/tenderly/ops/register.ts From 2b9e6804f6fefab386d4e2767cc6a8045110dbd0 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 16:10:58 -0700 Subject: [PATCH 10/40] add tend setup to hh config --- hardhat.config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 25c42a9f0..50c128ddb 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -60,7 +60,8 @@ const config : HardhatUserConfig = { }, }; -// TODO: do we even need this? -tenderly.setup(); +// These are needed for tenderly verification to be automatic +// they don't seem to work with DevNet for some reason +tenderly.setup({ automaticVerifications: true }); export default config; From 2a76f17703d7be418bfb94b3d1d2c7813e1023f8 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 16:11:21 -0700 Subject: [PATCH 11/40] change tsconfig to support new node16 modules --- tsconfig.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 9a841b3bd..89d3cb260 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,13 @@ { + "ts-node": { + "compilerOptions": { + "module": "node16" + } + }, "compilerOptions": { - "target": "es2020", - "module": "commonjs", + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, From 6b805ad1cb12204ddb49ea4145405b2bed9e22af Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 16:13:29 -0700 Subject: [PATCH 12/40] expand register to run all flows, fix and expand execution helper, fix pkg.json script --- package.json | 2 +- .../{helpers => }/deploy-verify-zns.ts | 2 +- src/tenderly/devnet-execute.ts | 47 ++++++++++-------- src/tenderly/ops/register.ts | 31 ------------ src/tenderly/run-all-flows.ts | 48 +++++++++++++++++++ src/tenderly/{helpers => }/spawn-devnet.ts | 11 +++-- 6 files changed, 82 insertions(+), 59 deletions(-) rename src/tenderly/{helpers => }/deploy-verify-zns.ts (95%) delete mode 100644 src/tenderly/ops/register.ts create mode 100644 src/tenderly/run-all-flows.ts rename src/tenderly/{helpers => }/spawn-devnet.ts (84%) diff --git a/package.json b/package.json index f3b6f3362..91686113e 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "semantic-release": "semantic-release --tag-format='v${version}-dev'", "coverage": "hardhat coverage", "check-coverage": "istanbul check-coverage --statements 90 --branches 87 --functions 89 --lines 90", - "devnet-op": "node src/tenderly/devnet-execute.ts" + "devnet-op": "ts-node src/tenderly/devnet-execute.ts" }, "pre-commit": [ "lint" diff --git a/src/tenderly/helpers/deploy-verify-zns.ts b/src/tenderly/deploy-verify-zns.ts similarity index 95% rename from src/tenderly/helpers/deploy-verify-zns.ts rename to src/tenderly/deploy-verify-zns.ts index 34fdeed2a..3a975aedb 100644 --- a/src/tenderly/helpers/deploy-verify-zns.ts +++ b/src/tenderly/deploy-verify-zns.ts @@ -1,4 +1,4 @@ -import { deployZNS } from "../../../test/helpers"; +import { deployZNS } from "../../test/helpers"; import * as hre from "hardhat"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; diff --git a/src/tenderly/devnet-execute.ts b/src/tenderly/devnet-execute.ts index 2bdcadf6a..7c1e48c99 100644 --- a/src/tenderly/devnet-execute.ts +++ b/src/tenderly/devnet-execute.ts @@ -1,33 +1,38 @@ +/* eslint-disable @typescript-eslint/no-var-requires, no-console */ +import { promisify } from "util"; +import { exec } from "child_process"; -// script for now: -// node ./tenderly/helpers/spawn-devnet.ts && yarn hardhat run ./tenderly/devnet-test.ts --network devnet +const execAsync = promisify(exec); +const opName = process.argv[2]; -const spawnCommand = "node ./tenderly/helpers/spawn-devnet.ts"; +const spawnCommand = "ts-node src/tenderly/helpers/spawn-devnet.ts"; const opCommandBase = "yarn hardhat run"; const networkArg = "--network devnet"; -const opsPath = "./tenderly/ops/"; - -const opName = process.argv[2]; -// @ts-ignore -const util = require("util"); -// @ts-ignore -const execAsync = util.promisify(require("child_process").exec); - -// TODO tend: move this all to "./src" - +const opsPath = "src/tenderly/ops/"; + +/** + * Top level function to execute everything on the DevNet. + * It executes 2 child proceces: + * 1. Spawn a DevNet through the helper and ts-node directly, + * this will also set all the required env vars, so that Hardhat can correctly + * work with contracts and auth in Tenderly + * 2. Launch deploy and operation flow with contracts using Hardhat + * */ const execute = async () => { + // spawn DevNet on Tenderly const spawnRes = await execAsync(spawnCommand); - console.log(`OPERATION: ${opName}`); - console.log(`RESULT: ${spawnRes}`); - const opCommand = `${opCommandBase} ${opsPath}${opName}.ts ${networkArg}`; + // for `opName` to work every file containing a separate operation + // should be named one word of that operation (register, revoke, etc.), + // so that same string can be used as a parameter to the CLI script + const opCommand = `${opCommandBase} ${opsPath}all.ts ${networkArg}`; console.log(`OP COMMAND: ${opCommand}`); - const opRes = await execAsync(opCommand); - return { - spawnRes, - opRes, - }; + // performing an operation picked by the argument + const { stdout } = await execAsync(opCommand); + console.log(stdout); + + return spawnRes; }; diff --git a/src/tenderly/ops/register.ts b/src/tenderly/ops/register.ts deleted file mode 100644 index 26733060c..000000000 --- a/src/tenderly/ops/register.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as hre from "hardhat"; -import { deployVerifyZNS } from "../helpers/deploy-verify-zns"; -import * as ethers from "ethers"; - - -export const registerDomainOp = async () => { - const [ - governor, - user, - ] = await hre.ethers.getSigners(); - - const zns = await deployVerifyZNS({ governor }); - - // perform ops - await zns.zeroToken.connect(user).approve(zns.treasury.address, ethers.constants.MaxUint256); - await zns.zeroToken.transfer(user.address, ethers.utils.parseEther("15")); - - await zns.registrar.connect(user).registerDomain( - "wilder", - user.address, - ); -}; - - -registerDomainOp() - .then(() => process.exit(0)) - .catch(error => { - // eslint-disable-next-line no-console - console.error(error); - process.exit(1); - }); diff --git a/src/tenderly/run-all-flows.ts b/src/tenderly/run-all-flows.ts new file mode 100644 index 000000000..781cdfdaa --- /dev/null +++ b/src/tenderly/run-all-flows.ts @@ -0,0 +1,48 @@ +import * as hre from "hardhat"; +import { deployVerifyZNS } from "./deploy-verify-zns"; +import * as ethers from "ethers"; +import { hashDomainLabel } from "../../test/helpers"; +import { BigNumber } from "ethers"; + + +const domainName = "wilder"; +const domainHash = hashDomainLabel(domainName); +const tokenId = BigNumber.from(domainHash); + + +export const runAllFlows = async () => { + const [ + governor, + user, + ] = await hre.ethers.getSigners(); + + const zns = await deployVerifyZNS({ governor }); + + // perform ops + await zns.zeroToken.connect(user).approve(zns.treasury.address, ethers.constants.MaxUint256); + await zns.zeroToken.transfer(user.address, ethers.utils.parseEther("15")); + + // Register Domain + await zns.registrar.connect(governor).registerDomain( + domainName, + user.address, + ); + + // Transfer Domain + await zns.domainToken.connect(governor).transferFrom(governor.address, user.address, tokenId); + + // Reclaim Domain + await zns.registrar.connect(user).reclaimDomain(domainHash); + + // Revoke Domain + await zns.registrar.connect(user).revokeDomain(domainHash); +}; + + +runAllFlows() + .then(() => process.exit(0)) + .catch(error => { + // eslint-disable-next-line no-console + console.error(error); + process.exit(1); + }); diff --git a/src/tenderly/helpers/spawn-devnet.ts b/src/tenderly/spawn-devnet.ts similarity index 84% rename from src/tenderly/helpers/spawn-devnet.ts rename to src/tenderly/spawn-devnet.ts index 361eb32b3..d522c00c4 100644 --- a/src/tenderly/helpers/spawn-devnet.ts +++ b/src/tenderly/spawn-devnet.ts @@ -1,9 +1,10 @@ /* eslint-disable @typescript-eslint/no-var-requires, no-console */ -const util = require("util"); -const fs = require("fs"); -const dotenv = require("dotenv"); +import fs from "fs"; +import dotenv from "dotenv"; +import util from "util"; +import proc from "child_process"; -const execAsync = util.promisify(require("child_process").exec); +const asyncExec = util.promisify(proc.exec); dotenv.config(); @@ -19,7 +20,7 @@ const command = `tenderly devnet spawn-rpc --project ${TENDERLY_PROJECT_SLUG} -- const spawnDevNet = async () => { - const { stderr } = await execAsync(command); + const { stderr } = await asyncExec(command); const devNetUrl = stderr.trim().toString(); console.log(`DEVNET_RPC_URL=${ devNetUrl }`); From 0bcb286f1583c9e1be22c623a6f2d4f047533e94 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 16:35:16 -0700 Subject: [PATCH 13/40] fix executor and add comments --- src/tenderly/devnet-execute.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/tenderly/devnet-execute.ts b/src/tenderly/devnet-execute.ts index 7c1e48c99..d6218c4d0 100644 --- a/src/tenderly/devnet-execute.ts +++ b/src/tenderly/devnet-execute.ts @@ -3,12 +3,11 @@ import { promisify } from "util"; import { exec } from "child_process"; const execAsync = promisify(exec); -const opName = process.argv[2]; -const spawnCommand = "ts-node src/tenderly/helpers/spawn-devnet.ts"; +const spawnCommand = "ts-node src/tenderly/spawn-devnet.ts"; const opCommandBase = "yarn hardhat run"; const networkArg = "--network devnet"; -const opsPath = "src/tenderly/ops/"; +const opsPath = "src/tenderly/run-all-flows.ts"; /** * Top level function to execute everything on the DevNet. @@ -19,17 +18,14 @@ const opsPath = "src/tenderly/ops/"; * 2. Launch deploy and operation flow with contracts using Hardhat * */ const execute = async () => { - // spawn DevNet on Tenderly + // spawn DevNet on Tenderly woth ts-node directly const spawnRes = await execAsync(spawnCommand); - // for `opName` to work every file containing a separate operation - // should be named one word of that operation (register, revoke, etc.), - // so that same string can be used as a parameter to the CLI script - const opCommand = `${opCommandBase} ${opsPath}all.ts ${networkArg}`; - console.log(`OP COMMAND: ${opCommand}`); + const opCommand = `${opCommandBase} ${opsPath} ${networkArg}`; - // performing an operation picked by the argument + // deploy all contracts, run flows using Hardhat const { stdout } = await execAsync(opCommand); + // pass Tenderly logger through console.log(stdout); return spawnRes; From 596e24fa956f6574d87fef6dbffc968e16e29ed1 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 16:35:24 -0700 Subject: [PATCH 14/40] change script name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 91686113e..b08ddf643 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "semantic-release": "semantic-release --tag-format='v${version}-dev'", "coverage": "hardhat coverage", "check-coverage": "istanbul check-coverage --statements 90 --branches 87 --functions 89 --lines 90", - "devnet-op": "ts-node src/tenderly/devnet-execute.ts" + "devnet": "ts-node src/tenderly/devnet-execute.ts" }, "pre-commit": [ "lint" From 14467bd9e163b318e879a6306c64ba2024806b32 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 16:35:44 -0700 Subject: [PATCH 15/40] comment Tenderly setup call to eliminate problem with solcover --- hardhat.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 50c128ddb..fbbe91e7d 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -62,6 +62,7 @@ const config : HardhatUserConfig = { // These are needed for tenderly verification to be automatic // they don't seem to work with DevNet for some reason -tenderly.setup({ automaticVerifications: true }); +// !!! This should be uncommented when using Tenderly DevNet !!! +// tenderly.setup({ automaticVerifications: true }); export default config; From e59b4743d9a7f58df3ff0679e478ae13e3306edc Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 16:37:01 -0700 Subject: [PATCH 16/40] comment out tenderly import in hh config --- hardhat.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index fbbe91e7d..33cfde133 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -2,7 +2,7 @@ require("dotenv").config(); import { HardhatUserConfig } from "hardhat/config"; -import * as tenderly from "@tenderly/hardhat-tenderly"; +// import * as tenderly from "@tenderly/hardhat-tenderly"; import "@nomicfoundation/hardhat-toolbox"; import "@nomiclabs/hardhat-ethers"; import "@nomicfoundation/hardhat-network-helpers"; From 1ba39e6f6a4b959b4d83134ba5805ee2c8c5f15b Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 16:39:03 -0700 Subject: [PATCH 17/40] uncomment tenderly import and add eslint exception to not have a problem with hh config --- hardhat.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 33cfde133..2c3ecf0ea 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,8 +1,8 @@ -// eslint-disable-next-line @typescript-eslint/no-var-requires +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-unused-vars */ require("dotenv").config(); import { HardhatUserConfig } from "hardhat/config"; -// import * as tenderly from "@tenderly/hardhat-tenderly"; +import * as tenderly from "@tenderly/hardhat-tenderly"; import "@nomicfoundation/hardhat-toolbox"; import "@nomiclabs/hardhat-ethers"; import "@nomicfoundation/hardhat-network-helpers"; From 0bb4badc48475dfe34f50f6315af5fb60fd62c10 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 16:41:08 -0700 Subject: [PATCH 18/40] add comment --- src/tenderly/devnet-execute.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tenderly/devnet-execute.ts b/src/tenderly/devnet-execute.ts index d6218c4d0..fee8a906c 100644 --- a/src/tenderly/devnet-execute.ts +++ b/src/tenderly/devnet-execute.ts @@ -16,6 +16,9 @@ const opsPath = "src/tenderly/run-all-flows.ts"; * this will also set all the required env vars, so that Hardhat can correctly * work with contracts and auth in Tenderly * 2. Launch deploy and operation flow with contracts using Hardhat + * + * To execute this, uncomment `tenderly.setup()` line in the hardhat.config.ts + * then run `yarn devnet` in the terminal. * */ const execute = async () => { // spawn DevNet on Tenderly woth ts-node directly From 50eb817a85a7bf4a10abee77dba44ba9a8b87189 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 30 May 2023 17:16:11 -0700 Subject: [PATCH 19/40] fix comments --- hardhat.config.ts | 6 ++++-- src/tenderly/devnet-execute.ts | 5 ++--- src/tenderly/run-all-flows.ts | 2 +- src/tenderly/spawn-devnet.ts | 5 ++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 2c3ecf0ea..18862df25 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -60,8 +60,10 @@ const config : HardhatUserConfig = { }, }; -// These are needed for tenderly verification to be automatic -// they don't seem to work with DevNet for some reason +// These are needed for tenderly verification to be automatic, +// they don't seem to work with DevNet for some reason, +// however Tenderly operations do not work if we don't call +// this here, it is required for integration with Hardhat. // !!! This should be uncommented when using Tenderly DevNet !!! // tenderly.setup({ automaticVerifications: true }); diff --git a/src/tenderly/devnet-execute.ts b/src/tenderly/devnet-execute.ts index fee8a906c..e48caf563 100644 --- a/src/tenderly/devnet-execute.ts +++ b/src/tenderly/devnet-execute.ts @@ -11,7 +11,7 @@ const opsPath = "src/tenderly/run-all-flows.ts"; /** * Top level function to execute everything on the DevNet. - * It executes 2 child proceces: + * It executes 2 child processes: * 1. Spawn a DevNet through the helper and ts-node directly, * this will also set all the required env vars, so that Hardhat can correctly * work with contracts and auth in Tenderly @@ -21,7 +21,7 @@ const opsPath = "src/tenderly/run-all-flows.ts"; * then run `yarn devnet` in the terminal. * */ const execute = async () => { - // spawn DevNet on Tenderly woth ts-node directly + // spawn DevNet on Tenderly with ts-node directly const spawnRes = await execAsync(spawnCommand); const opCommand = `${opCommandBase} ${opsPath} ${networkArg}`; @@ -38,7 +38,6 @@ const execute = async () => { execute() .then(() => process.exit(0)) .catch(error => { - // eslint-disable-next-line no-console console.error(error); process.exit(1); }); diff --git a/src/tenderly/run-all-flows.ts b/src/tenderly/run-all-flows.ts index 781cdfdaa..700fd217a 100644 --- a/src/tenderly/run-all-flows.ts +++ b/src/tenderly/run-all-flows.ts @@ -18,7 +18,7 @@ export const runAllFlows = async () => { const zns = await deployVerifyZNS({ governor }); - // perform ops + // get some funds for the user await zns.zeroToken.connect(user).approve(zns.treasury.address, ethers.constants.MaxUint256); await zns.zeroToken.transfer(user.address, ethers.utils.parseEther("15")); diff --git a/src/tenderly/spawn-devnet.ts b/src/tenderly/spawn-devnet.ts index d522c00c4..cdd6737df 100644 --- a/src/tenderly/spawn-devnet.ts +++ b/src/tenderly/spawn-devnet.ts @@ -25,7 +25,7 @@ const spawnDevNet = async () => { console.log(`DEVNET_RPC_URL=${ devNetUrl }`); - // if file not exists, create it + // if file doesn't exist, create it if (!fs.existsSync(".env")) { fs.writeFileSync(".env", ""); } @@ -39,7 +39,6 @@ const spawnDevNet = async () => { spawnDevNet() .then(() => process.exit(0)) .catch(error => { - // eslint-disable-next-line no-console console.error(error); process.exit(1); - }); \ No newline at end of file + }); From 43aa029eec5235822abdbd42f847fbdf2907fca3 Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 5 Jun 2023 12:30:33 -0700 Subject: [PATCH 20/40] update yarn.lock --- yarn.lock | 489 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 472 insertions(+), 17 deletions(-) diff --git a/yarn.lock b/yarn.lock index 71009c3d0..2c382b922 100644 --- a/yarn.lock +++ b/yarn.lock @@ -350,7 +350,7 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/transactions" "^5.4.0" -"@ethersproject/contracts@5.7.0": +"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== @@ -564,7 +564,7 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/providers@5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -675,7 +675,7 @@ "@ethersproject/sha2" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/solidity@5.7.0": +"@ethersproject/solidity@5.7.0", "@ethersproject/solidity@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== @@ -774,7 +774,7 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/wordlists" "^5.4.0" -"@ethersproject/wallet@5.7.0": +"@ethersproject/wallet@5.7.0", "@ethersproject/wallet@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== @@ -1174,6 +1174,11 @@ resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.2.tgz#812d48929c3bf8fe840ec29eab4b613693467679" integrity sha512-NLDlDFL2us07C0jB/9wzvR0kuLivChJWCXTKcj3yqjZqMoYp7g7wwS157F70VHx/+9gHIBGzak5pKDwG8gEefA== +"@nomiclabs/hardhat-ethers@^2.1.1": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0" + integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== + "@nomiclabs/hardhat-etherscan@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.0.0.tgz#06e0d59787f01f1296d829e8d43fece50e7ffff1" @@ -1709,6 +1714,21 @@ dependencies: antlr4ts "^0.5.0-alpha.4" +"@tenderly/hardhat-tenderly@^1.7.4": + version "1.7.7" + resolved "https://registry.yarnpkg.com/@tenderly/hardhat-tenderly/-/hardhat-tenderly-1.7.7.tgz#b320ee6bea3779e4781eb0299a3a816cbdc83def" + integrity sha512-p/jLzRPpoD7J0LGvUFEQjgniDzmP5AzfTgy41qqzyjhOsW0voe7wZI8lXjadl5MEr7rAXN1iH3VncT13qG6+Zw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@nomiclabs/hardhat-ethers" "^2.1.1" + axios "^0.27.2" + ethers "^5.7.0" + fs-extra "^10.1.0" + hardhat-deploy "^0.11.14" + js-yaml "^4.1.0" + tenderly "^0.5.3" + tslog "^4.3.1" + "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" @@ -1888,7 +1908,7 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== -"@types/qs@^6.2.31": +"@types/qs@^6.2.31", "@types/qs@^6.9.7": version "6.9.7" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== @@ -2047,6 +2067,14 @@ abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: module-error "^1.0.1" queue-microtask "^1.2.3" +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -2307,6 +2335,11 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" @@ -2452,13 +2485,21 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== -axios@^0.21.2: +axios@^0.21.1, axios@^0.21.2: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: follow-redirects "^1.14.0" +axios@^0.27.2: + version "0.27.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" + integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== + dependencies: + follow-redirects "^1.14.9" + form-data "^4.0.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -2548,6 +2589,24 @@ bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +body-parser@1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" + integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + bottleneck@^2.15.3: version "2.19.5" resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.19.5.tgz#5df0b90f59fd47656ebe63c78a98419205cadd91" @@ -2855,7 +2914,7 @@ chokidar@3.3.0: optionalDependencies: fsevents "~2.1.1" -chokidar@3.5.3, chokidar@^3.4.0: +chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -2957,7 +3016,7 @@ cli-table3@^0.5.0: optionalDependencies: colors "^1.1.2" -cli-table3@^0.6.3: +cli-table3@^0.6.2, cli-table3@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg== @@ -3059,7 +3118,7 @@ columnify@^1.6.0: strip-ansi "^6.0.1" wcwidth "^1.0.0" -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -3101,6 +3160,11 @@ commander@^10.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== +commander@^9.4.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + comment-parser@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.1.tgz#3d7ea3adaf9345594aedee6563f422348f165c1b" @@ -3157,6 +3221,13 @@ console-control-strings@^1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + content-hash@^2.5.2: version "2.5.2" resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" @@ -3166,6 +3237,11 @@ content-hash@^2.5.2: multicodec "^0.5.5" multihashes "^0.4.15" +content-type@~1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + conventional-changelog-angular@^5.0.0: version "5.0.13" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" @@ -3209,6 +3285,16 @@ conventional-commits-parser@^3.2.3: split2 "^3.0.0" through2 "^4.0.0" +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + cookie@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" @@ -3323,6 +3409,13 @@ death@^1.1.0: resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" integrity sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w== +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + debug@3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -3404,6 +3497,11 @@ defender-base-client@^1.44.0: lodash "^4.17.19" node-fetch "^2.6.0" +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -3432,6 +3530,11 @@ deprecation@^2.0.0: resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + detect-port@^1.3.0: version "1.5.1" resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" @@ -3520,6 +3623,11 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -3548,6 +3656,16 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== +encode-utf8@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -3555,7 +3673,7 @@ encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -enquirer@^2.3.0: +enquirer@^2.3.0, enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -3662,6 +3780,11 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -3882,6 +4005,11 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + eth-ens-namehash@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" @@ -4032,7 +4160,7 @@ ethers@^4.0.40: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.0.13: +ethers@^5.0.13, ethers@^5.5.3, ethers@^5.7.0: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -4132,6 +4260,43 @@ execa@^7.0.0: signal-exit "^3.0.7" strip-final-newline "^3.0.0" +express@^4.18.1: + version "4.18.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" + integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.1" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.5.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.11.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" @@ -4224,6 +4389,19 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + find-replace@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" @@ -4309,7 +4487,14 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -follow-redirects@^1.12.1, follow-redirects@^1.14.0: +fmix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" + integrity sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w== + dependencies: + imul "^1.0.0" + +follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.9: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== @@ -4343,6 +4528,15 @@ form-data@^2.2.0: combined-stream "^1.0.6" mime-types "^2.1.12" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -4352,6 +4546,11 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + fp-ts@1.19.3: version "1.19.3" resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" @@ -4362,6 +4561,11 @@ fp-ts@^1.0.0: resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + from2@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" @@ -4381,6 +4585,15 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" +fs-extra@^10.0.0, fs-extra@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^11.0.0: version "11.1.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" @@ -4788,6 +5001,36 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +hardhat-deploy@^0.11.14: + version "0.11.30" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.30.tgz#d47203b584446dce8136ac6d0a96fce2827fb532" + integrity sha512-FpMP1zSa24NEARVh/vwFCJJa9Gws3SBRZbVIDYMIvleoH3yOwFcdWY68zfGoxrm4kRHNcaiVNAXVFTm0enKR0A== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/contracts" "^5.7.0" + "@ethersproject/providers" "^5.7.2" + "@ethersproject/solidity" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wallet" "^5.7.0" + "@types/qs" "^6.9.7" + axios "^0.21.1" + chalk "^4.1.2" + chokidar "^3.5.2" + debug "^4.3.2" + enquirer "^2.3.6" + ethers "^5.5.3" + form-data "^4.0.0" + fs-extra "^10.0.0" + match-all "^1.2.6" + murmur-128 "^0.2.1" + qs "^6.9.4" + zksync-web3 "^0.14.3" + hardhat-gas-reporter@1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.8.tgz#93ce271358cd748d9c4185dbb9d1d5525ec145e0" @@ -5053,6 +5296,11 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" +hyperlinker@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e" + integrity sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ== + iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -5109,6 +5357,11 @@ import-from@^4.0.0: resolved "https://registry.yarnpkg.com/import-from/-/import-from-4.0.0.tgz#2710b8d66817d232e16f4166e319248d3d5492e2" integrity sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ== +imul@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" + integrity sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA== + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -5209,6 +5462,11 @@ ip@^2.0.0: resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" @@ -5276,6 +5534,11 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -5441,6 +5704,13 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -5673,6 +5943,11 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" @@ -6090,6 +6365,11 @@ marked@^4.1.0: resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== +match-all@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" + integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== + mcl-wasm@^0.7.1: version "0.7.9" resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" @@ -6104,6 +6384,11 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + memory-level@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" @@ -6135,6 +6420,11 @@ meow@^8.0.0: type-fest "^0.18.0" yargs-parser "^20.2.3" +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -6145,6 +6435,11 @@ merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + micromatch@^4.0.0, micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" @@ -6158,13 +6453,18 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@~2.1.19: +mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mime@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" @@ -6450,6 +6750,11 @@ module-error@^1.0.1, module-error@^1.0.2: resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + ms@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" @@ -6505,6 +6810,15 @@ multihashes@^0.4.15, multihashes@~0.4.15: multibase "^0.7.0" varint "^5.0.0" +murmur-128@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" + integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== + dependencies: + encode-utf8 "^1.0.2" + fmix "^0.1.0" + imul "^1.0.0" + mute-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" @@ -6535,7 +6849,7 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -negotiator@^0.6.3: +negotiator@0.6.3, negotiator@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== @@ -6941,6 +7255,13 @@ obliterator@^2.0.0: resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + once@1.x, once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -6962,6 +7283,15 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" +open@^8.4.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -7196,6 +7526,11 @@ parse-json@^7.0.0: lines-and-columns "^2.0.3" type-fest "^3.8.0" +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -7246,6 +7581,11 @@ path-scurry@^1.7.0: lru-cache "^9.1.1" minipass "^5.0.0 || ^6.0.2" +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -7405,6 +7745,14 @@ promise@^8.0.0: dependencies: asap "~2.0.6" +prompts@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + promzard@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/promzard/-/promzard-1.0.0.tgz#3246f8e6c9895a77c0549cefb65828ac0f6c006b" @@ -7426,6 +7774,14 @@ proto-list@~1.2.1: resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + psl@^1.1.28: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -7451,7 +7807,14 @@ qrcode-terminal@^0.12.0: resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== -qs@^6.4.0, qs@^6.7.0: +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +qs@^6.4.0, qs@^6.7.0, qs@^6.9.4: version "6.11.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== @@ -7480,6 +7843,21 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + raw-body@^2.4.1: version "2.5.2" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" @@ -7891,7 +8269,7 @@ safe-array-concat@^1.0.0: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -8017,6 +8395,25 @@ semver@^7.0.0, semver@^7.1.1, semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semve dependencies: lru-cache "^6.0.0" +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -8024,6 +8421,16 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -8125,6 +8532,11 @@ sigstore@^1.3.0, sigstore@^1.4.0: make-fetch-happen "^11.0.1" tuf-js "^1.1.3" +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -8662,6 +9074,21 @@ tempy@^3.0.0: type-fest "^2.12.2" unique-string "^3.0.0" +tenderly@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/tenderly/-/tenderly-0.5.3.tgz#115653ff33fc33e3be41ab7dd669fdbe0f28a6fb" + integrity sha512-sR+sbZKZzt3b2+moXJsrkBvbava1/4mGulIfuZw8bwr2OpCH8N00dME1t89JC8RjVnQjy4VewVFHyWANdn5zYQ== + dependencies: + axios "^0.27.2" + cli-table3 "^0.6.2" + commander "^9.4.0" + express "^4.18.1" + hyperlinker "^1.0.0" + js-yaml "^4.1.0" + open "^8.4.0" + prompts "^2.4.2" + tslog "^4.4.0" + testrpc@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" @@ -8821,6 +9248,11 @@ tslib@^2.3.1, tslib@^2.5.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338" integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA== +tslog@^4.3.1, tslog@^4.4.0: + version "4.8.2" + resolved "https://registry.yarnpkg.com/tslog/-/tslog-4.8.2.tgz#dbb0c96249e387e8a711ae6e077330ba1ef102c9" + integrity sha512-eAKIRjxfSKYLs06r1wT7oou6Uv9VN6NW9g0JPidBlqQwPBBl5+84dm7r8zSOPVq1kyfEw1P6B3/FLSpZCorAgA== + tsort@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" @@ -8928,6 +9360,14 @@ type-fest@^3.0.0, type-fest@^3.8.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.11.0.tgz#e78ea6b50d6a6b1e4609035fb9ea8f1e3c328194" integrity sha512-JaPw5U9ixP0XcpUbQoVSbxSDcK/K4nww20C3kjm9yE6cDRRhptU28AH60VWf9ltXmCrIfIbtt9J+2OUk2Uqiaw== +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + typechain@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.0.tgz#fc4902ce596519cb2ccfd012e4ddf92a9945b569" @@ -9050,7 +9490,7 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -9077,6 +9517,11 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + uuid@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" @@ -9122,6 +9567,11 @@ varint@^5.0.0: resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -9484,3 +9934,8 @@ yocto-queue@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== + +zksync-web3@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.3.tgz#64ac2a16d597464c3fc4ae07447a8007631c57c9" + integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ== From da054da79739d5e302ea2229d26b9b011023f6cb Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 5 Jun 2023 14:10:28 -0700 Subject: [PATCH 21/40] simplify .env file writes --- src/tenderly/spawn-devnet.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tenderly/spawn-devnet.ts b/src/tenderly/spawn-devnet.ts index cdd6737df..cba911eb0 100644 --- a/src/tenderly/spawn-devnet.ts +++ b/src/tenderly/spawn-devnet.ts @@ -26,9 +26,8 @@ const spawnDevNet = async () => { console.log(`DEVNET_RPC_URL=${ devNetUrl }`); // if file doesn't exist, create it - if (!fs.existsSync(".env")) { - fs.writeFileSync(".env", ""); - } + fs.writeFileSync(".env", "", { flag : "w" }); + const fileContent = fs.readFileSync(".env", "utf8"); const newFileContent = fileContent.replace(/DEVNET_RPC_URL=.*/g, ""); From a4e589ca3565d5f7aeaef91337dcbacb556b28c1 Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 5 Jun 2023 14:17:50 -0700 Subject: [PATCH 22/40] fix token name constant --- test/helpers/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helpers/constants.ts b/test/helpers/constants.ts index 610c7704e..088b85524 100644 --- a/test/helpers/constants.ts +++ b/test/helpers/constants.ts @@ -2,7 +2,7 @@ import { BigNumber } from "ethers"; import { PriceParams } from "./types"; import { ethers } from "hardhat"; -export const ZNS_DOMAIN_TOKEN_NAME = "ZNSDomainToken"; +export const ZNS_DOMAIN_TOKEN_NAME = "ZNS Domain Token"; export const ZNS_DOMAIN_TOKEN_SYMBOL = "ZDT"; export const registrationFeePercDefault = BigNumber.from("222"); From c92bda0538a8191fce4df9918fb2e808e73829f8 Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 9 Jun 2023 13:44:46 -0700 Subject: [PATCH 23/40] fix ordering of contracts --- test/helpers/access.ts | 1 + test/helpers/deployZNS.ts | 4 ++-- test/helpers/types.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/helpers/access.ts b/test/helpers/access.ts index 4b66f486b..fd98bb106 100644 --- a/test/helpers/access.ts +++ b/test/helpers/access.ts @@ -35,5 +35,6 @@ export const deployAccessController = async ({ const controller = await accessControllerFactory.deploy(); await controller.initialize(governorAddresses, adminAddresses); + return controller; }; diff --git a/test/helpers/deployZNS.ts b/test/helpers/deployZNS.ts index 7a88fb419..73aa1b37f 100644 --- a/test/helpers/deployZNS.ts +++ b/test/helpers/deployZNS.ts @@ -222,12 +222,12 @@ export const deployZNS = async ({ const znsContracts : ZNSContracts = { accessController, - addressResolver, registry, domainToken, zeroToken: zeroTokenMock, - treasury, + addressResolver, priceOracle, + treasury, registrar, }; diff --git a/test/helpers/types.ts b/test/helpers/types.ts index c65a772b5..b2e85e08c 100644 --- a/test/helpers/types.ts +++ b/test/helpers/types.ts @@ -72,12 +72,12 @@ export interface RegistrarConfig { export interface ZNSContracts { accessController : ZNSAccessController; - addressResolver : ZNSAddressResolver; registry : ZNSRegistry; domainToken : ZNSDomainToken; zeroToken : ZeroTokenMock; // TODO fix when real token - treasury : ZNSTreasury; + addressResolver : ZNSAddressResolver; priceOracle : ZNSPriceOracle; + treasury : ZNSTreasury; registrar : ZNSEthRegistrar; } From b04f6cbeebb549f0f8b3b2667b5455491cccd4dd Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 9 Jun 2023 13:44:58 -0700 Subject: [PATCH 24/40] Revert "simplify .env file writes" This reverts commit da054da79739d5e302ea2229d26b9b011023f6cb. --- src/tenderly/spawn-devnet.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tenderly/spawn-devnet.ts b/src/tenderly/spawn-devnet.ts index cba911eb0..cdd6737df 100644 --- a/src/tenderly/spawn-devnet.ts +++ b/src/tenderly/spawn-devnet.ts @@ -26,8 +26,9 @@ const spawnDevNet = async () => { console.log(`DEVNET_RPC_URL=${ devNetUrl }`); // if file doesn't exist, create it - fs.writeFileSync(".env", "", { flag : "w" }); - + if (!fs.existsSync(".env")) { + fs.writeFileSync(".env", ""); + } const fileContent = fs.readFileSync(".env", "utf8"); const newFileContent = fileContent.replace(/DEVNET_RPC_URL=.*/g, ""); From 75012d7fb816354f8ff05c279014cbf84f162d62 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 13 Jun 2023 10:41:10 -0700 Subject: [PATCH 25/40] add contract names as constants, add calls to deployed() to see if auto verification actually works --- hardhat.config.ts | 2 +- src/tenderly/deploy-verify-zns.ts | 42 +++++++++++++++++++------------ src/tenderly/devnet-execute.ts | 9 ++++--- src/tenderly/spawn-devnet.ts | 4 +-- test/helpers/access.ts | 2 ++ test/helpers/constants.ts | 11 ++++++++ test/helpers/deployZNS.ts | 18 ++++++++++++- 7 files changed, 65 insertions(+), 23 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 8801a8c3f..0f92de1d1 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -71,6 +71,6 @@ const config : HardhatUserConfig = { // keep it commented out and uncomment when using DevNet // locally. // !!! Uncomment this when using Tenderly DevNet !!! -// tenderly.setup({ automaticVerifications: true }); +tenderly.setup({ automaticVerifications: true }); export default config; diff --git a/src/tenderly/deploy-verify-zns.ts b/src/tenderly/deploy-verify-zns.ts index 3a975aedb..d3a81884f 100644 --- a/src/tenderly/deploy-verify-zns.ts +++ b/src/tenderly/deploy-verify-zns.ts @@ -1,4 +1,7 @@ -import { deployZNS } from "../../test/helpers"; +import { + accessControllerName, addressResolverName, + deployZNS, domainTokenName, priceOracleName, registrarName, registryName, treasuryName, zeroTokenMockName, +} from "../../test/helpers"; import * as hre from "hardhat"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; @@ -18,31 +21,38 @@ export const deployVerifyZNS = async ({ adminAddresses, }); - // TODO: find a way to get these names from the object + const names = [ - "ZNSAccessController", - "ZNSRegistry", - "ZNSDomainToken", - "ZeroTokenMock", - "ZNSAddressResolver", - "ZNSPriceOracle", - "ZNSTreasury", - "ZNSEthRegistrar", + accessControllerName, + registryName, + domainTokenName, + zeroTokenMockName, + addressResolverName, + priceOracleName, + treasuryName, + registrarName, ]; - // Verify and add source code to Tenderly - // for easy debugging - await Object.values(zns).reduce( - async (acc, contract, idx) => { + // // Verify and add source code to Tenderly + // // for easy debugging + await Object.entries(zns).reduce( + async (acc, [key, contract]) : Promise => { + const name = names.find( + el => el.toLowerCase() + .includes(key.toLowerCase()) + ) as string; + await hre.tenderly.verify({ - name: names[idx], + name, address: contract.address, }); await hre.tenderly.persistArtifacts({ - name: names[idx], + name, address: contract.address, }); + + return acc; }, Promise.resolve({}) ); diff --git a/src/tenderly/devnet-execute.ts b/src/tenderly/devnet-execute.ts index e48caf563..af43a7204 100644 --- a/src/tenderly/devnet-execute.ts +++ b/src/tenderly/devnet-execute.ts @@ -5,7 +5,7 @@ import { exec } from "child_process"; const execAsync = promisify(exec); const spawnCommand = "ts-node src/tenderly/spawn-devnet.ts"; -const opCommandBase = "yarn hardhat run"; +const opCommandBase = "npx hardhat run"; const networkArg = "--network devnet"; const opsPath = "src/tenderly/run-all-flows.ts"; @@ -23,13 +23,16 @@ const opsPath = "src/tenderly/run-all-flows.ts"; const execute = async () => { // spawn DevNet on Tenderly with ts-node directly const spawnRes = await execAsync(spawnCommand); + process.stdout.write(spawnRes.stdout); + process.stderr.write(spawnRes.stderr); const opCommand = `${opCommandBase} ${opsPath} ${networkArg}`; // deploy all contracts, run flows using Hardhat - const { stdout } = await execAsync(opCommand); + const opRes = await execAsync(opCommand); // pass Tenderly logger through - console.log(stdout); + process.stdout.write(opRes.stdout); + process.stderr.write(opRes.stderr); return spawnRes; }; diff --git a/src/tenderly/spawn-devnet.ts b/src/tenderly/spawn-devnet.ts index cdd6737df..b0e31ba5f 100644 --- a/src/tenderly/spawn-devnet.ts +++ b/src/tenderly/spawn-devnet.ts @@ -20,8 +20,8 @@ const command = `tenderly devnet spawn-rpc --project ${TENDERLY_PROJECT_SLUG} -- const spawnDevNet = async () => { - const { stderr } = await asyncExec(command); - const devNetUrl = stderr.trim().toString(); + const res = await asyncExec(command); + const devNetUrl = res.stderr.trim().toString(); console.log(`DEVNET_RPC_URL=${ devNetUrl }`); diff --git a/test/helpers/access.ts b/test/helpers/access.ts index fd98bb106..90010fec8 100644 --- a/test/helpers/access.ts +++ b/test/helpers/access.ts @@ -34,6 +34,8 @@ export const deployAccessController = async ({ const accessControllerFactory = new ZNSAccessController__factory(deployer); const controller = await accessControllerFactory.deploy(); + await controller.deployed(); + await controller.initialize(governorAddresses, adminAddresses); return controller; diff --git a/test/helpers/constants.ts b/test/helpers/constants.ts index 088b85524..021d8b1ad 100644 --- a/test/helpers/constants.ts +++ b/test/helpers/constants.ts @@ -18,3 +18,14 @@ export const priceConfigDefault : PriceParams = { baseSubdomainLength: BigNumber.from(3), priceMultiplier: ethers.BigNumber.from("390"), }; + +// Contract names +export const accessControllerName = "ZNSAccessController"; +export const registryName = "ZNSRegistry"; +export const domainTokenName = "ZNSDomainToken"; +export const zeroTokenMockName = "ZeroTokenMock"; +export const addressResolverName = "ZNSAddressResolver"; +export const priceOracleName = "ZNSPriceOracle"; +export const treasuryName = "ZNSTreasury"; +export const registrarName = "ZNSEthRegistrar"; + diff --git a/test/helpers/deployZNS.ts b/test/helpers/deployZNS.ts index 73aa1b37f..00bc5a038 100644 --- a/test/helpers/deployZNS.ts +++ b/test/helpers/deployZNS.ts @@ -42,6 +42,8 @@ export const deployRegistry = async ( kind: "uups", }) as ZNSRegistry; + await registry.deployed(); + return registry; }; @@ -63,6 +65,8 @@ export const deployAddressResolver = async ( } ) as ZNSAddressResolver; + await resolver.deployed(); + return resolver; }; @@ -91,6 +95,8 @@ export const deployPriceOracle = async ({ } ) as ZNSPriceOracle; + await priceOracle.deployed(); + return priceOracle; }; @@ -111,6 +117,8 @@ export const deployDomainToken = async ( } ) as ZNSDomainToken; + await domainToken.deployed(); + return domainToken; }; @@ -118,7 +126,11 @@ export const deployZeroTokenMock = async ( deployer : SignerWithAddress ) : Promise => { const zTokenMockMockFactory = new ZeroTokenMock__factory(deployer); - return zTokenMockMockFactory.deploy(deployer.address); + const token = await zTokenMockMockFactory.deploy(deployer.address); + + await token.deployed(); + + return token; }; export const deployTreasury = async ( @@ -141,6 +153,8 @@ export const deployTreasury = async ( } ) as ZNSTreasury; + await treasury.deployed(); + return treasury; }; @@ -165,6 +179,8 @@ export const deployRegistrar = async ( } ) as ZNSEthRegistrar; + await registrar.deployed(); + await accessController.connect(deployer).grantRole(REGISTRAR_ROLE, registrar.address); return registrar; From 2c98f77f997815764ee0b57e956640f093c4e475 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 13 Jun 2023 15:52:49 -0700 Subject: [PATCH 26/40] fix devnet spawner to not add errors into URL field of .env --- src/tenderly/spawn-devnet.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tenderly/spawn-devnet.ts b/src/tenderly/spawn-devnet.ts index b0e31ba5f..1e96f1bfb 100644 --- a/src/tenderly/spawn-devnet.ts +++ b/src/tenderly/spawn-devnet.ts @@ -21,7 +21,8 @@ const command = `tenderly devnet spawn-rpc --project ${TENDERLY_PROJECT_SLUG} -- const spawnDevNet = async () => { const res = await asyncExec(command); - const devNetUrl = res.stderr.trim().toString(); + const upperStr = res.stderr.trim().toString(); + const devNetUrl = upperStr.substring(upperStr.indexOf("https")); console.log(`DEVNET_RPC_URL=${ devNetUrl }`); From 32e79c46d556515e81d702f12152467a34306c1c Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 13 Jun 2023 15:53:13 -0700 Subject: [PATCH 27/40] swap to the org project from personal --- .../artifactProxies/ERC1967ProxyAccessor.sol | 15 +++++++++++++++ tenderly.yaml | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 contracts/artifactProxies/ERC1967ProxyAccessor.sol diff --git a/contracts/artifactProxies/ERC1967ProxyAccessor.sol b/contracts/artifactProxies/ERC1967ProxyAccessor.sol new file mode 100644 index 000000000..f0d4eb60e --- /dev/null +++ b/contracts/artifactProxies/ERC1967ProxyAccessor.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; + + +/** + * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an + * implementation address that can be changed. This address is stored in storage in the location specified by + * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the + * implementation behind the proxy. + */ +abstract contract ERC1967ProxyAccessor is ERC1967Proxy {} diff --git a/tenderly.yaml b/tenderly.yaml index 6b10f3b01..5d6d39a40 100644 --- a/tenderly.yaml +++ b/tenderly.yaml @@ -1,7 +1,7 @@ account_id: e750f9f2-65bc-4765-84a8-7f8dbddd73ee exports: hardhat: - project_slug: whtcrw/project + project_slug: zer0-os/zns rpc_address: 127.0.0.1:8545 protocol: "" forked_network: Mainnet @@ -17,5 +17,5 @@ exports: istanbul_block: 0 berlin_block: 0 london_block: 0 -project_slug: project +project_slug: zns provider: "" From 0b69441fca360a4f97b2c66050b9a23796c704d7 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 13 Jun 2023 16:11:07 -0700 Subject: [PATCH 28/40] change versioning of oz packages --- package.json | 8 ++++---- yarn.lock | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index b68c9a811..423d05870 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "zns-contracts", + "name": "@zero-tech/zns-contracts", "version": "0.0.0", "description": "Zero Name Service Smart Contracts", "author": "Zero CPT", @@ -34,9 +34,9 @@ "@nomicfoundation/hardhat-toolbox": "2.0.2", "@nomiclabs/hardhat-ethers": "2.2.2", "@nomiclabs/hardhat-etherscan": "3.0.0", - "@openzeppelin/contracts": "4.8.2", - "@openzeppelin/contracts-upgradeable": "4.8.2", - "@openzeppelin/hardhat-upgrades": "^1.26.0", + "@openzeppelin/contracts": "4.8.3", + "@openzeppelin/contracts-upgradeable": "4.8.3", + "@openzeppelin/hardhat-upgrades": "1.26.0", "@semantic-release/git": "^10.0.1", "@typechain/ethers-v5": "10.1.0", "@typechain/hardhat": "6.1.2", diff --git a/yarn.lock b/yarn.lock index 2c382b922..00b55fb57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1461,17 +1461,17 @@ dependencies: "@octokit/openapi-types" "^17.2.0" -"@openzeppelin/contracts-upgradeable@4.8.2": - version "4.8.2" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.2.tgz#edef522bdbc46d478481391553bababdd2199e27" - integrity sha512-zIggnBwemUmmt9IS73qxi+tumALxCY4QEs3zLCII78k0Gfse2hAOdAkuAeLUzvWUpneMUfFE5sGHzEUSTvn4Ag== +"@openzeppelin/contracts-upgradeable@4.8.3": + version "4.8.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.3.tgz#6b076a7b751811b90fe3a172a7faeaa603e13a3f" + integrity sha512-SXDRl7HKpl2WDoJpn7CK/M9U4Z8gNXDHHChAKh0Iz+Wew3wu6CmFYBeie3je8V0GSXZAIYYwUktSrnW/kwVPtg== -"@openzeppelin/contracts@4.8.2": - version "4.8.2" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.2.tgz#d815ade0027b50beb9bcca67143c6bcc3e3923d6" - integrity sha512-kEUOgPQszC0fSYWpbh2kT94ltOJwj1qfT2DWo+zVttmGmf97JZ99LspePNaeeaLhCImaHVeBbjaQFZQn7+Zc5g== +"@openzeppelin/contracts@4.8.3": + version "4.8.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.3.tgz#cbef3146bfc570849405f59cba18235da95a252a" + integrity sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg== -"@openzeppelin/hardhat-upgrades@^1.26.0": +"@openzeppelin/hardhat-upgrades@1.26.0": version "1.26.0" resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.26.0.tgz#a1c667c6fd59fa90d026bab461486ea2bffb948f" integrity sha512-ggCvdIf7A9QcMedCaswecgt3N7hacx3qYOn+4bNPqMAwslo/SJ9vN4AhV0VWkDcY4CqFFou3RFQmDWNeLMBX9A== From 02f417b3eee4cc6a7f05151a3a91e94705031f96 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 13 Jun 2023 16:30:52 -0700 Subject: [PATCH 29/40] fix naming in contracts, tests, types, etc. add some types for the future tenderly verification logic --- contracts/access/ZNSRoles.sol | 2 +- ...IZNSEthRegistrar.sol => IZNSRegistrar.sol} | 2 +- .../{ZNSEthRegistrar.sol => ZNSRegistrar.sol} | 30 ++++----- .../distribution/ZNSEthRegistrarMock.sol | 8 --- .../distribution/ZNSRegistrarMock.sol | 8 +++ test/ZNSEthRegistrar.test.ts | 24 ++++---- test/helpers/constants.ts | 2 +- test/helpers/deployZNS.ts | 10 +-- test/helpers/errors.ts | 6 +- test/helpers/types.ts | 61 ++++++++++++++++--- 10 files changed, 100 insertions(+), 53 deletions(-) rename contracts/distribution/{IZNSEthRegistrar.sol => IZNSRegistrar.sol} (98%) rename contracts/distribution/{ZNSEthRegistrar.sol => ZNSRegistrar.sol} (87%) delete mode 100644 contracts/upgradeMocks/distribution/ZNSEthRegistrarMock.sol create mode 100644 contracts/upgradeMocks/distribution/ZNSRegistrarMock.sol diff --git a/contracts/access/ZNSRoles.sol b/contracts/access/ZNSRoles.sol index 2a19007b9..a6d2facad 100644 --- a/contracts/access/ZNSRoles.sol +++ b/contracts/access/ZNSRoles.sol @@ -12,6 +12,6 @@ abstract contract ZNSRoles { // so we don't have to upgrade all contracts // TODO AC: possibly remove executor role? bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); - // this role is here specifically for the ZNSEthRegistrar contract + // this role is here specifically for the ZNSRegistrar contract bytes32 public constant REGISTRAR_ROLE = keccak256("REGISTRAR_ROLE"); } diff --git a/contracts/distribution/IZNSEthRegistrar.sol b/contracts/distribution/IZNSRegistrar.sol similarity index 98% rename from contracts/distribution/IZNSEthRegistrar.sol rename to contracts/distribution/IZNSRegistrar.sol index e8dbfb7c3..29ae9f259 100644 --- a/contracts/distribution/IZNSEthRegistrar.sol +++ b/contracts/distribution/IZNSRegistrar.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.18; -interface IZNSEthRegistrar { +interface IZNSRegistrar { event DomainRegistered( bytes32 indexed domainHash, uint256 indexed tokenId, diff --git a/contracts/distribution/ZNSEthRegistrar.sol b/contracts/distribution/ZNSRegistrar.sol similarity index 87% rename from contracts/distribution/ZNSEthRegistrar.sol rename to contracts/distribution/ZNSRegistrar.sol index ccfcef820..3faa13452 100644 --- a/contracts/distribution/ZNSEthRegistrar.sol +++ b/contracts/distribution/ZNSRegistrar.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.18; -import { IZNSEthRegistrar } from "./IZNSEthRegistrar.sol"; +import { IZNSRegistrar } from "./IZNSRegistrar.sol"; import { IZNSRegistry } from "../registry/IZNSRegistry.sol"; import { IZNSTreasury } from "./IZNSTreasury.sol"; import { IZNSDomainToken } from "../token/IZNSDomainToken.sol"; @@ -10,7 +10,7 @@ import { AccessControlled } from "../access/AccessControlled.sol"; import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; -contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar { +contract ZNSRegistrar is AccessControlled, UUPSUpgradeable, IZNSRegistrar { IZNSRegistry public registry; IZNSTreasury public treasury; IZNSDomainToken public domainToken; @@ -19,7 +19,7 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar modifier onlyNameOwner(bytes32 domainHash) { require( msg.sender == registry.getDomainOwner(domainHash), - "ZNSEthRegistrar: Not the owner of the Name" + "ZNSRegistrar: Not the owner of the Name" ); _; } @@ -27,13 +27,13 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar modifier onlyTokenOwner(bytes32 domainHash) { require( msg.sender == domainToken.ownerOf(uint256(domainHash)), - "ZNSEthRegistrar: Not the owner of the Token" + "ZNSRegistrar: Not the owner of the Token" ); _; } /** - * @notice Create an instance of the ZNSEthRegistrar + * @notice Create an instance of the ZNSRegistrar * for registering ZNS domains and subdomains */ function initialize( @@ -62,7 +62,7 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar ) external override returns (bytes32) { require( bytes(name).length != 0, - "ZNSEthRegistrar: Domain Name not provided" + "ZNSRegistrar: Domain Name not provided" ); // Create hash for given domain name @@ -70,7 +70,7 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar require( !registry.exists(domainHash), - "ZNSEthRegistrar: Domain already exists" + "ZNSRegistrar: Domain already exists" ); // Staking logic @@ -96,9 +96,9 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar // TODO: figure out how to guard this so people can stake tokens // without the risk of staking contract or wallet to call reclaim+revoke // from underneath them - function revokeDomain(bytes32 domainHash) + function revokeDomain(bytes32 domainHash) external - override + override onlyNameOwner(domainHash) onlyTokenOwner(domainHash) { @@ -123,7 +123,7 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar function setRegistry(address registry_) public override onlyAdmin { require( registry_ != address(0), - "ZNSEthRegistrar: registry_ is 0x0 address" + "ZNSRegistrar: registry_ is 0x0 address" ); registry = IZNSRegistry(registry_); @@ -133,7 +133,7 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar function setTreasury(address treasury_) public override onlyAdmin { require( treasury_ != address(0), - "ZNSEthRegistrar: treasury_ is 0x0 address" + "ZNSRegistrar: treasury_ is 0x0 address" ); treasury = IZNSTreasury(treasury_); @@ -143,7 +143,7 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar function setDomainToken(address domainToken_) public override onlyAdmin { require( domainToken_ != address(0), - "ZNSEthRegistrar: domainToken_ is 0x0 address" + "ZNSRegistrar: domainToken_ is 0x0 address" ); domainToken = IZNSDomainToken(domainToken_); @@ -153,7 +153,7 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar function setAddressResolver(address addressResolver_) public override onlyAdmin { require( addressResolver_ != address(0), - "ZNSEthRegistrar: addressResolver_ is 0x0 address" + "ZNSRegistrar: addressResolver_ is 0x0 address" ); addressResolver = IZNSAddressResolver(addressResolver_); @@ -162,13 +162,13 @@ contract ZNSEthRegistrar is AccessControlled, UUPSUpgradeable, IZNSEthRegistrar function setAccessController(address accessController_) external - override(AccessControlled, IZNSEthRegistrar) + override(AccessControlled, IZNSRegistrar) onlyAdmin { _setAccessController(accessController_); } - function getAccessController() external view override(AccessControlled, IZNSEthRegistrar) returns (address) { + function getAccessController() external view override(AccessControlled, IZNSRegistrar) returns (address) { return address(accessController); } diff --git a/contracts/upgradeMocks/distribution/ZNSEthRegistrarMock.sol b/contracts/upgradeMocks/distribution/ZNSEthRegistrarMock.sol deleted file mode 100644 index 9f98d9f93..000000000 --- a/contracts/upgradeMocks/distribution/ZNSEthRegistrarMock.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.18; - -import { ZNSEthRegistrar } from "../../distribution/ZNSEthRegistrar.sol"; -import { UpgradeMock } from "../UpgradeMock.sol"; - - /* solhint-disable */ -contract ZNSEthRegistrarUpgradeMock is ZNSEthRegistrar, UpgradeMock {} diff --git a/contracts/upgradeMocks/distribution/ZNSRegistrarMock.sol b/contracts/upgradeMocks/distribution/ZNSRegistrarMock.sol new file mode 100644 index 000000000..a9e7d2390 --- /dev/null +++ b/contracts/upgradeMocks/distribution/ZNSRegistrarMock.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.18; + +import { ZNSRegistrar } from "../../distribution/ZNSRegistrar.sol"; +import { UpgradeMock } from "../UpgradeMock.sol"; + + /* solhint-disable */ +contract ZNSRegistrarUpgradeMock is ZNSRegistrar, UpgradeMock {} diff --git a/test/ZNSEthRegistrar.test.ts b/test/ZNSEthRegistrar.test.ts index 0565eeee4..1626b7c7f 100644 --- a/test/ZNSEthRegistrar.test.ts +++ b/test/ZNSEthRegistrar.test.ts @@ -19,11 +19,11 @@ import { getDomainHashFromEvent, getTokenIdFromEvent } from "./helpers/events"; import { BigNumber } from "ethers"; import { getAccessRevertMsg } from "./helpers/errors"; import { ADMIN_ROLE, GOVERNOR_ROLE } from "./helpers/access"; -import { ZNSEthRegistrar__factory, ZNSEthRegistrarUpgradeMock__factory } from "../typechain"; +import { ZNSRegistrar__factory, ZNSRegistrarUpgradeMock__factory } from "../typechain"; require("@nomicfoundation/hardhat-chai-matchers"); -describe("ZNSEthRegistrar", () => { +describe("ZNSRegistrar", () => { let deployer : SignerWithAddress; let user : SignerWithAddress; let governor : SignerWithAddress; @@ -63,7 +63,7 @@ describe("ZNSEthRegistrar", () => { const userHasAdmin = await zns.accessController.hasRole(ADMIN_ROLE, user.address); expect(userHasAdmin).to.be.false; - const registrarFactory = new ZNSEthRegistrar__factory(deployer); + const registrarFactory = new ZNSRegistrar__factory(deployer); const registrar = await registrarFactory.connect(user).deploy(); await registrar.deployed(); @@ -84,7 +84,7 @@ describe("ZNSEthRegistrar", () => { await expect( defaultRegistration(deployer, zns, emptyName) - ).to.be.revertedWith("ZNSEthRegistrar: Domain Name not provided"); + ).to.be.revertedWith("ZNSRegistrar: Domain Name not provided"); }); it("Successfully registers a domain without a resolver or resolver content", async () => { @@ -172,7 +172,7 @@ describe("ZNSEthRegistrar", () => { await defaultRegistration(user, zns, defaultDomain); const failTx = defaultRegistration(deployer, zns, defaultDomain); - await expect(failTx).to.be.revertedWith("ZNSEthRegistrar: Domain already exists"); + await expect(failTx).to.be.revertedWith("ZNSRegistrar: Domain already exists"); }); it("Successfully registers a domain without resolver content", async () => { @@ -548,7 +548,7 @@ describe("ZNSEthRegistrar", () => { it("Should revert if ZNSRegistry is address zero", async () => { const tx = zns.registrar.connect(deployer).setRegistry(ethers.constants.AddressZero); - await expect(tx).to.be.revertedWith("ZNSEthRegistrar: registry_ is 0x0 address"); + await expect(tx).to.be.revertedWith("ZNSRegistrar: registry_ is 0x0 address"); }); }); @@ -573,7 +573,7 @@ describe("ZNSEthRegistrar", () => { it("Should revert if Treasury is address zero", async () => { const tx = zns.registrar.connect(deployer).setTreasury(ethers.constants.AddressZero); - await expect(tx).to.be.revertedWith("ZNSEthRegistrar: treasury_ is 0x0 address"); + await expect(tx).to.be.revertedWith("ZNSRegistrar: treasury_ is 0x0 address"); }); }); @@ -598,7 +598,7 @@ describe("ZNSEthRegistrar", () => { it("Should revert if DomainToken is address zero", async () => { const tx = zns.registrar.connect(deployer).setDomainToken(ethers.constants.AddressZero); - await expect(tx).to.be.revertedWith("ZNSEthRegistrar: domainToken_ is 0x0 address"); + await expect(tx).to.be.revertedWith("ZNSRegistrar: domainToken_ is 0x0 address"); }); }); @@ -623,7 +623,7 @@ describe("ZNSEthRegistrar", () => { it("Should revert if AddressResolver is address zero", async () => { const tx = zns.registrar.connect(deployer).setAddressResolver(ethers.constants.AddressZero); - await expect(tx).to.be.revertedWith("ZNSEthRegistrar: addressResolver_ is 0x0 address"); + await expect(tx).to.be.revertedWith("ZNSRegistrar: addressResolver_ is 0x0 address"); }); }); }); @@ -633,7 +633,7 @@ describe("ZNSEthRegistrar", () => { // Confirm deployer has the correct role first await expect(zns.accessController.checkGovernor(deployer.address)).to.not.be.reverted; - const registrarFactory = new ZNSEthRegistrar__factory(deployer); + const registrarFactory = new ZNSRegistrar__factory(deployer); const registrar = await registrarFactory.deploy(); await registrar.deployed(); @@ -642,7 +642,7 @@ describe("ZNSEthRegistrar", () => { }); it("Fails to upgrade when an unauthorized users calls", async () => { - const registrarFactory = new ZNSEthRegistrar__factory(deployer); + const registrarFactory = new ZNSRegistrar__factory(deployer); const registrar = await registrarFactory.deploy(); await registrar.deployed(); @@ -657,7 +657,7 @@ describe("ZNSEthRegistrar", () => { // Confirm deployer has the correct role first await expect(zns.accessController.checkGovernor(deployer.address)).to.not.be.reverted; - const registrarFactory = new ZNSEthRegistrarUpgradeMock__factory(deployer); + const registrarFactory = new ZNSRegistrarUpgradeMock__factory(deployer); const registrar = await registrarFactory.deploy(); await registrar.deployed(); diff --git a/test/helpers/constants.ts b/test/helpers/constants.ts index 021d8b1ad..8628874cd 100644 --- a/test/helpers/constants.ts +++ b/test/helpers/constants.ts @@ -27,5 +27,5 @@ export const zeroTokenMockName = "ZeroTokenMock"; export const addressResolverName = "ZNSAddressResolver"; export const priceOracleName = "ZNSPriceOracle"; export const treasuryName = "ZNSTreasury"; -export const registrarName = "ZNSEthRegistrar"; +export const registrarName = "ZNSRegistrar"; diff --git a/test/helpers/deployZNS.ts b/test/helpers/deployZNS.ts index 00bc5a038..1ef9eb2d4 100644 --- a/test/helpers/deployZNS.ts +++ b/test/helpers/deployZNS.ts @@ -6,8 +6,8 @@ import { ZNSAddressResolver__factory, ZNSDomainToken, ZNSDomainToken__factory, - ZNSEthRegistrar, - ZNSEthRegistrar__factory, + ZNSRegistrar, + ZNSRegistrar__factory, ZNSPriceOracle, ZNSPriceOracle__factory, ZNSRegistry, @@ -162,8 +162,8 @@ export const deployRegistrar = async ( deployer : SignerWithAddress, accessController : ZNSAccessController, config : RegistrarConfig -) : Promise => { - const registrarFactory = new ZNSEthRegistrar__factory(deployer); +) : Promise => { + const registrarFactory = new ZNSRegistrar__factory(deployer); const registrar = await upgrades.deployProxy( registrarFactory, @@ -177,7 +177,7 @@ export const deployRegistrar = async ( { kind: "uups", } - ) as ZNSEthRegistrar; + ) as ZNSRegistrar; await registrar.deployed(); diff --git a/test/helpers/errors.ts b/test/helpers/errors.ts index a8eb80288..14499f120 100644 --- a/test/helpers/errors.ts +++ b/test/helpers/errors.ts @@ -11,9 +11,9 @@ export const ONLY_OWNER_REGISTRAR_REG_ERR = "ZNSRegistry: Only Name Owner or Reg export const NOT_AUTHORIZED_REG_ERR = "ZNSRegistry: Not authorized"; export const OWNER_NOT_ZERO_REG_ERR = "ZNSRegistry: Owner cannot be zero address"; -// ZNSEthRegistrar -export const NOT_NAME_OWNER_RAR_ERR = "ZNSEthRegistrar: Not the owner of the Name"; -export const NOT_TOKEN_OWNER_RAR_ERR = "ZNSEthRegistrar: Not the owner of the Token"; +// ZNSRegistrar +export const NOT_NAME_OWNER_RAR_ERR = "ZNSRegistrar: Not the owner of the Name"; +export const NOT_TOKEN_OWNER_RAR_ERR = "ZNSRegistrar: Not the owner of the Token"; export const MULTIPLIER_OUT_OF_RANGE_ORA_ERR = "ZNSPriceOracle: Multiplier out of range"; export const INVALID_TOKENID_ERC_ERR = "ERC721: invalid token ID"; export const INITIALIZED_ERR = "Initializable: contract is already initialized"; diff --git a/test/helpers/types.ts b/test/helpers/types.ts index b2e85e08c..5c8f00e8a 100644 --- a/test/helpers/types.ts +++ b/test/helpers/types.ts @@ -2,13 +2,13 @@ import { BigNumber } from "ethers"; import { ZNSAddressResolver, ZNSDomainToken, - ZNSEthRegistrar, + ZNSRegistrar, ZNSPriceOracle, ZNSRegistry, ZNSTreasury, ZeroTokenMock, ZNSAccessController, - ZNSEthRegistrarUpgradeMock, + ZNSRegistrarUpgradeMock, ZNSPriceOracleUpgradeMock, ZNSAddressResolverUpgradeMock, ZNSDomainTokenUpgradeMock, @@ -16,7 +16,7 @@ import { ZNSTreasuryUpgradeMock, ZNSAddressResolverUpgradeMock__factory, ZNSDomainTokenUpgradeMock__factory, - ZNSEthRegistrarUpgradeMock__factory, + ZNSRegistrarUpgradeMock__factory, ZNSPriceOracleUpgradeMock__factory, ZNSRegistryUpgradeMock__factory, ZNSTreasuryUpgradeMock__factory, @@ -28,7 +28,7 @@ export type Maybe = T | undefined; export type GetterFunction = Promise>; export type ZNSContractMockFactory = - ZNSEthRegistrarUpgradeMock__factory | + ZNSRegistrarUpgradeMock__factory | ZNSPriceOracleUpgradeMock__factory | ZNSTreasuryUpgradeMock__factory | ZNSRegistryUpgradeMock__factory | @@ -36,7 +36,7 @@ export type ZNSContractMockFactory = ZNSDomainTokenUpgradeMock__factory; export type ZNSContractMock = - ZNSEthRegistrarUpgradeMock | + ZNSRegistrarUpgradeMock | ZNSPriceOracleUpgradeMock | ZNSTreasuryUpgradeMock | ZNSRegistryUpgradeMock | @@ -44,7 +44,7 @@ export type ZNSContractMock = ZNSDomainTokenUpgradeMock; export type ZNSContract = - ZNSEthRegistrar | + ZNSRegistrar | ZNSPriceOracle | ZNSTreasury | ZNSRegistry | @@ -70,6 +70,36 @@ export interface RegistrarConfig { addressResolverAddress : string; } +export interface ZNSRegistryProxy { + proxy : ZNSRegistry; + impl : ZNSRegistry; +} + +export interface ZNSDomainTokenProxy { + proxy : ZNSDomainToken; + impl : ZNSDomainToken; +} + +export interface ZNSAddressResolverProxy { + proxy : ZNSAddressResolver; + impl : ZNSAddressResolver; +} + +export interface ZNSPriceOracleProxy { + proxy : ZNSPriceOracle; + impl : ZNSPriceOracle; +} + +export interface ZNSTreasuryProxy { + proxy : ZNSTreasury; + impl : ZNSTreasury; +} + +export interface ZNSRegistrarProxy { + proxy : ZNSRegistrar; + impl : ZNSRegistrar; +} + export interface ZNSContracts { accessController : ZNSAccessController; registry : ZNSRegistry; @@ -78,7 +108,24 @@ export interface ZNSContracts { addressResolver : ZNSAddressResolver; priceOracle : ZNSPriceOracle; treasury : ZNSTreasury; - registrar : ZNSEthRegistrar; + registrar : ZNSRegistrar; +} + +export interface ZNSContractsProxy { + accessController : { + proxy : null; + impl : ZNSAccessController; + }; + registry : ZNSRegistryProxy; + domainToken : ZNSDomainTokenProxy; + zeroToken : { + proxy : null; + impl : ZeroTokenMock; + }; // TODO fix when real token + addressResolver : ZNSAddressResolverProxy; + priceOracle : ZNSPriceOracleProxy; + treasury : ZNSTreasuryProxy; + registrar : ZNSRegistrarProxy; } export interface DeployZNSParams { From a7436d8e48764e4ff96e5031dec778e9f93af167 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 13 Jun 2023 16:43:18 -0700 Subject: [PATCH 30/40] turn off tenderly for CI to pass with coverage --- hardhat.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 0f92de1d1..8801a8c3f 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -71,6 +71,6 @@ const config : HardhatUserConfig = { // keep it commented out and uncomment when using DevNet // locally. // !!! Uncomment this when using Tenderly DevNet !!! -tenderly.setup({ automaticVerifications: true }); +// tenderly.setup({ automaticVerifications: true }); export default config; From 6fc46689f149df506f24d27379d1d7ea3ec96752 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 13 Jun 2023 17:02:06 -0700 Subject: [PATCH 31/40] commit prototyping code for contract verification on tenderly --- src/tenderly/deploy-verify-zns.ts | 101 +++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 30 deletions(-) diff --git a/src/tenderly/deploy-verify-zns.ts b/src/tenderly/deploy-verify-zns.ts index d3a81884f..4f2a0a023 100644 --- a/src/tenderly/deploy-verify-zns.ts +++ b/src/tenderly/deploy-verify-zns.ts @@ -21,40 +21,81 @@ export const deployVerifyZNS = async ({ adminAddresses, }); + // const contractsArr = await Object.entries(zns).reduce( + // async (acc, [key, contract]) : Promise> => { + // const newAcc = await acc; + // const name = names.find( + // el => el.toLowerCase() + // .includes(key.toLowerCase()) + // ) as string; + // + // const impl = await contract.implementation(); + // + // const curObj = { + // proxy: contract.address, + // impl: impl.address, + // name, + // }; + // + // return [...newAcc, curObj]; + // } , Promise.resolve([]) + // ); - const names = [ - accessControllerName, - registryName, - domainTokenName, - zeroTokenMockName, - addressResolverName, - priceOracleName, - treasuryName, - registrarName, - ]; + // const names = [ + // accessControllerName, + // registryName, + // domainTokenName, + // zeroTokenMockName, + // addressResolverName, + // priceOracleName, + // treasuryName, + // registrarName, + // ]; + + + // testing manually one contract at a time + // here is a try for proxy - no errors, but nothing is pushed + await hre.tenderly.verify({ + name: "ERC1967Proxy", + address: zns.domainToken.address, + }); + + await hre.tenderly.persistArtifacts({ + name: "ERC1967Proxy", + address: zns.domainToken.address, + }); + + // get "Error: Contract at
doesn't look like an ERC 1967 proxy with a logic contract address" + // Why?? + const implAddress = await hre.upgrades.erc1967.getImplementationAddress(zns.domainToken.address); + + await hre.tenderly.verify({ + name: domainTokenName, + address: implAddress, + }); + + await hre.tenderly.persistArtifacts({ + name: domainTokenName, + address: implAddress, + }); // // Verify and add source code to Tenderly // // for easy debugging - await Object.entries(zns).reduce( - async (acc, [key, contract]) : Promise => { - const name = names.find( - el => el.toLowerCase() - .includes(key.toLowerCase()) - ) as string; - - await hre.tenderly.verify({ - name, - address: contract.address, - }); - - await hre.tenderly.persistArtifacts({ - name, - address: contract.address, - }); - - return acc; - }, Promise.resolve({}) - ); + // await Object.entries(zns).reduce( + // async (acc, [key, contract]) : Promise => { + // await hre.tenderly.verify({ + // name, + // address: contract.address, + // }); + // + // await hre.tenderly.persistArtifacts({ + // name, + // address: contract.address, + // }); + // + // return acc; + // }, Promise.resolve({}) + // ); return zns; }; From 6b1966c76e07dc5ae57560215583f9a25501b09d Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 14 Jun 2023 11:20:00 -0700 Subject: [PATCH 32/40] remove redundant types --- test/helpers/types.ts | 49 +------------------------------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/test/helpers/types.ts b/test/helpers/types.ts index 5c8f00e8a..d197b0378 100644 --- a/test/helpers/types.ts +++ b/test/helpers/types.ts @@ -70,36 +70,6 @@ export interface RegistrarConfig { addressResolverAddress : string; } -export interface ZNSRegistryProxy { - proxy : ZNSRegistry; - impl : ZNSRegistry; -} - -export interface ZNSDomainTokenProxy { - proxy : ZNSDomainToken; - impl : ZNSDomainToken; -} - -export interface ZNSAddressResolverProxy { - proxy : ZNSAddressResolver; - impl : ZNSAddressResolver; -} - -export interface ZNSPriceOracleProxy { - proxy : ZNSPriceOracle; - impl : ZNSPriceOracle; -} - -export interface ZNSTreasuryProxy { - proxy : ZNSTreasury; - impl : ZNSTreasury; -} - -export interface ZNSRegistrarProxy { - proxy : ZNSRegistrar; - impl : ZNSRegistrar; -} - export interface ZNSContracts { accessController : ZNSAccessController; registry : ZNSRegistry; @@ -111,23 +81,6 @@ export interface ZNSContracts { registrar : ZNSRegistrar; } -export interface ZNSContractsProxy { - accessController : { - proxy : null; - impl : ZNSAccessController; - }; - registry : ZNSRegistryProxy; - domainToken : ZNSDomainTokenProxy; - zeroToken : { - proxy : null; - impl : ZeroTokenMock; - }; // TODO fix when real token - addressResolver : ZNSAddressResolverProxy; - priceOracle : ZNSPriceOracleProxy; - treasury : ZNSTreasuryProxy; - registrar : ZNSRegistrarProxy; -} - export interface DeployZNSParams { deployer : SignerWithAddress; governorAddresses : Array; @@ -135,4 +88,4 @@ export interface DeployZNSParams { priceConfig ?: PriceParams; registrationFeePerc ?: BigNumber; zeroVaultAddress ?: string; -} \ No newline at end of file +} From f38e7e198a013a2093efceb3a381b9e85c116d80 Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 14 Jun 2023 11:22:39 -0700 Subject: [PATCH 33/40] move tenderly package to devDeps --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 423d05870..8a8e38765 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@openzeppelin/contracts": "4.8.3", "@openzeppelin/contracts-upgradeable": "4.8.3", "@openzeppelin/hardhat-upgrades": "1.26.0", + "@tenderly/hardhat-tenderly": "^1.7.4", "@semantic-release/git": "^10.0.1", "@typechain/ethers-v5": "10.1.0", "@typechain/hardhat": "6.1.2", @@ -58,7 +59,6 @@ "typescript": "^5.0.2" }, "dependencies": { - "@tenderly/hardhat-tenderly": "^1.7.4", "dotenv": "16.0.3" }, "resolutions": { From f090da10e344cb146cc63dfe1bf9ca8a7800729c Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 14 Jun 2023 11:23:07 -0700 Subject: [PATCH 34/40] remove redundant helper since no verification is supported, fix flows helper --- src/tenderly/deploy-verify-zns.ts | 101 ------------------------------ src/tenderly/run-all-flows.ts | 8 ++- 2 files changed, 6 insertions(+), 103 deletions(-) delete mode 100644 src/tenderly/deploy-verify-zns.ts diff --git a/src/tenderly/deploy-verify-zns.ts b/src/tenderly/deploy-verify-zns.ts deleted file mode 100644 index 4f2a0a023..000000000 --- a/src/tenderly/deploy-verify-zns.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { - accessControllerName, addressResolverName, - deployZNS, domainTokenName, priceOracleName, registrarName, registryName, treasuryName, zeroTokenMockName, -} from "../../test/helpers"; -import * as hre from "hardhat"; -import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; - - -export const deployVerifyZNS = async ({ - governor, - governorAddresses = [ governor.address ], - adminAddresses = [ governor.address ], -} : { - governor : SignerWithAddress; - governorAddresses ?: Array; - adminAddresses ?: Array; -}) => { - const zns = await deployZNS({ - deployer: governor, - governorAddresses, - adminAddresses, - }); - - // const contractsArr = await Object.entries(zns).reduce( - // async (acc, [key, contract]) : Promise> => { - // const newAcc = await acc; - // const name = names.find( - // el => el.toLowerCase() - // .includes(key.toLowerCase()) - // ) as string; - // - // const impl = await contract.implementation(); - // - // const curObj = { - // proxy: contract.address, - // impl: impl.address, - // name, - // }; - // - // return [...newAcc, curObj]; - // } , Promise.resolve([]) - // ); - - // const names = [ - // accessControllerName, - // registryName, - // domainTokenName, - // zeroTokenMockName, - // addressResolverName, - // priceOracleName, - // treasuryName, - // registrarName, - // ]; - - - // testing manually one contract at a time - // here is a try for proxy - no errors, but nothing is pushed - await hre.tenderly.verify({ - name: "ERC1967Proxy", - address: zns.domainToken.address, - }); - - await hre.tenderly.persistArtifacts({ - name: "ERC1967Proxy", - address: zns.domainToken.address, - }); - - // get "Error: Contract at
doesn't look like an ERC 1967 proxy with a logic contract address" - // Why?? - const implAddress = await hre.upgrades.erc1967.getImplementationAddress(zns.domainToken.address); - - await hre.tenderly.verify({ - name: domainTokenName, - address: implAddress, - }); - - await hre.tenderly.persistArtifacts({ - name: domainTokenName, - address: implAddress, - }); - - // // Verify and add source code to Tenderly - // // for easy debugging - // await Object.entries(zns).reduce( - // async (acc, [key, contract]) : Promise => { - // await hre.tenderly.verify({ - // name, - // address: contract.address, - // }); - // - // await hre.tenderly.persistArtifacts({ - // name, - // address: contract.address, - // }); - // - // return acc; - // }, Promise.resolve({}) - // ); - - return zns; -}; diff --git a/src/tenderly/run-all-flows.ts b/src/tenderly/run-all-flows.ts index 700fd217a..17feffa72 100644 --- a/src/tenderly/run-all-flows.ts +++ b/src/tenderly/run-all-flows.ts @@ -1,7 +1,7 @@ import * as hre from "hardhat"; import { deployVerifyZNS } from "./deploy-verify-zns"; import * as ethers from "ethers"; -import { hashDomainLabel } from "../../test/helpers"; +import { deployZNS, hashDomainLabel } from "../../test/helpers"; import { BigNumber } from "ethers"; @@ -16,7 +16,11 @@ export const runAllFlows = async () => { user, ] = await hre.ethers.getSigners(); - const zns = await deployVerifyZNS({ governor }); + const zns = await deployZNS({ + deployer: governor, + governorAddresses: [governor.address], + adminAddresses: [governor.address], + }); // get some funds for the user await zns.zeroToken.connect(user).approve(zns.treasury.address, ethers.constants.MaxUint256); From a8ad79f040767e5488e3bdd73ab5de2e9895dfe6 Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 14 Jun 2023 11:24:28 -0700 Subject: [PATCH 35/40] delete redundant code --- .../artifactProxies/ERC1967ProxyAccessor.sol | 15 --------------- test/helpers/deployZNS.ts | 7 ------- 2 files changed, 22 deletions(-) delete mode 100644 contracts/artifactProxies/ERC1967ProxyAccessor.sol diff --git a/contracts/artifactProxies/ERC1967ProxyAccessor.sol b/contracts/artifactProxies/ERC1967ProxyAccessor.sol deleted file mode 100644 index f0d4eb60e..000000000 --- a/contracts/artifactProxies/ERC1967ProxyAccessor.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) - -pragma solidity ^0.8.0; - -import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; - - -/** - * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an - * implementation address that can be changed. This address is stored in storage in the location specified by - * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the - * implementation behind the proxy. - */ -abstract contract ERC1967ProxyAccessor is ERC1967Proxy {} diff --git a/test/helpers/deployZNS.ts b/test/helpers/deployZNS.ts index 1ef9eb2d4..9934657e5 100644 --- a/test/helpers/deployZNS.ts +++ b/test/helpers/deployZNS.ts @@ -247,13 +247,6 @@ export const deployZNS = async ({ registrar, }; - // Final configuration steps - // TODO AC: remove all redundant calls here! and delete hashing of the root and the need - // for Registrar to be owner/operator of the root - - // TODO verify tests are fine without this line - // await registry.connect(deployer).setOwnerOperator(registrar.address, true); - // Give 15 ZERO to the deployer and allowance to the treasury await zeroTokenMock.connect(deployer).approve(treasury.address, ethers.constants.MaxUint256); await zeroTokenMock.transfer(deployer.address, ethers.utils.parseEther("15")); From 5b0da0b1fcc6940fc81a13d11589dd0344fa45ec Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 14 Jun 2023 11:43:46 -0700 Subject: [PATCH 36/40] remove console rule for eslint --- .eslintrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index f66fc8fbe..9ec2a92ef 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,8 +5,8 @@ "files": ["src/**/*.ts", "test/**/*.ts", "./*.ts"], "extends": ["@zero-tech/eslint-config-cpt/node-ts/.eslintrc.json"], "rules": { - "no-unused-expressions": "off" - // "no-console": "off", // For debugging + "no-unused-expressions": "off", + "no-console": "off" // "@typescript-eslint/no-unused-vars": "off" // For debugging } } From 2309aca97cc6cb9fe9009dab830f8c6450c77f1a Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 14 Jun 2023 11:44:06 -0700 Subject: [PATCH 37/40] add code to log addresses for each contract when needed --- src/tenderly/run-all-flows.ts | 1 - test/helpers/access.ts | 4 ++ test/helpers/deployZNS.ts | 89 ++++++++++++++++++++++++++++++----- test/helpers/types.ts | 1 + 4 files changed, 82 insertions(+), 13 deletions(-) diff --git a/src/tenderly/run-all-flows.ts b/src/tenderly/run-all-flows.ts index 17feffa72..aa5039d89 100644 --- a/src/tenderly/run-all-flows.ts +++ b/src/tenderly/run-all-flows.ts @@ -1,5 +1,4 @@ import * as hre from "hardhat"; -import { deployVerifyZNS } from "./deploy-verify-zns"; import * as ethers from "ethers"; import { deployZNS, hashDomainLabel } from "../../test/helpers"; import { BigNumber } from "ethers"; diff --git a/test/helpers/access.ts b/test/helpers/access.ts index 90010fec8..0ef451509 100644 --- a/test/helpers/access.ts +++ b/test/helpers/access.ts @@ -26,10 +26,12 @@ export const deployAccessController = async ({ deployer, governorAddresses, adminAddresses, + logAddress, } : { deployer : SignerWithAddress; governorAddresses : Array; adminAddresses : Array; + logAddress : boolean; }) : Promise => { const accessControllerFactory = new ZNSAccessController__factory(deployer); const controller = await accessControllerFactory.deploy(); @@ -38,5 +40,7 @@ export const deployAccessController = async ({ await controller.initialize(governorAddresses, adminAddresses); + if (logAddress) console.log(`AccessController deployed at: ${controller.address}`); + return controller; }; diff --git a/test/helpers/deployZNS.ts b/test/helpers/deployZNS.ts index 9934657e5..ad9814473 100644 --- a/test/helpers/deployZNS.ts +++ b/test/helpers/deployZNS.ts @@ -30,7 +30,8 @@ import { BigNumber } from "ethers"; export const deployRegistry = async ( deployer : SignerWithAddress, - accessControllerAddress : string + accessControllerAddress : string, + logAddress : boolean ) : Promise => { const registryFactory = new ZNSRegistry__factory(deployer); const registry = await hre.upgrades.deployProxy( @@ -44,13 +45,22 @@ export const deployRegistry = async ( await registry.deployed(); + if (logAddress) { + const impl = await hre.upgrades.erc1967.getImplementationAddress(registry.address); + + console.log(`ZNSRegistry deployed at: + proxy: ${registry.address} + implementation: ${impl}`); + } + return registry; }; export const deployAddressResolver = async ( deployer : SignerWithAddress, accessControllerAddress : string, - registryAddress : string + registryAddress : string, + logAddress : boolean ) : Promise => { const addressResolverFactory = new ZNSAddressResolver__factory(deployer); @@ -67,6 +77,14 @@ export const deployAddressResolver = async ( await resolver.deployed(); + if (logAddress) { + const impl = await hre.upgrades.erc1967.getImplementationAddress(resolver.address); + + console.log(`ZNSAddressResolver deployed at: + proxy: ${resolver.address} + implementation: ${impl}`); + } + return resolver; }; @@ -75,11 +93,13 @@ export const deployPriceOracle = async ({ accessControllerAddress, priceConfig, registrationFee, + logAddress, } : { deployer : SignerWithAddress; accessControllerAddress : string; priceConfig : PriceParams; registrationFee : BigNumber; + logAddress : boolean; }) : Promise => { const priceOracleFactory = new ZNSPriceOracle__factory(deployer); @@ -97,12 +117,21 @@ export const deployPriceOracle = async ({ await priceOracle.deployed(); + if (logAddress) { + const impl = await hre.upgrades.erc1967.getImplementationAddress(priceOracle.address); + + console.log(`ZNSPriceOracle deployed at: + proxy: ${priceOracle.address} + implementation: ${impl}`); + } + return priceOracle; }; export const deployDomainToken = async ( deployer : SignerWithAddress, - accessControllerAddress : string + accessControllerAddress : string, + logAddress : boolean ) : Promise => { const domainTokenFactory = new ZNSDomainToken__factory(deployer); const domainToken = await upgrades.deployProxy( @@ -119,17 +148,30 @@ export const deployDomainToken = async ( await domainToken.deployed(); + if (logAddress) { + const impl = await hre.upgrades.erc1967.getImplementationAddress(domainToken.address); + + console.log(`ZNSDomainToken deployed at: + proxy: ${domainToken.address} + implementation: ${impl}`); + } + return domainToken; }; export const deployZeroTokenMock = async ( - deployer : SignerWithAddress + deployer : SignerWithAddress, + logAddress : boolean ) : Promise => { const zTokenMockMockFactory = new ZeroTokenMock__factory(deployer); const token = await zTokenMockMockFactory.deploy(deployer.address); await token.deployed(); + if (logAddress) { + console.log(`ZeroTokenMock deployed at: ${token.address}`); + } + return token; }; @@ -138,7 +180,8 @@ export const deployTreasury = async ( accessControllerAddress : string, priceOracleAddress : string, zTokenMockAddress : string, - zeroVaultAddress : string + zeroVaultAddress : string, + logAddress : boolean ) : Promise => { const treasuryFactory = new ZNSTreasury__factory(deployer); const treasury : ZNSTreasury = await upgrades.deployProxy(treasuryFactory, @@ -155,13 +198,22 @@ export const deployTreasury = async ( await treasury.deployed(); + if (logAddress) { + const impl = await hre.upgrades.erc1967.getImplementationAddress(treasury.address); + + console.log(`ZNSTreasury deployed at: + proxy: ${treasury.address} + implementation: ${impl}`); + } + return treasury; }; export const deployRegistrar = async ( deployer : SignerWithAddress, accessController : ZNSAccessController, - config : RegistrarConfig + config : RegistrarConfig, + logAddress : boolean ) : Promise => { const registrarFactory = new ZNSRegistrar__factory(deployer); @@ -183,6 +235,14 @@ export const deployRegistrar = async ( await accessController.connect(deployer).grantRole(REGISTRAR_ROLE, registrar.address); + if (logAddress) { + const impl = await hre.upgrades.erc1967.getImplementationAddress(registrar.address); + + console.log(`ZNSRegistrar deployed at: + proxy: ${registrar.address} + implementation: ${impl}`); + } + return registrar; }; @@ -193,23 +253,26 @@ export const deployZNS = async ({ priceConfig = priceConfigDefault, registrationFeePerc = registrationFeePercDefault, zeroVaultAddress = deployer.address, + logAddresses = false, } : DeployZNSParams) : Promise => { const accessController = await deployAccessController({ deployer, governorAddresses: [deployer.address, ...governorAddresses], adminAddresses: [deployer.address, ...adminAddresses], + logAddress: logAddresses, }); - const registry = await deployRegistry(deployer, accessController.address); + const registry = await deployRegistry(deployer, accessController.address, logAddresses); - const domainToken = await deployDomainToken(deployer, accessController.address); + const domainToken = await deployDomainToken(deployer, accessController.address, logAddresses); - const zeroTokenMock = await deployZeroTokenMock(deployer); + const zeroTokenMock = await deployZeroTokenMock(deployer, logAddresses); const addressResolver = await deployAddressResolver( deployer, accessController.address, - registry.address + registry.address, + logAddresses ); const priceOracle = await deployPriceOracle({ @@ -217,6 +280,7 @@ export const deployZNS = async ({ accessControllerAddress: accessController.address, priceConfig, registrationFee: registrationFeePerc, + logAddress: logAddresses, }); const treasury = await deployTreasury( @@ -224,7 +288,8 @@ export const deployZNS = async ({ accessController.address, priceOracle.address, zeroTokenMock.address, - zeroVaultAddress + zeroVaultAddress, + logAddresses ); const config : RegistrarConfig = { @@ -234,7 +299,7 @@ export const deployZNS = async ({ addressResolverAddress: addressResolver.address, }; - const registrar = await deployRegistrar(deployer, accessController, config); + const registrar = await deployRegistrar(deployer, accessController, config, logAddresses); const znsContracts : ZNSContracts = { accessController, diff --git a/test/helpers/types.ts b/test/helpers/types.ts index d197b0378..45675fd6d 100644 --- a/test/helpers/types.ts +++ b/test/helpers/types.ts @@ -88,4 +88,5 @@ export interface DeployZNSParams { priceConfig ?: PriceParams; registrationFeePerc ?: BigNumber; zeroVaultAddress ?: string; + logAddresses ?: boolean; } From e060d8a8cc5cd64e45b84d7c1eb8b9ed4ec0a755 Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 14 Jun 2023 11:55:22 -0700 Subject: [PATCH 38/40] add address logging for zero token --- test/helpers/deployZNS.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/test/helpers/deployZNS.ts b/test/helpers/deployZNS.ts index 0f685723e..b77578ec8 100644 --- a/test/helpers/deployZNS.ts +++ b/test/helpers/deployZNS.ts @@ -31,7 +31,8 @@ import { deployAccessController, REGISTRAR_ROLE } from "./access"; import { BigNumber } from "ethers"; export const deployZeroToken = async ( - deployer : SignerWithAddress + deployer : SignerWithAddress, + logAddress : boolean ) => { const factory = new ZeroToken__factory(deployer); @@ -46,6 +47,16 @@ export const deployZeroToken = async ( } ) as ZeroToken; + await zeroToken.deployed(); + + if (logAddress) { + const impl = await hre.upgrades.erc1967.getImplementationAddress(zeroToken.address); + + console.log(`ZeroToken deployed at: + proxy: ${zeroToken.address} + implementation: ${impl}`); + } + const mintAmount = ethers.utils.parseEther("10000"); // Mint 10,000 ZERO for self @@ -311,7 +322,7 @@ export const deployZNS = async ({ // While we do use the real ZeroToken contract, it is only deployed as a mock here // for testing purposes that verify expected behavior of other contracts. // This should not be used in any other context than deploying to a local hardhat testnet. - const zeroTokenMock = await deployZeroToken(deployer); + const zeroTokenMock = await deployZeroToken(deployer, logAddresses); const addressResolver = await deployAddressResolver( deployer, From 88bdabb4561a6408a5db76bfe1164c8556e71815 Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 14 Jun 2023 12:00:17 -0700 Subject: [PATCH 39/40] tiny fixes --- src/tenderly/run-all-flows.ts | 1 + test/helpers/deployZNS.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/tenderly/run-all-flows.ts b/src/tenderly/run-all-flows.ts index aa5039d89..e3eb2056a 100644 --- a/src/tenderly/run-all-flows.ts +++ b/src/tenderly/run-all-flows.ts @@ -19,6 +19,7 @@ export const runAllFlows = async () => { deployer: governor, governorAddresses: [governor.address], adminAddresses: [governor.address], + logAddresses: true, }); // get some funds for the user diff --git a/test/helpers/deployZNS.ts b/test/helpers/deployZNS.ts index b77578ec8..d61395764 100644 --- a/test/helpers/deployZNS.ts +++ b/test/helpers/deployZNS.ts @@ -301,13 +301,6 @@ export const deployZNS = async ({ zeroVaultAddress = deployer.address, logAddresses = false, } : DeployZNSParams) : Promise => { - const accessController = await deployAccessController({ - deployer, - governorAddresses: [deployer.address, ...governorAddresses], - adminAddresses: [deployer.address, ...adminAddresses], - logAddress: logAddresses, - }); - // We deploy every contract as a UUPS proxy, but ZERO is already // deployed as a transparent proxy. This means that there is already // a proxy admin deployed to the network. Because future deployments @@ -315,6 +308,13 @@ export const deployZNS = async ({ // to not clog the test output. await hre.upgrades.silenceWarnings(); + const accessController = await deployAccessController({ + deployer, + governorAddresses: [deployer.address, ...governorAddresses], + adminAddresses: [deployer.address, ...adminAddresses], + logAddress: logAddresses, + }); + const registry = await deployRegistry(deployer, accessController.address, logAddresses); const domainToken = await deployDomainToken(deployer, accessController.address, logAddresses); From c149e240fbb81ea0637291001afeb289b8f3f7ba Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 14 Jun 2023 12:56:45 -0700 Subject: [PATCH 40/40] create a helper for getting impl address from proxies, make deploy code use it --- test/helpers/constants.ts | 2 ++ test/helpers/deployZNS.ts | 15 ++++++++------- test/helpers/utils.ts | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 test/helpers/utils.ts diff --git a/test/helpers/constants.ts b/test/helpers/constants.ts index 8628874cd..1376f897b 100644 --- a/test/helpers/constants.ts +++ b/test/helpers/constants.ts @@ -19,6 +19,8 @@ export const priceConfigDefault : PriceParams = { priceMultiplier: ethers.BigNumber.from("390"), }; +export const implSlotErc1967 = "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"; + // Contract names export const accessControllerName = "ZNSAccessController"; export const registryName = "ZNSRegistry"; diff --git a/test/helpers/deployZNS.ts b/test/helpers/deployZNS.ts index d61395764..4875afdad 100644 --- a/test/helpers/deployZNS.ts +++ b/test/helpers/deployZNS.ts @@ -29,6 +29,7 @@ import { } from "./constants"; import { deployAccessController, REGISTRAR_ROLE } from "./access"; import { BigNumber } from "ethers"; +import { getProxyImplAddress } from "./utils"; export const deployZeroToken = async ( deployer : SignerWithAddress, @@ -50,7 +51,7 @@ export const deployZeroToken = async ( await zeroToken.deployed(); if (logAddress) { - const impl = await hre.upgrades.erc1967.getImplementationAddress(zeroToken.address); + const impl = await getProxyImplAddress(zeroToken.address); console.log(`ZeroToken deployed at: proxy: ${zeroToken.address} @@ -86,7 +87,7 @@ export const deployRegistry = async ( await registry.deployed(); if (logAddress) { - const impl = await hre.upgrades.erc1967.getImplementationAddress(registry.address); + const impl = await getProxyImplAddress(registry.address); console.log(`ZNSRegistry deployed at: proxy: ${registry.address} @@ -118,7 +119,7 @@ export const deployAddressResolver = async ( await resolver.deployed(); if (logAddress) { - const impl = await hre.upgrades.erc1967.getImplementationAddress(resolver.address); + const impl = await getProxyImplAddress(resolver.address); console.log(`ZNSAddressResolver deployed at: proxy: ${resolver.address} @@ -158,7 +159,7 @@ export const deployPriceOracle = async ({ await priceOracle.deployed(); if (logAddress) { - const impl = await hre.upgrades.erc1967.getImplementationAddress(priceOracle.address); + const impl = await getProxyImplAddress(priceOracle.address); console.log(`ZNSPriceOracle deployed at: proxy: ${priceOracle.address} @@ -189,7 +190,7 @@ export const deployDomainToken = async ( await domainToken.deployed(); if (logAddress) { - const impl = await hre.upgrades.erc1967.getImplementationAddress(domainToken.address); + const impl = await getProxyImplAddress(domainToken.address); console.log(`ZNSDomainToken deployed at: proxy: ${domainToken.address} @@ -239,7 +240,7 @@ export const deployTreasury = async ( await treasury.deployed(); if (logAddress) { - const impl = await hre.upgrades.erc1967.getImplementationAddress(treasury.address); + const impl = await getProxyImplAddress(treasury.address); console.log(`ZNSTreasury deployed at: proxy: ${treasury.address} @@ -276,7 +277,7 @@ export const deployRegistrar = async ( await accessController.connect(deployer).grantRole(REGISTRAR_ROLE, registrar.address); if (logAddress) { - const impl = await hre.upgrades.erc1967.getImplementationAddress(registrar.address); + const impl = await getProxyImplAddress(registrar.address); console.log(`ZNSRegistrar deployed at: proxy: ${registrar.address} diff --git a/test/helpers/utils.ts b/test/helpers/utils.ts new file mode 100644 index 000000000..ae369c4a9 --- /dev/null +++ b/test/helpers/utils.ts @@ -0,0 +1,15 @@ +import { ethers, upgrades } from "hardhat"; +import { implSlotErc1967 } from "./constants"; + +export const getProxyImplAddress = async (proxyAddress : string) => { + let impl; + try { + impl = await upgrades.erc1967.getImplementationAddress(proxyAddress); + } catch (e) { + const padded = await ethers.provider.getStorageAt(proxyAddress, implSlotErc1967); + impl = ethers.utils.hexStripZeros(padded); + } + + return impl; +}; +