From 16ce4fe8b634281e0cec8337d61b0066e3995ae8 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 9 Aug 2023 09:44:33 +0000 Subject: [PATCH 01/21] chore: repo config --- .gitignore | 2 + package.json | 11 +- yarn.lock | 1803 ++++++++++++++++++++++++++++++-------------------- 3 files changed, 1084 insertions(+), 732 deletions(-) diff --git a/.gitignore b/.gitignore index 0817c76e..95699543 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ jest.results.json *.iml .yalc yalc.lock +src/composable/generated +docs/typedoc/ \ No newline at end of file diff --git a/package.json b/package.json index ebd0b100..37dbbaf3 100644 --- a/package.json +++ b/package.json @@ -23,15 +23,17 @@ "test": "jest", "test:coverage": "jest --coverage --json --outputFile=jest.results.json && cat ./coverage/lcov.info | coveralls", "test:coverage:html": "jest --silent=false --coverage --coverageReporters html", - "codegen": "npm run graphql:codegen && npm run swagger:codegen", + "codegen": "npm run graphql:codegen && npm run swagger:codegen && npm run typechain:codegen", "prepare": "npm run build", "prepublishOnly": "npm test && npm run lint", "graphql:codegen": "graphql-codegen --config graphql-codegen.yml", - "swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.117.1/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false" + "swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.117.1/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false", + "typechain:codegen": "typechain --target ethers-v5 --out-dir ./src/composable/generated './abi/*.json'" }, "dependencies": { "@cowprotocol/contracts": "^1.4.0", "@ethersproject/abstract-signer": "^5.7.0", + "@openzeppelin/merkle-tree": "^1.0.5", "exponential-backoff": "^3.1.1", "limiter": "^2.1.0", "cross-fetch": "^3.1.5", @@ -48,6 +50,7 @@ "@graphql-codegen/cli": "3.0.0", "@graphql-codegen/typescript": "3.0.0", "@graphql-codegen/typescript-operations": "^3.0.0", + "@typechain/ethers-v5": "^11.0.0", "@types/jest": "^29.4.0", "@types/node": "^18.13.0", "@typescript-eslint/eslint-plugin": "^5.51.0", @@ -66,6 +69,7 @@ "prettier": "^2.5.1", "ts-mockito": "^2.6.1", "tsc-watch": "^6.0.0", + "typechain": "^8.2.0", "typescript": "^4.9.5" }, "jest": { @@ -76,6 +80,9 @@ ], "collectCoverageFrom": [ "src/**/*.{ts,tsx}" + ], + "coveragePathIgnorePatterns": [ + "src/composable/generated" ] }, "keywords": [ diff --git a/yarn.lock b/yarn.lock index e0f14146..3b518ffb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -57,6 +57,14 @@ dependencies: "@babel/highlight" "^7.18.6" +"@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.5": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.10.tgz#1c20e612b768fefa75f6e90d6ecb86329247f0a3" + integrity sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA== + dependencies: + "@babel/highlight" "^7.22.10" + chalk "^2.4.2" + "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": version "7.20.14" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.14.tgz#4106fc8b755f3e3ee0a0a7c27dde5de1d2b2baf8" @@ -67,6 +75,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== +"@babel/compat-data@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" + integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== + "@babel/core@^7.11.6": version "7.20.12" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.12.tgz#7930db57443c6714ad216953d1356dac0eb8496d" @@ -109,7 +122,7 @@ json5 "^2.2.2" semver "^6.3.0" -"@babel/core@^7.12.3", "@babel/core@^7.14.0": +"@babel/core@^7.12.3": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.9.tgz#805461f967c77ff46c74ca0460ccf4fe933ddd59" integrity sha512-1LIb1eL8APMy91/IMW+31ckrfBM4yCoLaVzoDhZUKSM4cu1L1nIidyxkCgzPAgrC5WEz36IPEr/eSeSF9pIn+g== @@ -130,7 +143,38 @@ json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.14.0", "@babel/generator@^7.18.9", "@babel/generator@^7.7.2": +"@babel/core@^7.14.0": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.10.tgz#aad442c7bcd1582252cb4576747ace35bc122f35" + integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-compilation-targets" "^7.22.10" + "@babel/helper-module-transforms" "^7.22.9" + "@babel/helpers" "^7.22.10" + "@babel/parser" "^7.22.10" + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.2" + semver "^6.3.1" + +"@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722" + integrity sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A== + dependencies: + "@babel/types" "^7.22.10" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + +"@babel/generator@^7.18.9", "@babel/generator@^7.7.2": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.9.tgz#68337e9ea8044d6ddc690fb29acae39359cca0a5" integrity sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug== @@ -139,7 +183,7 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/generator@^7.18.13", "@babel/generator@^7.20.7": +"@babel/generator@^7.20.7": version "7.20.14" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.14.tgz#9fa772c9f86a46c6ac9b321039400712b96f64ce" integrity sha512-AEmuXHdcD3A52HHXxaTmYlb8q/xMEhoRP67B3T4Oq7lbmSoqroMZzjnGj3+i1io3pdnF8iBYVu4Ilj+c4hBxYg== @@ -165,6 +209,13 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-annotate-as-pure@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" + integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" @@ -194,6 +245,17 @@ browserslist "^4.20.2" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.22.10", "@babel/helper-compilation-targets@^7.22.5", "@babel/helper-compilation-targets@^7.22.6": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz#01d648bbc25dd88f513d862ee0df27b7d4e67024" + integrity sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q== + dependencies: + "@babel/compat-data" "^7.22.9" + "@babel/helper-validator-option" "^7.22.5" + browserslist "^4.21.9" + lru-cache "^5.1.1" + semver "^6.3.1" + "@babel/helper-create-class-features-plugin@^7.12.1": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz#64f49ecb0020532f19b1d014b03bccaa1ab85fb9" @@ -260,6 +322,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== +"@babel/helper-environment-visitor@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98" + integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== + "@babel/helper-explode-assignable-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" @@ -291,6 +358,14 @@ "@babel/template" "^7.20.7" "@babel/types" "^7.21.0" +"@babel/helper-function-name@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be" + integrity sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ== + dependencies: + "@babel/template" "^7.22.5" + "@babel/types" "^7.22.5" + "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" @@ -298,6 +373,13 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-member-expression-to-functions@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz#1531661e8375af843ad37ac692c132841e2fd815" @@ -319,6 +401,13 @@ dependencies: "@babel/types" "^7.21.0" +"@babel/helper-member-expression-to-functions@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz#0a7c56117cad3372fbf8d2fb4bf8f8d64a1e76b2" + integrity sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" @@ -326,6 +415,13 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-module-imports@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz#1a8f4c9f4027d23f520bd76b364d44434a72660c" + integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712" @@ -368,6 +464,17 @@ "@babel/traverse" "^7.21.2" "@babel/types" "^7.21.2" +"@babel/helper-module-transforms@^7.22.5", "@babel/helper-module-transforms@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz#92dfcb1fbbb2bc62529024f72d942a8c97142129" + integrity sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-module-imports" "^7.22.5" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.5" + "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" @@ -375,6 +482,13 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-optimise-call-expression@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e" + integrity sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.8.0": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" @@ -385,6 +499,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== +"@babel/helper-plugin-utils@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== + "@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" @@ -418,6 +537,15 @@ "@babel/traverse" "^7.20.7" "@babel/types" "^7.20.7" +"@babel/helper-replace-supers@^7.22.5": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.9.tgz#cbdc27d6d8d18cd22c81ae4293765a5d9afd0779" + integrity sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg== + dependencies: + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-member-expression-to-functions" "^7.22.5" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-simple-access@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" @@ -432,12 +560,12 @@ dependencies: "@babel/types" "^7.20.2" -"@babel/helper-skip-transparent-expression-wrappers@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz#778d87b3a758d90b471e7b9918f34a9a02eb5818" - integrity sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw== +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== dependencies: - "@babel/types" "^7.18.9" + "@babel/types" "^7.22.5" "@babel/helper-skip-transparent-expression-wrappers@^7.20.0": version "7.20.0" @@ -446,6 +574,13 @@ dependencies: "@babel/types" "^7.20.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847" + integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-split-export-declaration@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" @@ -453,11 +588,23 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + "@babel/helper-string-parser@^7.19.4": version "7.19.4" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== +"@babel/helper-string-parser@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" + integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== + "@babel/helper-validator-identifier@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" @@ -468,11 +615,21 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== +"@babel/helper-validator-identifier@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" + integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== + "@babel/helper-validator-option@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== +"@babel/helper-validator-option@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" + integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== + "@babel/helper-wrap-function@^7.18.9": version "7.20.5" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" @@ -510,6 +667,15 @@ "@babel/traverse" "^7.21.0" "@babel/types" "^7.21.0" +"@babel/helpers@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.10.tgz#ae6005c539dfbcb5cd71fb51bfc8a52ba63bc37a" + integrity sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw== + dependencies: + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" + "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -519,11 +685,25 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.8", "@babel/parser@^7.18.6", "@babel/parser@^7.18.9": +"@babel/highlight@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" + integrity sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ== + dependencies: + "@babel/helper-validator-identifier" "^7.22.5" + chalk "^2.4.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.6", "@babel/parser@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539" integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg== +"@babel/parser@^7.14.0", "@babel/parser@^7.16.8", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55" + integrity sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ== + "@babel/parser@^7.20.13", "@babel/parser@^7.20.7": version "7.20.15" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.15.tgz#eec9f36d8eaf0948bb88c87a46784b5ee9fd0c89" @@ -633,18 +813,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz#f9434f6beb2c8cae9dfcf97d2a5941bbbf9ad4e7" - integrity sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q== - dependencies: - "@babel/compat-data" "^7.18.8" - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.18.8" - -"@babel/plugin-proposal-object-rest-spread@^7.20.2": +"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.20.2": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== @@ -740,14 +909,21 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.18.6": +"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.22.5.tgz#163b820b9e7696ce134df3ee716d9c0c98035859" + integrity sha512-9RdCl0i+q0QExayk2nOS7853w08yLucnnPML6EN9S8fgMPVtdLDCdx/cOQ/i44Lb9UeQX9A35yaqBBOMMZxPxQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-flow@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz#774d825256f2379d06139be0c723c4dd444f3ca1" integrity sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A== dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-syntax-import-assertions@7.20.0", "@babel/plugin-syntax-import-assertions@^7.20.0": +"@babel/plugin-syntax-import-assertions@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== @@ -768,7 +944,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.12.1", "@babel/plugin-syntax-jsx@^7.18.6", "@babel/plugin-syntax-jsx@^7.7.2": +"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918" + integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-jsx@^7.12.1", "@babel/plugin-syntax-jsx@^7.18.6", "@babel/plugin-syntax-jsx@^7.7.2": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== @@ -839,11 +1022,11 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz#19063fcf8771ec7b31d742339dac62433d0611fe" - integrity sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ== + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz#e5ba566d0c58a5b2ba2a8b795450641950b71958" + integrity sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-arrow-functions@^7.18.6": version "7.20.7" @@ -861,7 +1044,14 @@ "@babel/helper-plugin-utils" "^7.20.2" "@babel/helper-remap-async-to-generator" "^7.18.9" -"@babel/plugin-transform-block-scoped-functions@^7.0.0", "@babel/plugin-transform-block-scoped-functions@^7.18.6": +"@babel/plugin-transform-block-scoped-functions@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz#27978075bfaeb9fa586d3cb63a3d30c1de580024" + integrity sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-block-scoped-functions@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== @@ -869,11 +1059,11 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-block-scoping@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.9.tgz#f9b7e018ac3f373c81452d6ada8bd5a18928926d" - integrity sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw== + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.10.tgz#88a1dccc3383899eb5e660534a76a22ecee64faa" + integrity sha512-1+kVpGAOOI1Albt6Vse7c8pHzcZQdQKW+wJH+g8mCaszOdDVwRXa/slHPqIw+oJAJANTKDMuM2cBdV0Dg618Vg== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-block-scoping@^7.20.2": version "7.20.15" @@ -883,17 +1073,18 @@ "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-classes@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.9.tgz#90818efc5b9746879b869d5ce83eb2aa48bbc3da" - integrity sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/helper-replace-supers" "^7.18.9" - "@babel/helper-split-export-declaration" "^7.18.6" + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.6.tgz#e04d7d804ed5b8501311293d1a0e6d43e94c3363" + integrity sha512-58EgM6nuPNG6Py4Z3zSuu0xWu2VfodiMi72Jt5Kj2FECmaYk1RrTXA45z6KBFsu9tRgwQDwIiY4FXTt+YsSFAQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-function-name" "^7.22.5" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" globals "^11.1.0" "@babel/plugin-transform-classes@^7.20.2": @@ -912,11 +1103,12 @@ globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz#2357a8224d402dad623caf6259b611e56aec746e" - integrity sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw== + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz#cd1e994bf9f316bd1c2dafcd02063ec261bb3869" + integrity sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/template" "^7.22.5" "@babel/plugin-transform-computed-properties@^7.18.9": version "7.20.7" @@ -927,11 +1119,11 @@ "@babel/template" "^7.20.7" "@babel/plugin-transform-destructuring@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.9.tgz#68906549c021cb231bee1db21d3b5b095f8ee292" - integrity sha512-p5VCYNddPLkZTq4XymQIaIfZNJwT9YsjkPOhkVEqt6QIpQFZVM9IltqqYpOEkJoN1DPznmxUDyZ5CTZs/ZCuHA== + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.10.tgz#38e2273814a58c810b6c34ea293be4973c4eb5e2" + integrity sha512-dPJrL0VOyxqLM9sritNbMSGx/teueHF/htMKrPT7DNxccXxRDPYqlgPFFdr8u+F+qUZOkZoXue/6rL5O5GduEw== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-destructuring@^7.20.2": version "7.20.7" @@ -964,12 +1156,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.18.9.tgz#5b4cc521426263b5ce08893a2db41097ceba35bf" - integrity sha512-+G6rp2zRuOAInY5wcggsx4+QVao1qPM0osC9fTUVlAV3zOrzTCnrMAFVnR6+a3T8wz1wFIH7KhYMcMB3u1n80A== + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.22.5.tgz#0bb17110c7bf5b35a60754b2f00c58302381dee2" + integrity sha512-tujNbZdxdG0/54g/oua8ISToaXTFBf8EnSb5PgQSciIXWOWKX3S4+JR7ZE9ol8FZwf9kxitzkGQ+QWeov/mCiA== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-flow" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-flow" "^7.22.5" "@babel/plugin-transform-flow-strip-types@^7.12.10", "@babel/plugin-transform-flow-strip-types@^7.18.6": version "7.21.0" @@ -979,14 +1171,30 @@ "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-flow" "^7.18.6" -"@babel/plugin-transform-for-of@^7.0.0", "@babel/plugin-transform-for-of@^7.18.8": +"@babel/plugin-transform-for-of@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz#ab1b8a200a8f990137aff9a084f8de4099ab173f" + integrity sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-for-of@^7.18.8": version "7.18.8" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-function-name@^7.0.0", "@babel/plugin-transform-function-name@^7.18.9": +"@babel/plugin-transform-function-name@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz#935189af68b01898e0d6d99658db6b164205c143" + integrity sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg== + dependencies: + "@babel/helper-compilation-targets" "^7.22.5" + "@babel/helper-function-name" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-function-name@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== @@ -995,14 +1203,28 @@ "@babel/helper-function-name" "^7.18.9" "@babel/helper-plugin-utils" "^7.18.9" -"@babel/plugin-transform-literals@^7.0.0", "@babel/plugin-transform-literals@^7.18.9": +"@babel/plugin-transform-literals@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz#e9341f4b5a167952576e23db8d435849b1dd7920" + integrity sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-literals@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== dependencies: "@babel/helper-plugin-utils" "^7.18.9" -"@babel/plugin-transform-member-expression-literals@^7.0.0", "@babel/plugin-transform-member-expression-literals@^7.18.6": +"@babel/plugin-transform-member-expression-literals@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz#4fcc9050eded981a468347dd374539ed3e058def" + integrity sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-member-expression-literals@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== @@ -1018,14 +1240,13 @@ "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-modules-commonjs@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" - integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz#7d9875908d19b8c0536085af7b053fd5bd651bfa" + integrity sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA== dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-simple-access" "^7.18.6" - babel-plugin-dynamic-import-node "^2.3.3" + "@babel/helper-module-transforms" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-simple-access" "^7.22.5" "@babel/plugin-transform-modules-commonjs@^7.19.6": version "7.20.11" @@ -1069,7 +1290,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-object-super@^7.0.0", "@babel/plugin-transform-object-super@^7.18.6": +"@babel/plugin-transform-object-super@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz#794a8d2fcb5d0835af722173c1a9d704f44e218c" + integrity sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.5" + +"@babel/plugin-transform-object-super@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== @@ -1077,12 +1306,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/helper-replace-supers" "^7.18.6" -"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz#ee9f1a0ce6d78af58d0956a9378ea3427cccb48a" - integrity sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg== +"@babel/plugin-transform-parameters@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz#c3542dd3c39b42c8069936e48717a8d179d63a18" + integrity sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": version "7.20.7" @@ -1091,14 +1320,28 @@ dependencies: "@babel/helper-plugin-utils" "^7.20.2" -"@babel/plugin-transform-property-literals@^7.0.0", "@babel/plugin-transform-property-literals@^7.18.6": +"@babel/plugin-transform-property-literals@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz#b5ddabd73a4f7f26cd0e20f5db48290b88732766" + integrity sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-property-literals@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-react-display-name@^7.0.0", "@babel/plugin-transform-react-display-name@^7.18.6": +"@babel/plugin-transform-react-display-name@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.22.5.tgz#3c4326f9fce31c7968d6cb9debcaf32d9e279a2b" + integrity sha512-PVk3WPYudRF5z4GKMEYUrLjPl38fJSKNaEOkFuoprioowGuWN6w2RKznuFNSlJx7pzzXXStPUnNSOEO0jL5EVw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-react-display-name@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz#8b1125f919ef36ebdfff061d664e266c666b9415" integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== @@ -1113,15 +1356,15 @@ "@babel/plugin-transform-react-jsx" "^7.18.6" "@babel/plugin-transform-react-jsx@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.6.tgz#2721e96d31df96e3b7ad48ff446995d26bc028ff" - integrity sha512-Mz7xMPxoy9kPS/JScj6fJs03TZ/fZ1dJPlMjRAgTaxaS0fUBk8FV/A2rRgfPsVCZqALNwMexD+0Uaf5zlcKPpw== + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.22.5.tgz#932c291eb6dd1153359e2a90cb5e557dcf068416" + integrity sha512-rog5gZaVbUip5iWDMTYbVM15XQq+RkUKhET/IHR6oizR+JEoN6CAfTTuHcK4vwUyzca30qqHqEpzBOnaRMWYMA== dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-jsx" "^7.18.6" - "@babel/types" "^7.18.6" + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-module-imports" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-jsx" "^7.22.5" + "@babel/types" "^7.22.5" "@babel/plugin-transform-react-jsx@^7.12.11", "@babel/plugin-transform-react-jsx@^7.18.6": version "7.21.0" @@ -1157,7 +1400,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-shorthand-properties@^7.0.0", "@babel/plugin-transform-shorthand-properties@^7.18.6": +"@babel/plugin-transform-shorthand-properties@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz#6e277654be82b5559fc4b9f58088507c24f0c624" + integrity sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-shorthand-properties@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== @@ -1165,12 +1415,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-spread@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.9.tgz#6ea7a6297740f381c540ac56caf75b05b74fb664" - integrity sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA== + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz#6487fd29f229c95e284ba6c98d65eafb893fea6b" + integrity sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" "@babel/plugin-transform-spread@^7.19.0": version "7.20.7" @@ -1187,7 +1437,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-template-literals@^7.0.0", "@babel/plugin-transform-template-literals@^7.18.9": +"@babel/plugin-transform-template-literals@^7.0.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz#8f38cf291e5f7a8e60e9f733193f0bcc10909bff" + integrity sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-template-literals@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== @@ -1353,11 +1610,11 @@ integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== "@babel/runtime@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" - integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682" + integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ== dependencies: - regenerator-runtime "^0.13.4" + regenerator-runtime "^0.14.0" "@babel/runtime@^7.12.5": version "7.21.0" @@ -1391,7 +1648,32 @@ "@babel/parser" "^7.18.6" "@babel/types" "^7.18.6" -"@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2": +"@babel/template@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" + integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== + dependencies: + "@babel/code-frame" "^7.22.5" + "@babel/parser" "^7.22.5" + "@babel/types" "^7.22.5" + +"@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.10.tgz#20252acb240e746d27c2e82b4484f199cf8141aa" + integrity sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig== + dependencies: + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-function-name" "^7.22.5" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.22.10" + "@babel/types" "^7.22.10" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.9.tgz#deeff3e8f1bad9786874cb2feda7a2d77a904f98" integrity sha512-LcPAnujXGwBgv3/WHv01pHtb2tihcyW1XuL9wd7jqh1Z8AQkTd+QVjMrMijrln0T7ED3UXLIy36P9Ao7W75rYg== @@ -1439,7 +1721,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3": +"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.9.tgz#7148d64ba133d8d73a41b3172ac4b83a1452205f" integrity sha512-WwMLAg2MvJmt/rKEVQBBhIVffMmnilX4oe0sRe7iPOHIGsqpruFHHdrfj4O1CMMtgMtCU4oPafZjDPCRgO57Wg== @@ -1447,7 +1729,16 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" -"@babel/types@^7.18.13", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.4.4": +"@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.22.10", "@babel/types@^7.22.5": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03" + integrity sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.5" + to-fast-properties "^2.0.0" + +"@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.4.4": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f" integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== @@ -1881,48 +2172,48 @@ yargs "^17.0.0" "@graphql-codegen/core@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/core/-/core-3.0.0.tgz#ff6d643bb9d80c54ddd9ee5c68194888c971ae45" - integrity sha512-WUfAUTmUcgeHPR7F5ZQqaBqJLJb5+3Lvp6v9SrnupKOFed+Q3u8CvZL6sPTvDpqqW8Ucjy59DEZqumPLp99pdQ== + version "3.1.0" + resolved "https://registry.yarnpkg.com/@graphql-codegen/core/-/core-3.1.0.tgz#ad859d52d509a4eb2ebe5aabba6543a628fb181b" + integrity sha512-DH1/yaR7oJE6/B+c6ZF2Tbdh7LixF1K8L+8BoSubjNyQ8pNwR4a70mvc1sv6H7qgp6y1bPQ9tKE+aazRRshysw== dependencies: - "@graphql-codegen/plugin-helpers" "^4.0.0" + "@graphql-codegen/plugin-helpers" "^4.1.0" "@graphql-tools/schema" "^9.0.0" "@graphql-tools/utils" "^9.1.1" - tslib "~2.4.0" + tslib "~2.5.0" -"@graphql-codegen/plugin-helpers@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-4.0.0.tgz#9c10e4700dc6efe657781dff47347d0c99674061" - integrity sha512-vgNGTanT36hC4RAC/LAThMEjDvnu3WCyx6MtKZcPUtfCWFxbUAr88+OarGl1LAEiOef0agIREC7tIBXCqjKkJA== +"@graphql-codegen/plugin-helpers@^4.0.0", "@graphql-codegen/plugin-helpers@^4.1.0", "@graphql-codegen/plugin-helpers@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-4.2.0.tgz#8324914d0f99162a223cfa01796cdd6be972d2ae" + integrity sha512-THFTCfg+46PXlXobYJ/OoCX6pzjI+9woQqCjdyKtgoI0tn3Xq2HUUCiidndxUpEYVrXb5pRiRXb7b/ZbMQqD0A== dependencies: "@graphql-tools/utils" "^9.0.0" change-case-all "1.0.15" common-tags "1.8.2" import-from "4.0.0" lodash "~4.17.0" - tslib "~2.4.0" + tslib "~2.5.0" -"@graphql-codegen/schema-ast@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/schema-ast/-/schema-ast-3.0.0.tgz#3311a58184f885853d33d8272c527ff5bdf3023b" - integrity sha512-5gC8nNk/bxufS2LBSpaPExRgn6eNo8LQdtwDtwfM9XGEzt/F6rIBQoyOmqqwkiBmgu1PHHH8kLZMBYvYB1x5DA== +"@graphql-codegen/schema-ast@^3.0.0", "@graphql-codegen/schema-ast@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@graphql-codegen/schema-ast/-/schema-ast-3.0.1.tgz#37b458bb57b95715a9eb4259341c856dae2a461d" + integrity sha512-rTKTi4XiW4QFZnrEqetpiYEWVsOFNoiR/v3rY9mFSttXFbIwNXPme32EspTiGWmEEdHY8UuTDtZN3vEcs/31zw== dependencies: - "@graphql-codegen/plugin-helpers" "^4.0.0" + "@graphql-codegen/plugin-helpers" "^4.1.0" "@graphql-tools/utils" "^9.0.0" - tslib "~2.4.0" + tslib "~2.5.0" "@graphql-codegen/typescript-operations@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-operations/-/typescript-operations-3.0.0.tgz#e67c9dedb739a20f8a1d2c9a9631701c269de0c1" - integrity sha512-t+Lk+lxkUFDh6F0t8CErowOccP3bZwxhl66qmEeBcOrC7jQrSCnRZoFvOXhFKFBJe/y4DIJiizgSr34AqjiJIQ== + version "3.0.4" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-operations/-/typescript-operations-3.0.4.tgz#60163c07f0ef73655779ece450d02c1172c44027" + integrity sha512-6yE2OL2+WJ1vd5MwFEGXpaxsFGzjAGUytPVHDML3Bi3TwP1F3lnQlIko4untwvHW0JhZEGQ7Ck30H9HjcxpdKA== dependencies: - "@graphql-codegen/plugin-helpers" "^4.0.0" - "@graphql-codegen/typescript" "^3.0.0" - "@graphql-codegen/visitor-plugin-common" "3.0.0" + "@graphql-codegen/plugin-helpers" "^4.2.0" + "@graphql-codegen/typescript" "^3.0.4" + "@graphql-codegen/visitor-plugin-common" "3.1.1" auto-bind "~4.0.0" - tslib "~2.4.0" + tslib "~2.5.0" -"@graphql-codegen/typescript@3.0.0", "@graphql-codegen/typescript@^3.0.0": +"@graphql-codegen/typescript@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript/-/typescript-3.0.0.tgz#473dde1646540039bca5db4b6daf174d13af0ce3" integrity sha512-FQWyuIUy1y+fxb9+EZfvdBHBQpYExlIBHV5sg2WGNCsyVyCqBTl0mO8icyOtsQPVg6YFMFe8JJO69vQbwHma5w== @@ -1933,6 +2224,17 @@ auto-bind "~4.0.0" tslib "~2.4.0" +"@graphql-codegen/typescript@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript/-/typescript-3.0.4.tgz#e12dc106a2722ebc7d18556980ccf47fa9d0805f" + integrity sha512-x4O47447DZrWNtE/l5CU9QzzW4m1RbmCEdijlA3s2flG/y1Ckqdemob4CWfilSm5/tZ3w1junVDY616RDTSvZw== + dependencies: + "@graphql-codegen/plugin-helpers" "^4.2.0" + "@graphql-codegen/schema-ast" "^3.0.1" + "@graphql-codegen/visitor-plugin-common" "3.1.1" + auto-bind "~4.0.0" + tslib "~2.5.0" + "@graphql-codegen/visitor-plugin-common@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-3.0.0.tgz#527185eb3b1b06739702084bc6263713e167a166" @@ -1949,361 +2251,270 @@ parse-filepath "^1.0.2" tslib "~2.4.0" +"@graphql-codegen/visitor-plugin-common@3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-3.1.1.tgz#50c2aa3c537a805ce68d2f115d0a9811b151428c" + integrity sha512-uAfp+zu/009R3HUAuTK2AamR1bxIltM6rrYYI6EXSmkM3rFtFsLTuJhjUDj98HcUCszJZrADppz8KKLGRUVlNg== + dependencies: + "@graphql-codegen/plugin-helpers" "^4.2.0" + "@graphql-tools/optimize" "^1.3.0" + "@graphql-tools/relay-operation-optimizer" "^6.5.0" + "@graphql-tools/utils" "^9.0.0" + auto-bind "~4.0.0" + change-case-all "1.0.15" + dependency-graph "^0.11.0" + graphql-tag "^2.11.0" + parse-filepath "^1.0.2" + tslib "~2.5.0" + "@graphql-tools/apollo-engine-loader@^7.3.6": - version "7.3.25" - resolved "https://registry.yarnpkg.com/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-7.3.25.tgz#f791a3909e612cc246e0a8385bac5dc563247862" - integrity sha512-n5iX1rnu84QrfdrFOTP1YGXEL/zIN499hYllnCaOsd4Hj6IcPcH28+V6odbc6yn9NvOpy9pQ8vyPi3mrCFS6EA== + version "7.3.26" + resolved "https://registry.yarnpkg.com/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-7.3.26.tgz#91e54460d5579933e42a2010b8688c3459c245d8" + integrity sha512-h1vfhdJFjnCYn9b5EY1Z91JTF0KB3hHVJNQIsiUV2mpQXZdeOXQoaWeYEKaiI5R6kwBw5PP9B0fv3jfUIG8LyQ== dependencies: "@ardatan/sync-fetch" "^0.0.1" "@graphql-tools/utils" "^9.2.1" - "@whatwg-node/fetch" "^0.7.0" + "@whatwg-node/fetch" "^0.8.0" tslib "^2.4.0" -"@graphql-tools/batch-execute@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-8.5.0.tgz#2767a9abf4e2712871a69360a27ef13ada1c019e" - integrity sha512-S9/76X4uYIbVlJyRzXhCBbTJvVD0VvaWNqGiKgkITxlq4aBsTOHVuE84OSi3E1QKP3PTiJYrgMIn220iFOkyQw== +"@graphql-tools/batch-execute@^8.5.22": + version "8.5.22" + resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-8.5.22.tgz#a742aa9d138fe794e786d8fb6429665dc7df5455" + integrity sha512-hcV1JaY6NJQFQEwCKrYhpfLK8frSXDbtNMoTur98u10Cmecy1zrqNKSqhEyGetpgHxaJRqszGzKeI3RuroDN6A== dependencies: - "@graphql-tools/utils" "8.8.0" - dataloader "2.1.0" - tslib "^2.4.0" - value-or-promise "1.0.11" - -"@graphql-tools/batch-execute@8.5.17": - version "8.5.17" - resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-8.5.17.tgz#1d3294becfd2c3c6bddfe56ff3507ce89ca236a2" - integrity sha512-ma6zlFIBG8VuqSwE8jhYhMbaFsJ1YdVsnpFmbQ0O/qJTmlgdAWCyAZTJH0aZ24fqNFfj/vW/Qtpqn7gRcF8QOw== - dependencies: - "@graphql-tools/utils" "9.2.1" - dataloader "2.2.1" + "@graphql-tools/utils" "^9.2.1" + dataloader "^2.2.2" tslib "^2.4.0" - value-or-promise "1.0.12" + value-or-promise "^1.0.12" "@graphql-tools/code-file-loader@^7.3.17": - version "7.3.20" - resolved "https://registry.yarnpkg.com/@graphql-tools/code-file-loader/-/code-file-loader-7.3.20.tgz#6f523bcb5b5bcdbcede4b5894cbcb1890132b002" - integrity sha512-htwylU+/if5j5rgrd/i2xgM22cWC2RGgUGO7K+nxZU+l7iCimJUdDQnqCW9G3eVHbLpVOhyza9bBUNMPzh3sxg== + version "7.3.23" + resolved "https://registry.yarnpkg.com/@graphql-tools/code-file-loader/-/code-file-loader-7.3.23.tgz#33793f9a1f8e74981f8ae6ec4ab7061f9713db15" + integrity sha512-8Wt1rTtyTEs0p47uzsPJ1vAtfAx0jmxPifiNdmo9EOCuUPyQGEbMaik/YkqZ7QUFIEYEQu+Vgfo8tElwOPtx5Q== dependencies: - "@graphql-tools/graphql-tag-pluck" "7.4.6" - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/graphql-tag-pluck" "7.5.2" + "@graphql-tools/utils" "^9.2.1" globby "^11.0.3" tslib "^2.4.0" unixify "^1.0.0" -"@graphql-tools/delegate@8.8.0": - version "8.8.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-8.8.0.tgz#acd3e48e4ca82aace92cc3d920b5c727c35eaf7b" - integrity sha512-dbhfOI8rQXPcowXrbwHLOBY9oGi7qxtlrXF4RuRXmjqGTs2AgogdOE3Ep1+6wFD7qYTuFmHXZ8Cl0PmhoZUgrg== +"@graphql-tools/delegate@^9.0.31": + version "9.0.35" + resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-9.0.35.tgz#94683f4bcec63520b4a6c8b2abf2e2e9324ea4f1" + integrity sha512-jwPu8NJbzRRMqi4Vp/5QX1vIUeUPpWmlQpOkXQD2r1X45YsVceyUUBnktCrlJlDB4jPRVy7JQGwmYo3KFiOBMA== dependencies: - "@graphql-tools/batch-execute" "8.5.0" - "@graphql-tools/schema" "8.5.0" - "@graphql-tools/utils" "8.8.0" - dataloader "2.1.0" - tslib "~2.4.0" - value-or-promise "1.0.11" - -"@graphql-tools/delegate@9.0.26", "@graphql-tools/delegate@^9.0.26": - version "9.0.26" - resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-9.0.26.tgz#b931607bf11db26da307d12cc2a97eec82a677f1" - integrity sha512-RPcjH+NnK3e4e9/6CwKbyv9DtVa+ojiwvsbW9Q6zMXRdlP0zazsQOe5+ktL3yE+d3zlzGAasp0WAiSLUS5vFRw== - dependencies: - "@graphql-tools/batch-execute" "8.5.17" - "@graphql-tools/executor" "0.0.14" - "@graphql-tools/schema" "9.0.16" - "@graphql-tools/utils" "9.2.1" - dataloader "2.2.1" - tslib "~2.5.0" - value-or-promise "1.0.12" + "@graphql-tools/batch-execute" "^8.5.22" + "@graphql-tools/executor" "^0.0.20" + "@graphql-tools/schema" "^9.0.19" + "@graphql-tools/utils" "^9.2.1" + dataloader "^2.2.2" + tslib "^2.5.0" + value-or-promise "^1.0.12" -"@graphql-tools/executor-graphql-ws@^0.0.10": - version "0.0.10" - resolved "https://registry.yarnpkg.com/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-0.0.10.tgz#c4775ac3730a0017392373f84aa21bfc4de4495b" - integrity sha512-5SxFvupyWe6+Egq8Zws0+mJZMKV18rTAwxHwhrx+KhRfGpilqkqS4I+qwVL94LNktWL2uy95cU5b5CQFyVaVEg== +"@graphql-tools/executor-graphql-ws@^0.0.14": + version "0.0.14" + resolved "https://registry.yarnpkg.com/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-0.0.14.tgz#e0f53fc4cfc8a06cc461b2bc1edb4bb9a8e837ed" + integrity sha512-P2nlkAsPZKLIXImFhj0YTtny5NQVGSsKnhi7PzXiaHSXc6KkzqbWZHKvikD4PObanqg+7IO58rKFpGXP7eeO+w== dependencies: - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/utils" "^9.2.1" "@repeaterjs/repeater" "3.0.4" "@types/ws" "^8.0.0" - graphql-ws "5.11.3" + graphql-ws "5.12.1" isomorphic-ws "5.0.0" tslib "^2.4.0" - ws "8.12.0" + ws "8.13.0" -"@graphql-tools/executor-http@^0.1.6": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@graphql-tools/executor-http/-/executor-http-0.1.6.tgz#074e26a448c0a9d48a75e07388c5b53b263a0ef6" - integrity sha512-OPE730n7T8nMgQFujbDuclCJrEchaVKZ4G5rl8r8fY/a/clKtZDZONTPnVSgW3/cBJ/WIXJGDvJtXwx6F8Fepg== +"@graphql-tools/executor-http@^0.1.7", "@graphql-tools/executor-http@^0.1.9": + version "0.1.10" + resolved "https://registry.yarnpkg.com/@graphql-tools/executor-http/-/executor-http-0.1.10.tgz#faf48e18e62a925796c9653c2f50cf2095bc8e6f" + integrity sha512-hnAfbKv0/lb9s31LhWzawQ5hghBfHS+gYWtqxME6Rl0Aufq9GltiiLBcl7OVVOnkLF0KhwgbYP1mB5VKmgTGpg== dependencies: "@graphql-tools/utils" "^9.2.1" "@repeaterjs/repeater" "^3.0.4" - "@whatwg-node/fetch" "^0.7.0" + "@whatwg-node/fetch" "^0.8.1" dset "^3.1.2" extract-files "^11.0.0" meros "^1.2.1" tslib "^2.4.0" value-or-promise "^1.0.12" -"@graphql-tools/executor-legacy-ws@^0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-0.0.8.tgz#3387f50eafacfb05ac578baf46c0ea0fe059494e" - integrity sha512-NZfBijmr774rCO60cRTqbf2otRjn32sVikq6PdT+0vZfhVwX7wydNMdyfJZQ3WGuTyab5hrqOWD+UU8VcIbAeg== +"@graphql-tools/executor-legacy-ws@^0.0.11": + version "0.0.11" + resolved "https://registry.yarnpkg.com/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-0.0.11.tgz#a1e12be8279e92a363a23d4105461a34cd9e389e" + integrity sha512-4ai+NnxlNfvIQ4c70hWFvOZlSUN8lt7yc+ZsrwtNFbFPH/EroIzFMapAxM9zwyv9bH38AdO3TQxZ5zNxgBdvUw== dependencies: - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/utils" "^9.2.1" "@types/ws" "^8.0.0" isomorphic-ws "5.0.0" tslib "^2.4.0" - ws "8.12.0" + ws "8.13.0" -"@graphql-tools/executor@0.0.14": - version "0.0.14" - resolved "https://registry.yarnpkg.com/@graphql-tools/executor/-/executor-0.0.14.tgz#7c6073d75c77dd6e7fab0c835761ed09c85a3bc6" - integrity sha512-YiBbN9NT0FgqPJ35+Eg0ty1s5scOZTgiPf+6hLVJBd5zHEURwojEMCTKJ9e0RNZHETp2lN+YaTFGTSoRk0t4Sw== +"@graphql-tools/executor@^0.0.20": + version "0.0.20" + resolved "https://registry.yarnpkg.com/@graphql-tools/executor/-/executor-0.0.20.tgz#d51d159696e839522dd49d936636af251670e425" + integrity sha512-GdvNc4vszmfeGvUqlcaH1FjBoguvMYzxAfT6tDd4/LgwymepHhinqLNA5otqwVLW+JETcDaK7xGENzFomuE6TA== dependencies: - "@graphql-tools/utils" "9.2.1" - "@graphql-typed-document-node/core" "3.1.1" - "@repeaterjs/repeater" "3.0.4" + "@graphql-tools/utils" "^9.2.1" + "@graphql-typed-document-node/core" "3.2.0" + "@repeaterjs/repeater" "^3.0.4" tslib "^2.4.0" - value-or-promise "1.0.12" + value-or-promise "^1.0.12" "@graphql-tools/git-loader@^7.2.13": - version "7.2.19" - resolved "https://registry.yarnpkg.com/@graphql-tools/git-loader/-/git-loader-7.2.19.tgz#42b12ef34b9e848d885a0ba22d987d798755aacc" - integrity sha512-F94PqVdBXbOETg7x081rJec+2egi/4TgXQWlvHdQ8jjrNd+C/EU+Dxq0ccmfnhUKdcVyKJpMpLUIUyY7uwX6gw== + version "7.3.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/git-loader/-/git-loader-7.3.0.tgz#ca10c17d4f58c4592432d9d2ac1c2b393aebad16" + integrity sha512-gcGAK+u16eHkwsMYqqghZbmDquh8QaO24Scsxq+cVR+vx1ekRlsEiXvu+yXVDbZdcJ6PBIbeLcQbEu+xhDLmvQ== dependencies: - "@graphql-tools/graphql-tag-pluck" "7.4.6" - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/graphql-tag-pluck" "7.5.2" + "@graphql-tools/utils" "^9.2.1" is-glob "4.0.3" micromatch "^4.0.4" tslib "^2.4.0" unixify "^1.0.0" "@graphql-tools/github-loader@^7.3.20": - version "7.3.26" - resolved "https://registry.yarnpkg.com/@graphql-tools/github-loader/-/github-loader-7.3.26.tgz#3fcddb05d26d4ebdeb4de5a3d5c5dcec49bc89b9" - integrity sha512-fly5zI4H+2nQfpj3OENVq95cS/5qJZsBWy9zgTT6WucRmdzvxodhXh4Q4tkznCR0mWdROze/2/vb6tgkcddQ6Q== + version "7.3.28" + resolved "https://registry.yarnpkg.com/@graphql-tools/github-loader/-/github-loader-7.3.28.tgz#a7166b136e8442bd8b3ab943ad3b66c84bcabfcf" + integrity sha512-OK92Lf9pmxPQvjUNv05b3tnVhw0JRfPqOf15jZjyQ8BfdEUrJoP32b4dRQQem/wyRL24KY4wOfArJNqzpsbwCA== dependencies: "@ardatan/sync-fetch" "^0.0.1" + "@graphql-tools/executor-http" "^0.1.9" "@graphql-tools/graphql-tag-pluck" "^7.4.6" "@graphql-tools/utils" "^9.2.1" - "@whatwg-node/fetch" "^0.7.0" - tslib "^2.4.0" - -"@graphql-tools/graphql-file-loader@^7.3.7": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.4.0.tgz#c06e36248dd6a2025de65a1cfce03222ad0e74c2" - integrity sha512-r1lslE5GlWO/nbDX82enHjvva7qQiZEIPm+LC9JSgKaYuVoYHuIuIAVYkpBHeaRK1Kbh/86pEhL7PuBZ/cIWSA== - dependencies: - "@graphql-tools/import" "6.7.0" - "@graphql-tools/utils" "8.8.0" - globby "^11.0.3" + "@whatwg-node/fetch" "^0.8.0" tslib "^2.4.0" - unixify "^1.0.0" + value-or-promise "^1.0.12" -"@graphql-tools/graphql-file-loader@^7.5.0": - version "7.5.16" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.5.16.tgz#d954b25ee14c6421ddcef43f4320a82e9800cb23" - integrity sha512-lK1N3Y2I634FS12nd4bu7oAJbai3bUc28yeX+boT+C83KTO4ujGHm+6hPC8X/FRGwhKOnZBxUM7I5nvb3HiUxw== +"@graphql-tools/graphql-file-loader@^7.3.7", "@graphql-tools/graphql-file-loader@^7.5.0": + version "7.5.17" + resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.5.17.tgz#7c281617ea3ab4db4d42a2bdb49850f2b937f0f9" + integrity sha512-hVwwxPf41zOYgm4gdaZILCYnKB9Zap7Ys9OhY1hbwuAuC4MMNY9GpUjoTU3CQc3zUiPoYStyRtUGkHSJZ3HxBw== dependencies: - "@graphql-tools/import" "6.7.17" - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/import" "6.7.18" + "@graphql-tools/utils" "^9.2.1" globby "^11.0.3" tslib "^2.4.0" unixify "^1.0.0" -"@graphql-tools/graphql-tag-pluck@7.4.6", "@graphql-tools/graphql-tag-pluck@^7.4.6": - version "7.4.6" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-7.4.6.tgz#57fe6f37d0c7c5f8bf3dfbec58f70ec693e70b0a" - integrity sha512-KPlkrC+WtJAg/Sv93rPiDHZDsgQDIZEy9ViHqz80KdRvq0aeQN9TGp26mQCyD7zo1Ib2paT16IVwTNQf02yxpQ== +"@graphql-tools/graphql-tag-pluck@7.5.2", "@graphql-tools/graphql-tag-pluck@^7.4.6": + version "7.5.2" + resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-7.5.2.tgz#502f1e066e19d832ebdeba5f571d7636dc27572d" + integrity sha512-RW+H8FqOOLQw0BPXaahYepVSRjuOHw+7IL8Opaa5G5uYGOBxoXR7DceyQ7BcpMgktAOOmpDNQ2WtcboChOJSRA== dependencies: "@babel/parser" "^7.16.8" - "@babel/plugin-syntax-import-assertions" "7.20.0" + "@babel/plugin-syntax-import-assertions" "^7.20.0" "@babel/traverse" "^7.16.8" "@babel/types" "^7.16.8" - "@graphql-tools/utils" "9.2.1" - tslib "^2.4.0" - -"@graphql-tools/import@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.7.0.tgz#5174c46b73f5931e68b9715fec9178bc924d2bba" - integrity sha512-u9JL4fClKKyBTQpgb4QFacYUwgBCs4lW1NaHX0hD2zBdahIYidokBY0QkOqOCEAnWeFqpEmAjB62ulLiAJWc2g== - dependencies: - "@graphql-tools/utils" "8.8.0" - resolve-from "5.0.0" + "@graphql-tools/utils" "^9.2.1" tslib "^2.4.0" -"@graphql-tools/import@6.7.17": - version "6.7.17" - resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.7.17.tgz#ab51ed08bcbf757f952abf3f40793ce3db42d4a3" - integrity sha512-bn9SgrECXq3WIasgNP7ful/uON51wBajPXtxdY+z/ce7jLWaFE6lzwTDB/GAgiZ+jo7nb0ravlxteSAz2qZmuA== +"@graphql-tools/import@6.7.18": + version "6.7.18" + resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.7.18.tgz#ad092d8a4546bb6ffc3e871e499eec7ac368680b" + integrity sha512-XQDdyZTp+FYmT7as3xRWH/x8dx0QZA2WZqfMF5EWb36a0PiH7WwlRQYIdyYXj8YCLpiWkeBXgBRHmMnwEYR8iQ== dependencies: - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/utils" "^9.2.1" resolve-from "5.0.0" tslib "^2.4.0" -"@graphql-tools/json-file-loader@^7.3.7": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-7.4.0.tgz#c25059ebce34db6190a11580e2bc7c66df68a7b9" - integrity sha512-6oR7Ulc5iZc5SM3g1Yj91DqSu3TNbfGK/0baE8KyUlvq6KiIuWFWDy13RGnNesftt4RSWvZqGzu/kzXcBHtt+A== - dependencies: - "@graphql-tools/utils" "8.8.0" - globby "^11.0.3" - tslib "^2.4.0" - unixify "^1.0.0" - -"@graphql-tools/json-file-loader@^7.4.1": - version "7.4.17" - resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-7.4.17.tgz#3f08e74ab1a3534c02dc97875acc7f15aa460011" - integrity sha512-KOSTP43nwjPfXgas90rLHAFgbcSep4nmiYyR9xRVz4ZAmw8VYHcKhOLTSGylCAzi7KUfyBXajoW+6Z7dQwdn3g== +"@graphql-tools/json-file-loader@^7.3.7", "@graphql-tools/json-file-loader@^7.4.1": + version "7.4.18" + resolved "https://registry.yarnpkg.com/@graphql-tools/json-file-loader/-/json-file-loader-7.4.18.tgz#d78ae40979bde51cfc59717757354afc9e35fba2" + integrity sha512-AJ1b6Y1wiVgkwsxT5dELXhIVUPs/u3VZ8/0/oOtpcoyO/vAeM5rOvvWegzicOOnQw8G45fgBRMkkRfeuwVt6+w== dependencies: - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/utils" "^9.2.1" globby "^11.0.3" tslib "^2.4.0" unixify "^1.0.0" -"@graphql-tools/load@^7.5.5": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-7.7.0.tgz#668f70f09bc1c34b87c3267853cf73451897a22e" - integrity sha512-6KX7Z8BtlFScDr0pIac92QZWlPGbHcpNMesX/6Y3Vsp3FeFnAYfzZldXZQcJoW7Yl+gHdFwYVq683wSH64kNrw== +"@graphql-tools/load@^7.5.5", "@graphql-tools/load@^7.8.0": + version "7.8.14" + resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-7.8.14.tgz#f2356f9a5f658a42e33934ae036e4b2cadf2d1e9" + integrity sha512-ASQvP+snHMYm+FhIaLxxFgVdRaM0vrN9wW2BKInQpktwWTXVyk+yP5nQUCEGmn0RTdlPKrffBaigxepkEAJPrg== dependencies: - "@graphql-tools/schema" "8.5.0" - "@graphql-tools/utils" "8.8.0" - p-limit "3.1.0" - tslib "^2.4.0" - -"@graphql-tools/load@^7.8.0": - version "7.8.12" - resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-7.8.12.tgz#6457fe6ec8cd2e2b5ca0d2752464bc937d186cca" - integrity sha512-JwxgNS2c6i6oIdKttcbXns/lpKiyN7c6/MkkrJ9x2QE9rXk5HOhSJxRvPmOueCuAin1542xUrcDRGBXJ7thSig== - dependencies: - "@graphql-tools/schema" "9.0.16" - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/schema" "^9.0.18" + "@graphql-tools/utils" "^9.2.1" p-limit "3.1.0" tslib "^2.4.0" -"@graphql-tools/merge@8.3.0", "@graphql-tools/merge@^8.2.6": - version "8.3.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.3.0.tgz#d3a8ba10942f8598788c3e03f97cc1d0c0b055f8" - integrity sha512-xRa7RAQok/0DD2YnjuqikMrr7dUAxTpdGtZ7BkvUUGhYs3B3p7reCAfvOVr1DJAqVToP7hdlMk+S5+Ylk+AaqA== - dependencies: - "@graphql-tools/utils" "8.8.0" - tslib "^2.4.0" - -"@graphql-tools/merge@8.3.18": - version "8.3.18" - resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.3.18.tgz#bfbb517c68598a885809f16ce5c3bb1ebb8f04a2" - integrity sha512-R8nBglvRWPAyLpZL/f3lxsY7wjnAeE0l056zHhcO/CgpvK76KYUt9oEkR05i8Hmt8DLRycBN0FiotJ0yDQWTVA== +"@graphql-tools/merge@^8.2.6", "@graphql-tools/merge@^8.4.1": + version "8.4.2" + resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.4.2.tgz#95778bbe26b635e8d2f60ce9856b388f11fe8288" + integrity sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw== dependencies: - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/utils" "^9.2.1" tslib "^2.4.0" "@graphql-tools/optimize@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-1.3.0.tgz#11ea27ac73e857d882ccfd7a3a981d8d6fb521e2" - integrity sha512-30QOWJoMJEt1De7tAFtWJ6VPrP6SLq+tSQrA3x+WMvCW3q2exq5wPDpvAXOakVKu0y8L2E+YkipC0hcQPBQdLg== + version "1.4.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-1.4.0.tgz#20d6a9efa185ef8fc4af4fd409963e0907c6e112" + integrity sha512-dJs/2XvZp+wgHH8T5J2TqptT9/6uVzIYvA6uFACha+ufvdMBedkfR4b4GbT8jAKLRARiqRTxy3dctnwkTM2tdw== dependencies: tslib "^2.4.0" "@graphql-tools/prisma-loader@^7.2.49": - version "7.2.62" - resolved "https://registry.yarnpkg.com/@graphql-tools/prisma-loader/-/prisma-loader-7.2.62.tgz#f2864300c6dee51a2446d98cd96b3b1a493ab807" - integrity sha512-b2wxhkOO5+Ogo+uc87VzEoWeZFXD8yznzO3HbdK++fKQMekOBxTS/igH4hKrrstcJ3hk/Qci962OYCwFAa8hhg== + version "7.2.72" + resolved "https://registry.yarnpkg.com/@graphql-tools/prisma-loader/-/prisma-loader-7.2.72.tgz#6304fc23600458396f3ede713d8e2371df7850e3" + integrity sha512-0a7uV7Fky6yDqd0tI9+XMuvgIo6GAqiVzzzFV4OSLry4AwiQlI3igYseBV7ZVOGhedOTqj/URxjpiv07hRcwag== dependencies: - "@graphql-tools/url-loader" "7.17.11" - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/url-loader" "^7.17.18" + "@graphql-tools/utils" "^9.2.1" "@types/js-yaml" "^4.0.0" "@types/json-stable-stringify" "^1.0.32" - "@types/jsonwebtoken" "^9.0.0" + "@whatwg-node/fetch" "^0.8.2" chalk "^4.1.0" debug "^4.3.1" dotenv "^16.0.0" - graphql-request "^5.0.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" - isomorphic-fetch "^3.0.0" + graphql-request "^6.0.0" + http-proxy-agent "^6.0.0" + https-proxy-agent "^6.0.0" + jose "^4.11.4" js-yaml "^4.0.0" json-stable-stringify "^1.0.1" - jsonwebtoken "^9.0.0" lodash "^4.17.20" scuid "^1.1.0" tslib "^2.4.0" yaml-ast-parser "^0.0.43" "@graphql-tools/relay-operation-optimizer@^6.5.0": - version "6.5.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.0.tgz#eb51e45c5fb46d472eb2ebfbbcc9cdc0f2a9913c" - integrity sha512-snqmdPiM2eBex6pijRFx4H9MPumVd8ZWM3y+aaRwzc73VUNnjHE4NyVZEEIdlbmJ2HoQ9Zrm9aFlHVMK7B59zg== + version "6.5.18" + resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.18.tgz#a1b74a8e0a5d0c795b8a4d19629b654cf66aa5ab" + integrity sha512-mc5VPyTeV+LwiM+DNvoDQfPqwQYhPV/cl5jOBjTgSniyaq8/86aODfMkrE2OduhQ5E00hqrkuL2Fdrgk0w1QJg== dependencies: "@ardatan/relay-compiler" "12.0.0" - "@graphql-tools/utils" "8.8.0" - tslib "^2.4.0" - -"@graphql-tools/schema@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-8.5.0.tgz#0332b3a2e674d16e9bf8a58dfd47432449ce2368" - integrity sha512-VeFtKjM3SA9/hCJJfr95aEdC3G0xIKM9z0Qdz4i+eC1g2fdZYnfWFt2ucW4IME+2TDd0enHlKzaV0qk2SLVUww== - dependencies: - "@graphql-tools/merge" "8.3.0" - "@graphql-tools/utils" "8.8.0" + "@graphql-tools/utils" "^9.2.1" tslib "^2.4.0" - value-or-promise "1.0.11" -"@graphql-tools/schema@9.0.16", "@graphql-tools/schema@^9.0.0": - version "9.0.16" - resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-9.0.16.tgz#7d340d69e6094dc01a2b9e625c7bb4fff89ea521" - integrity sha512-kF+tbYPPf/6K2aHG3e1SWIbapDLQaqnIHVRG6ow3onkFoowwtKszvUyOASL6Krcv2x9bIMvd1UkvRf9OaoROQQ== +"@graphql-tools/schema@^9.0.0", "@graphql-tools/schema@^9.0.18", "@graphql-tools/schema@^9.0.19": + version "9.0.19" + resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-9.0.19.tgz#c4ad373b5e1b8a0cf365163435b7d236ebdd06e7" + integrity sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w== dependencies: - "@graphql-tools/merge" "8.3.18" - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/merge" "^8.4.1" + "@graphql-tools/utils" "^9.2.1" tslib "^2.4.0" - value-or-promise "1.0.12" + value-or-promise "^1.0.12" -"@graphql-tools/url-loader@7.17.11", "@graphql-tools/url-loader@^7.13.2": - version "7.17.11" - resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.17.11.tgz#8e356e7e6b710a241e5a33abc3d9d9fed5cd4e2a" - integrity sha512-zGTrdz5hVm/0+vLZJexhB/B4m95ZCP0eqD2QoNP0hsstaqTyn9u84kTtYUpbPlz7hAxZsdu+VcLaypE4qPGGGw== +"@graphql-tools/url-loader@^7.13.2", "@graphql-tools/url-loader@^7.17.18", "@graphql-tools/url-loader@^7.9.7": + version "7.17.18" + resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.17.18.tgz#3e253594d23483e4c0dd3a4c3dd2ad5cd0141192" + integrity sha512-ear0CiyTj04jCVAxi7TvgbnGDIN2HgqzXzwsfcqiVg9cvjT40NcMlZ2P1lZDgqMkZ9oyLTV8Bw6j+SyG6A+xPw== dependencies: "@ardatan/sync-fetch" "^0.0.1" - "@graphql-tools/delegate" "^9.0.26" - "@graphql-tools/executor-graphql-ws" "^0.0.10" - "@graphql-tools/executor-http" "^0.1.6" - "@graphql-tools/executor-legacy-ws" "^0.0.8" + "@graphql-tools/delegate" "^9.0.31" + "@graphql-tools/executor-graphql-ws" "^0.0.14" + "@graphql-tools/executor-http" "^0.1.7" + "@graphql-tools/executor-legacy-ws" "^0.0.11" "@graphql-tools/utils" "^9.2.1" - "@graphql-tools/wrap" "^9.3.5" + "@graphql-tools/wrap" "^9.4.2" "@types/ws" "^8.0.0" - "@whatwg-node/fetch" "^0.7.0" + "@whatwg-node/fetch" "^0.8.0" isomorphic-ws "^5.0.0" tslib "^2.4.0" value-or-promise "^1.0.11" ws "^8.12.0" -"@graphql-tools/url-loader@^7.9.7": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.13.0.tgz#f1523ae782b846b0d06dc8488b622ba8ce9a7f33" - integrity sha512-hM3yIDij0EqrHrLKNRpFRhQD0tmzt7E5OevOL9O3CLKCcv2Ho4wXQD7gscwVJJdg2Qyr22Pqr/IdtR8QiMScRA== - dependencies: - "@graphql-tools/delegate" "8.8.0" - "@graphql-tools/utils" "8.8.0" - "@graphql-tools/wrap" "8.5.0" - "@n1ru4l/graphql-live-query" "^0.9.0" - "@types/ws" "^8.0.0" - "@whatwg-node/fetch" "^0.0.2" - dset "^3.1.2" - extract-files "^11.0.0" - graphql-ws "^5.4.1" - isomorphic-ws "^5.0.0" - meros "^1.1.4" - sync-fetch "^0.4.0" - tslib "^2.4.0" - value-or-promise "^1.0.11" - ws "^8.3.0" - -"@graphql-tools/utils@8.8.0": - version "8.8.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.8.0.tgz#8332ff80a1da9204ccf514750dd6f5c5cccf17dc" - integrity sha512-KJrtx05uSM/cPYFdTnGAS1doL5bftJLAiFCDMZ8Vkifztz3BFn3gpFiy/o4wDtM8s39G46mxmt2Km/RmeltfGw== - dependencies: - tslib "^2.4.0" - -"@graphql-tools/utils@9.2.1", "@graphql-tools/utils@^9.0.0", "@graphql-tools/utils@^9.1.1", "@graphql-tools/utils@^9.2.1": +"@graphql-tools/utils@^9.0.0", "@graphql-tools/utils@^9.1.1", "@graphql-tools/utils@^9.2.1": version "9.2.1" resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-9.2.1.tgz#1b3df0ef166cfa3eae706e3518b17d5922721c57" integrity sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A== @@ -2311,32 +2522,21 @@ "@graphql-typed-document-node/core" "^3.1.1" tslib "^2.4.0" -"@graphql-tools/wrap@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-8.5.0.tgz#ce1b0d775e1fc3a17404df566f4d2196d31c6e20" - integrity sha512-I+x9dBNzC135WWPi04ejqurR/zDmhfeGbCftCaYKF4CvgWd+ZaJx4Uc74n1SBegQtrj+KDrOS4HgKwf9vAVR7A== - dependencies: - "@graphql-tools/delegate" "8.8.0" - "@graphql-tools/schema" "8.5.0" - "@graphql-tools/utils" "8.8.0" - tslib "^2.4.0" - value-or-promise "1.0.11" - -"@graphql-tools/wrap@^9.3.5": - version "9.3.5" - resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-9.3.5.tgz#6c48c0189fecaf5199052b98fd99d7b1c48e8b68" - integrity sha512-D3jR6/ZDWa6bw4hc1odHKLIFLxjgXlL8FSkkNlViAcRgRaqUVgFQsk+dThdWkqKP6+uij4lBG+pd/XZfrI1zeQ== +"@graphql-tools/wrap@^9.4.2": + version "9.4.2" + resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-9.4.2.tgz#30835587c4c73be1780908a7cb077d8013aa2703" + integrity sha512-DFcd9r51lmcEKn0JW43CWkkI2D6T9XI1juW/Yo86i04v43O9w2/k4/nx2XTJv4Yv+iXwUw7Ok81PGltwGJSDSA== dependencies: - "@graphql-tools/delegate" "9.0.26" - "@graphql-tools/schema" "9.0.16" - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/delegate" "^9.0.31" + "@graphql-tools/schema" "^9.0.18" + "@graphql-tools/utils" "^9.2.1" tslib "^2.4.0" - value-or-promise "1.0.12" + value-or-promise "^1.0.12" -"@graphql-typed-document-node/core@3.1.1", "@graphql-typed-document-node/core@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052" - integrity sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg== +"@graphql-typed-document-node/core@3.2.0", "@graphql-typed-document-node/core@^3.1.1", "@graphql-typed-document-node/core@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" + integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== "@humanwhocodes/config-array@^0.11.8": version "0.11.8" @@ -2634,10 +2834,15 @@ resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@n1ru4l/graphql-live-query@^0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@n1ru4l/graphql-live-query/-/graphql-live-query-0.9.0.tgz#defaebdd31f625bee49e6745934f36312532b2bc" - integrity sha512-BTpWy1e+FxN82RnLz4x1+JcEewVdfmUhV1C6/XYD5AjS7PQp9QFF7K8bCD6gzPTr2l+prvqOyVueQhFJxB1vfg== +"@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" + integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== + +"@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -2660,10 +2865,18 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@peculiar/asn1-schema@^2.1.6", "@peculiar/asn1-schema@^2.3.0": - version "2.3.3" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz#21418e1f3819e0b353ceff0c2dad8ccb61acd777" - integrity sha512-6GptMYDMyWBHTUKndHaDsRZUO/XMSgIns2krxcm2L7SEExRHwawFvSwNBhqNPR9HJwv3MruAiF1bhN0we6j6GQ== +"@openzeppelin/merkle-tree@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@openzeppelin/merkle-tree/-/merkle-tree-1.0.5.tgz#4836d377777a7e39f31674f06ec3d6909def7913" + integrity sha512-JkwG2ysdHeIphrScNxYagPy6jZeNONgDRyqU6lbFgE8HKCZFSkcP8r6AjZs+3HZk4uRNV0kNBBzuWhKQ3YV7Kw== + dependencies: + "@ethersproject/abi" "^5.7.0" + ethereum-cryptography "^1.1.2" + +"@peculiar/asn1-schema@^2.3.6": + version "2.3.6" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922" + integrity sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA== dependencies: asn1js "^3.0.5" pvtsutils "^1.3.2" @@ -2677,15 +2890,15 @@ tslib "^2.0.0" "@peculiar/webcrypto@^1.4.0": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.1.tgz#821493bd5ad0f05939bd5f53b28536f68158360a" - integrity sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw== + version "1.4.3" + resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.3.tgz#078b3e8f598e847b78683dc3ba65feb5029b93a7" + integrity sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A== dependencies: - "@peculiar/asn1-schema" "^2.3.0" + "@peculiar/asn1-schema" "^2.3.6" "@peculiar/json-schema" "^1.1.12" pvtsutils "^1.3.2" - tslib "^2.4.1" - webcrypto-core "^1.7.4" + tslib "^2.5.0" + webcrypto-core "^1.7.7" "@repeaterjs/repeater@3.0.4", "@repeaterjs/repeater@^3.0.4": version "3.0.4" @@ -2756,6 +2969,28 @@ estree-walker "^2.0.1" picomatch "^2.2.2" +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + +"@scure/bip32@1.1.5": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" + integrity sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw== + dependencies: + "@noble/hashes" "~1.2.0" + "@noble/secp256k1" "~1.7.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" + integrity sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg== + dependencies: + "@noble/hashes" "~1.2.0" + "@scure/base" "~1.1.0" + "@sinclair/typebox@^0.25.16": version "0.25.21" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.21.tgz#763b05a4b472c93a8db29b2c3e359d55b29ce272" @@ -2785,11 +3020,6 @@ magic-string "^0.25.0" string.prototype.matchall "^4.0.6" -"@tootallnate/once@2": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" - integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== - "@trysound/sax@0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" @@ -2811,9 +3041,17 @@ integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@typechain/ethers-v5@^11.0.0": + version "11.1.1" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-11.1.1.tgz#23a358135a302140cf89a186592464dd6bbf1f98" + integrity sha512-D9WyUrCJ4Z5Gg8T00HWLpuqn1CqSDXlCiUOOpLaWoCbnZrE2jSIOUwR9blBZNo6LE5058e3niVu6xk205Et7tg== + dependencies: + lodash "^4.17.15" + ts-essentials "^7.0.1" "@types/babel__core@^7.1.14": version "7.1.19" @@ -2907,13 +3145,6 @@ resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.34.tgz#c0fb25e4d957e0ee2e497c1f553d7f8bb668fd75" integrity sha512-s2cfwagOQAS8o06TcwKfr9Wx11dNGbH2E9vJz1cqV+a/LOyhWNLUNd6JSRYNzvB4d29UuJX2M0Dj9vE1T8fRXw== -"@types/jsonwebtoken@^9.0.0": - version "9.0.1" - resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz#29b1369c4774200d6d6f63135bf3d1ba3ef997a4" - integrity sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw== - dependencies: - "@types/node" "*" - "@types/node@*": version "18.6.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.1.tgz#828e4785ccca13f44e2fb6852ae0ef11e3e20ba5" @@ -2929,6 +3160,11 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== +"@types/prettier@^2.1.1": + version "2.7.3" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" + integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== + "@types/prettier@^2.1.5": version "2.6.4" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.4.tgz#ad899dad022bab6b5a9f0a0fe67c2f7a4a8950ed" @@ -2952,9 +3188,9 @@ integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== "@types/ws@^8.0.0": - version "8.5.3" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" - integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== + version "8.5.5" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.5.tgz#af587964aa06682702ee6dcbc7be41a80e4b28eb" + integrity sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg== dependencies: "@types/node" "*" @@ -3059,18 +3295,10 @@ resolved "https://registry.yarnpkg.com/@whatwg-node/events/-/events-0.0.2.tgz#7b7107268d2982fc7b7aff5ee6803c64018f84dd" integrity sha512-WKj/lI4QjnLuPrim0cfO7i+HsDSXHxNv1y0CrJhdntuO3hxWZmnXCwNDnwOvry11OjRin6cgWNF+j/9Pn8TN4w== -"@whatwg-node/fetch@^0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.0.2.tgz#4242c4e36714b5018ccac0ab76f4ab5a208fbc1c" - integrity sha512-qiZn8dYRg0POzUvmHBs7blLxl6DPL+b+Z0JUsGaj7/8PFe2BJG9onrUVX6OWh6Z9YhcYw8yu+wtCAme5ZMiCKQ== - dependencies: - abort-controller "^3.0.0" - busboy "^1.6.0" - form-data-encoder "^1.7.1" - formdata-node "^4.3.1" - node-fetch "^2.6.7" - undici "5.5.1" - web-streams-polyfill "^3.2.0" +"@whatwg-node/events@^0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@whatwg-node/events/-/events-0.0.3.tgz#13a65dd4f5893f55280f766e29ae48074927acad" + integrity sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA== "@whatwg-node/fetch@^0.6.0": version "0.6.9" @@ -3083,15 +3311,15 @@ urlpattern-polyfill "^6.0.2" web-streams-polyfill "^3.2.1" -"@whatwg-node/fetch@^0.7.0": - version "0.7.1" - resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.7.1.tgz#894a66c30515535577d598d02144a626e6e46570" - integrity sha512-rU/oS5pQLP0GOtTegi3sgzCkid5kbogXX16IaO0DYudhHJxbylKO7+xr7mbjM68XXYr7wkJ2BCmO1DHeg/XBuw== +"@whatwg-node/fetch@^0.8.0", "@whatwg-node/fetch@^0.8.1", "@whatwg-node/fetch@^0.8.2": + version "0.8.8" + resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.8.8.tgz#48c6ad0c6b7951a73e812f09dd22d75e9fa18cae" + integrity sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg== dependencies: "@peculiar/webcrypto" "^1.4.0" - "@whatwg-node/node-fetch" "^0.1.0" + "@whatwg-node/node-fetch" "^0.3.6" busboy "^1.6.0" - urlpattern-polyfill "^6.0.2" + urlpattern-polyfill "^8.0.0" web-streams-polyfill "^3.2.1" "@whatwg-node/node-fetch@^0.0.5": @@ -3103,22 +3331,17 @@ busboy "^1.6.0" tslib "^2.3.1" -"@whatwg-node/node-fetch@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@whatwg-node/node-fetch/-/node-fetch-0.1.0.tgz#0f3ae37b0a7742d24bd1bfcf8115f9e7fa19ea38" - integrity sha512-SSEGg+uVCeGSROAFSuBHhh7KufoOVcs+ftcCQaCHawXdkWVX7+fHramK23H3tXXlKdxuYIHO0oDiIVbq9BE34Q== +"@whatwg-node/node-fetch@^0.3.6": + version "0.3.6" + resolved "https://registry.yarnpkg.com/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz#e28816955f359916e2d830b68a64493124faa6d0" + integrity sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA== dependencies: - "@whatwg-node/events" "^0.0.2" + "@whatwg-node/events" "^0.0.3" busboy "^1.6.0" + fast-querystring "^1.1.1" + fast-url-parser "^1.1.3" tslib "^2.3.1" -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -3129,7 +3352,12 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.4.1, acorn@^8.5.0, acorn@^8.8.0: +acorn@^8.4.1: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +acorn@^8.5.0, acorn@^8.8.0: version "8.8.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== @@ -3139,12 +3367,12 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== +agent-base@^7.0.2, agent-base@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.0.tgz#536802b76bc0b34aa50195eb2442276d613e3434" + integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== dependencies: - debug "4" + debug "^4.3.4" aggregate-error@^3.0.0: version "3.1.0" @@ -3205,7 +3433,7 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -anymatch@^3.0.3, anymatch@~3.1.2: +anymatch@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -3213,6 +3441,14 @@ anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -3230,6 +3466,16 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +array-back@^3.0.1, array-back@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== + +array-back@^4.0.1, array-back@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -3326,13 +3572,6 @@ babel-jest@^29.4.2: graceful-fs "^4.2.9" slash "^3.0.0" -babel-plugin-dynamic-import-node@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" - integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== - dependencies: - object.assign "^4.1.0" - babel-plugin-inline-import@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-inline-import/-/babel-plugin-inline-import-3.0.0.tgz#220eb2a52f8e779d8fb89447f950275e1e3f5981" @@ -3575,6 +3814,16 @@ browserslist@^4.20.2: node-releases "^2.0.6" update-browserslist-db "^1.0.5" +browserslist@^4.21.9: + version "4.21.10" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.10.tgz#dbbac576628c13d3b2231332cb2ec5a46e015bb0" + integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ== + dependencies: + caniuse-lite "^1.0.30001517" + electron-to-chromium "^1.4.477" + node-releases "^2.0.13" + update-browserslist-db "^1.0.11" + bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -3582,17 +3831,12 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" -buffer-equal-constant-time@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" - integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^5.5.0, buffer@^5.7.1: +buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -3673,6 +3917,11 @@ caniuse-lite@^1.0.30001449: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz#2e197c698fc1373d63e1406d6607ea4617c613f1" integrity sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w== +caniuse-lite@^1.0.30001517: + version "1.0.30001519" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz#3e7b8b8a7077e78b0eb054d69e6edf5c7df35601" + integrity sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg== + capital-case@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" @@ -3698,7 +3947,7 @@ chalk@^1.0.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0: +chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -3797,9 +4046,9 @@ cli-cursor@^3.1.0: restore-cursor "^3.1.0" cli-spinners@^2.5.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== + version "2.9.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.0.tgz#5881d0ad96381e117bbe07ad91f2008fe6ffd8db" + integrity sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g== cli-truncate@^2.1.0: version "2.1.0" @@ -3823,15 +4072,6 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -3886,9 +4126,9 @@ colord@^2.9.1: integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== colorette@^2.0.16: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" @@ -3897,6 +4137,26 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +command-line-args@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" + integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== + dependencies: + array-back "^3.1.0" + find-replace "^3.0.0" + lodash.camelcase "^4.3.0" + typical "^4.0.0" + +command-line-usage@^6.1.0: + version "6.1.3" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== + dependencies: + array-back "^4.0.2" + chalk "^2.4.2" + table-layout "^1.0.2" + typical "^5.2.0" + commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -3968,9 +4228,9 @@ core-util-is@1.0.2: integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== cosmiconfig-typescript-loader@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz#c4259ce474c9df0f32274ed162c0447c951ef073" - integrity sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q== + version "4.4.0" + resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.4.0.tgz#f3feae459ea090f131df5474ce4b1222912319f9" + integrity sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw== cosmiconfig@8.0.0: version "8.0.0" @@ -4122,15 +4382,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -dataloader@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.1.0.tgz#c69c538235e85e7ac6c6c444bae8ecabf5de9df7" - integrity sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ== - -dataloader@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.2.1.tgz#f07ab712514313a34b1507a308dbb7dc14bac715" - integrity sha512-Zn+tVZo1RKu120rgoe0JsRk56UiKdefPSH47QROJsMHrX8/S9UJvi5A/A6+Sbuk6rE88z5JoM/wIJ09Z7BTfYA== +dataloader@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.2.2.tgz#216dc509b5abe39d43a9b9d97e6e5e473dfbe3e0" + integrity sha512-8YnDaaf7N3k/q5HnTJVuzSyLETjoZjVmHc4AeKAzOvKHEFQKcn64OKBfzHYtE9zGjctNM7V9I0MfnUVLpi7M5g== debounce@^1.2.0: version "1.2.1" @@ -4154,6 +4409,11 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +deep-extend@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -4165,9 +4425,9 @@ deepmerge@^4.2.2: integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - integrity sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA== + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== dependencies: clone "^1.0.2" @@ -4275,9 +4535,9 @@ dot-case@^3.0.4: tslib "^2.0.3" dotenv@^16.0.0: - version "16.0.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.1.tgz#8f8f9d94876c35dac989876a5d3a82a267fdce1d" - integrity sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ== + version "16.3.1" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" + integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== dset@^3.1.2: version "3.1.2" @@ -4302,13 +4562,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ecdsa-sig-formatter@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" - integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== - dependencies: - safe-buffer "^5.0.1" - ejs@^3.1.6: version "3.1.8" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.8.tgz#758d32910c78047585c7ef1f92f9ee041c1c190b" @@ -4326,6 +4579,11 @@ electron-to-chromium@^1.4.284: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.294.tgz#ad80317b85f0859a9454680fbc1c726fefa7e6fd" integrity sha512-PuHZB3jEN7D8WPPjLmBQAsqQz8tWHlkkB4n0E2OYw8RwVdmBYV0Wn+rUFH8JqYyIRb4HQhhedgxlZL163wqLrQ== +electron-to-chromium@^1.4.477: + version "1.4.488" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.488.tgz#442b1855f8c84fb1ed79f518985c65db94f64cc9" + integrity sha512-Dv4sTjiW7t/UWGL+H8ZkgIjtUAVZDgb/PwGWvMsCT7jipzUV/u5skbLXPFKb6iV0tiddVi/bcS2/kUrczeWgIQ== + elliptic@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -4586,6 +4844,16 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +ethereum-cryptography@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz#5ccfa183e85fdaf9f9b299a79430c044268c9b3a" + integrity sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw== + dependencies: + "@noble/hashes" "1.2.0" + "@noble/secp256k1" "1.7.1" + "@scure/bip32" "1.1.5" + "@scure/bip39" "1.1.1" + ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" @@ -4635,11 +4903,6 @@ event-stream@=3.3.4: stream-combiner "~0.0.4" through "~2.3.1" -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - eventemitter3@^4.0.4: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -4715,6 +4978,11 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== +fast-decode-uri-component@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz#46f8b6c22b30ff7a81357d4f59abfae938202543" + integrity sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg== + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -4746,6 +5014,20 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-querystring@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fast-querystring/-/fast-querystring-1.1.2.tgz#a6d24937b4fc6f791b4ee31dcb6f53aeafb89f53" + integrity sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg== + dependencies: + fast-decode-uri-component "^1.0.1" + +fast-url-parser@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" + integrity sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ== + dependencies: + punycode "^1.3.2" + fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -4766,9 +5048,9 @@ fbjs-css-vars@^1.0.0: integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== fbjs@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.4.tgz#e1871c6bd3083bac71ff2da868ad5067d37716c6" - integrity sha512-ucV0tDODnGV3JCnnkmoszb5lf4bNpzjv80K41wd4k798Etq+UYD0y0TIfalLjZoKgjive6/adkRnszwapiDgBQ== + version "3.0.5" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.5.tgz#aa0edb7d5caa6340011790bd9249dbef8a81128d" + integrity sha512-ztsSx77JBtkuMrEypfhgc3cI0+0h+svqeie7xHbh1k/IKdcydnvadp/mUaGgjAOXQmQSxsqgaRhS3q9fy+1kxg== dependencies: cross-fetch "^3.1.5" fbjs-css-vars "^1.0.0" @@ -4776,7 +5058,7 @@ fbjs@^3.0.0: object-assign "^4.1.0" promise "^7.1.1" setimmediate "^1.0.5" - ua-parser-js "^0.7.30" + ua-parser-js "^1.0.35" figures@^1.0.1: version "1.7.0" @@ -4828,6 +5110,13 @@ find-cache-dir@^3.3.2: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-replace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== + dependencies: + array-back "^3.0.1" + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -4869,11 +5158,6 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== -form-data-encoder@^1.7.1: - version "1.7.2" - resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.2.tgz#1f1ae3dccf58ed4690b86d87e4f57c654fbab040" - integrity sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A== - form-data@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" @@ -4892,14 +5176,6 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -formdata-node@^4.3.1: - version "4.3.3" - resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-4.3.3.tgz#21415225be66e2c87a917bfc0fedab30a119c23c" - integrity sha512-coTew7WODO2vF+XhpUdmYz4UBvlsiTMSNaFYZlrXIqYbFd4W7bMwnoALNLE6uvNgzTg2j1JDF0ZImEfF06VPAA== - dependencies: - node-domexception "1.0.0" - web-streams-polyfill "4.0.0-beta.1" - fraction.js@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" @@ -4919,6 +5195,15 @@ fs-extra@^10.0.0, fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -5023,6 +5308,18 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob@7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -5083,6 +5380,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +graceful-fs@^4.1.2: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" @@ -5094,9 +5396,9 @@ grapheme-splitter@^1.0.4: integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== graphql-config@^4.4.0: - version "4.4.1" - resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-4.4.1.tgz#2b1b5215b38911c0b15ff9b2e878101c984802d6" - integrity sha512-B8wlvfBHZ5WnI4IiuQZRqql6s+CKz7S+xpUeTb28Z8nRBi8tH9ChEBgT5FnTyE05PUhHlrS2jK9ICJ4YBl9OtQ== + version "4.5.0" + resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-4.5.0.tgz#257c2338950b8dce295a27f75c5f6c39f8f777b2" + integrity sha512-x6D0/cftpLUJ0Ch1e5sj1TZn6Wcxx4oMfmhaG9shM0DKajA9iR+j1z86GSTQ19fShbGvrSSvbIQsHku6aQ6BBw== dependencies: "@graphql-tools/graphql-file-loader" "^7.3.7" "@graphql-tools/json-file-loader" "^7.3.7" @@ -5105,7 +5407,8 @@ graphql-config@^4.4.0: "@graphql-tools/url-loader" "^7.9.7" "@graphql-tools/utils" "^9.0.0" cosmiconfig "8.0.0" - minimatch "4.2.1" + jiti "1.17.1" + minimatch "4.2.3" string-env-interpolation "1.0.1" tslib "^2.4.0" @@ -5118,15 +5421,13 @@ graphql-request@^4.3.0: extract-files "^9.0.0" form-data "^3.0.0" -graphql-request@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-5.1.0.tgz#dbc8feee27d21b993cd5da2d3af67821827b240a" - integrity sha512-0OeRVYigVwIiXhNmqnPDt+JhMzsjinxHE7TVy3Lm6jUzav0guVcL0lfSbi6jVTRAxcbwgyr6yrZioSHxf9gHzw== +graphql-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-6.1.0.tgz#f4eb2107967af3c7a5907eb3131c671eac89be4f" + integrity sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw== dependencies: - "@graphql-typed-document-node/core" "^3.1.1" + "@graphql-typed-document-node/core" "^3.2.0" cross-fetch "^3.1.5" - extract-files "^9.0.0" - form-data "^3.0.0" graphql-tag@^2.11.0: version "2.12.6" @@ -5135,15 +5436,10 @@ graphql-tag@^2.11.0: dependencies: tslib "^2.1.0" -graphql-ws@5.11.3: - version "5.11.3" - resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.11.3.tgz#eaf8e6baf669d167975cff13ad86abca4ecfe82f" - integrity sha512-fU8zwSgAX2noXAsuFiCZ8BtXeXZOzXyK5u1LloCdacsVth4skdBMPO74EG51lBoWSIZ8beUocdpV8+cQHBODnQ== - -graphql-ws@^5.4.1: - version "5.9.1" - resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.9.1.tgz#9c0fa48ceb695d61d574ed3ab21b426729e87f2d" - integrity sha512-mL/SWGBwIT9Meq0NlfS55yXXTOeWPMbK7bZBEZhFu46bcGk1coTx2Sdtzxdk+9yHWngD+Fk1PZDWaAutQa9tpw== +graphql-ws@5.12.1: + version "5.12.1" + resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.12.1.tgz#c62d5ac54dbd409cc6520b0b39de374b3d59d0dd" + integrity sha512-umt4f5NnMK46ChM2coO36PTFhHouBrK9stWWBczERguwYrGnPNxJ9dimU6IyOBfOkC6Izhkg4H8+F51W/8CYDg== graphql@^16.3.0: version "16.6.0" @@ -5223,7 +5519,7 @@ has-proto@^1.0.1: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== -has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: +has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== @@ -5272,14 +5568,13 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -http-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" - integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== +http-proxy-agent@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-6.1.1.tgz#dc04f1a84e09511740cfbd984a56f86cc42e4277" + integrity sha512-JRCz+4Whs6yrrIoIlrH+ZTmhrRwtMnmOHsHn8GFEn9O2sVfSE+DAZ3oyyGIKF8tjJEeSJmP89j7aTjVsSqsU0g== dependencies: - "@tootallnate/once" "2" - agent-base "6" - debug "4" + agent-base "^7.1.0" + debug "^4.3.4" http-signature@~1.2.0: version "1.2.0" @@ -5290,12 +5585,12 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== +https-proxy-agent@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-6.2.1.tgz#0965ab47371b3e531cf6794d1eb148710a992ba7" + integrity sha512-ONsE3+yfZF2caH5+bJlcddtWqNI3Gvs5A38+ngvljxaBiRXRswym2c7yf8UAeFpRFKjFNHIFEHqR/OLAWJzyiA== dependencies: - agent-base "6" + agent-base "^7.0.2" debug "4" human-signals@^2.1.0: @@ -5394,9 +5689,9 @@ inherits@2, inherits@^2.0.3, inherits@^2.0.4: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== inquirer@^8.0.0: - version "8.2.4" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.4.tgz#ddbfe86ca2f67649a67daa6f1051c128f684f0b4" - integrity sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg== + version "8.2.6" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562" + integrity sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg== dependencies: ansi-escapes "^4.2.1" chalk "^4.1.1" @@ -5412,7 +5707,7 @@ inquirer@^8.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" through "^2.3.6" - wrap-ansi "^7.0.0" + wrap-ansi "^6.0.1" internal-slot@^1.0.3, internal-slot@^1.0.4: version "1.0.5" @@ -5666,14 +5961,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -isomorphic-fetch@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz#0267b005049046d2421207215d45d6a262b8b8b4" - integrity sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA== - dependencies: - node-fetch "^2.6.1" - whatwg-fetch "^3.4.1" - isomorphic-ws@5.0.0, isomorphic-ws@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" @@ -6115,12 +6402,22 @@ jest@^29.4.2: import-local "^3.0.2" jest-cli "^29.4.2" +jiti@1.17.1: + version "1.17.1" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.17.1.tgz#264daa43ee89a03e8be28c3d712ccc4eb9f1e8ed" + integrity sha512-NZIITw8uZQFuzQimqjUxIrIcEdxYDFIe/0xYfIlVXTkiBjjyBEvgasj5bb0/cHtPRD/NziPbT312sFrkI5ALpw== + +jose@^4.11.4: + version "4.14.4" + resolved "https://registry.yarnpkg.com/jose/-/jose-4.14.4.tgz#59e09204e2670c3164ee24cbfe7115c6f8bff9ca" + integrity sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g== + js-sdsl@^4.1.4: version "4.3.0" resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.3.0.tgz#aeefe32a451f7af88425b11fdb5f58c90ae1d711" integrity sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ== -js-sha3@0.8.0: +js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== @@ -6188,11 +6485,11 @@ json-stable-stringify-without-jsonify@^1.0.1: integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg== + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz#e06f23128e0bbe342dc996ed5a19e28b57b580e0" + integrity sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g== dependencies: - jsonify "~0.0.0" + jsonify "^0.0.1" json-stringify-safe@~5.0.1: version "5.0.1" @@ -6217,6 +6514,13 @@ json5@^2.2.1: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -6226,20 +6530,10 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha512-trvBk1ki43VZptdBI5rIlG4YOzyeH/WefQt5rj1grasPn4iiZWKet8nkgc4GlsAylaztn0qZfUYOiTsASJFdNA== - -jsonwebtoken@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz#d0faf9ba1cc3a56255fe49c0961a67e520c1926d" - integrity sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw== - dependencies: - jws "^3.2.2" - lodash "^4.17.21" - ms "^2.1.1" - semver "^7.3.8" +jsonify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== jsprim@^1.2.2: version "1.4.2" @@ -6256,23 +6550,6 @@ just-performance@4.3.0: resolved "https://registry.yarnpkg.com/just-performance/-/just-performance-4.3.0.tgz#cc2bc8c9227f09e97b6b1df4cd0de2df7ae16db1" integrity sha512-L7RjvtJsL0QO8xFs5wEoDDzzJwoiowRw6Rn/GnvldlchS2JQr9wFYPiwZcDfrbbujEKqKN0tvENdbjXdYhDp5Q== -jwa@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" - integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== - dependencies: - buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jws@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== - dependencies: - jwa "^1.4.1" - safe-buffer "^5.0.1" - kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -6376,7 +6653,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== -lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.5, lodash@~4.17.0: +lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.5, lodash@~4.17.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -6500,15 +6777,10 @@ 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== -meros@^1.1.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/meros/-/meros-1.2.0.tgz#096cdede2eb0b1610b219b1031b935260de1ad08" - integrity sha512-3QRZIS707pZQnijHdhbttXRWwrHhZJ/gzolneoxKVz9N/xmsvY/7Ls8lpnI9gxbgxjcHsAVEW3mgwiZCo6kkJQ== - meros@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/meros/-/meros-1.2.1.tgz#056f7a76e8571d0aaf3c7afcbe7eb6407ff7329e" - integrity sha512-R2f/jxYqCAGI19KhAvaxSOxALBMkaXWH2a7rOyqQw+ZmizX5bKkEYWLzdhC+U82ZVVPVp6MCXe3EkVligh+12g== + version "1.3.0" + resolved "https://registry.yarnpkg.com/meros/-/meros-1.3.0.tgz#c617d2092739d55286bf618129280f362e6242f2" + integrity sha512-2BNGOimxEz5hmjUG2FwoxCt5HN7BXdaWyFqEwxPTrJzVdABtrL4TiHTcsWSFAxPQ/tOnEaQEJh3qWq71QRMY+w== microbundle@^0.15.1: version "0.15.1" @@ -6593,10 +6865,10 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" - integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== +minimatch@4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.3.tgz#b4dcece1d674dee104bb0fb833ebb85a78cbbca6" + integrity sha512-lIUdtK5hdofgCTu3aT0sOaHsYR37viUuIc0rwnnDXImbwFRcumyLMeZaM0t0I/fgxS6s6JMfu0rLD1Wz9pv1ng== dependencies: brace-expansion "^1.1.7" @@ -6619,6 +6891,11 @@ minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + mri@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" @@ -6629,11 +6906,6 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -6672,23 +6944,30 @@ node-cleanup@^2.1.2: resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" integrity sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw== -node-domexception@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7: +node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== dependencies: whatwg-url "^5.0.0" +node-fetch@^2.6.1: + version "2.6.12" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba" + integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g== + dependencies: + whatwg-url "^5.0.0" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== +node-releases@^2.0.13: + version "2.0.13" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" + integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== + node-releases@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" @@ -6765,16 +7044,6 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" @@ -7323,6 +7592,11 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" +prettier@^2.3.1: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + prettier@^2.5.1: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" @@ -7386,17 +7660,22 @@ psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== +punycode@^1.3.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== + punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== pvtsutils@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.2.tgz#9f8570d132cdd3c27ab7d51a2799239bf8d8d5de" - integrity sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ== + version "1.3.3" + resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.3.tgz#29ef8ea50318d1187b15260b1d0b32e57eea32dc" + integrity sha512-6sAOMlXyrJ+8tRN5IAaYfuYZRp1C2uJ0SyDynEFxL+VY8kCRib9Lpj/+KPaNFpaQWr/iRik5nrzz6iaNlxgEGA== dependencies: - tslib "^2.4.0" + tslib "^2.6.1" pvutils@^1.1.3: version "1.1.3" @@ -7426,9 +7705,9 @@ react-is@^18.0.0: integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== readable-stream@^3.4.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -7441,6 +7720,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +reduce-flatten@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" + integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== + regenerate-unicode-properties@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" @@ -7458,10 +7742,10 @@ regenerator-runtime@^0.13.11: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== -regenerator-runtime@^0.13.4: - version "0.13.9" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== regenerator-transform@^0.15.1: version "0.15.1" @@ -7711,9 +7995,9 @@ run-parallel@^1.1.9: queue-microtask "^1.2.2" rxjs@^7.5.5: - version "7.5.6" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.6.tgz#0446577557862afd6903517ce7cae79ecb9662bc" - integrity sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw== + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== dependencies: tslib "^2.1.0" @@ -7768,7 +8052,12 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.5, semver@^7.3.8: +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.3.5: version "7.3.8" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== @@ -7821,9 +8110,9 @@ shebang-regex@^3.0.0: integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== shell-quote@^1.7.3: - version "1.8.0" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.0.tgz#20d078d0eaf71d54f43bd2ba14a1b5b9bfa5c8ba" - integrity sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ== + version "1.8.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" + integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== side-channel@^1.0.4: version "1.0.4" @@ -7984,6 +8273,11 @@ string-env-interpolation@1.0.1, string-env-interpolation@^1.0.1: resolved "https://registry.yarnpkg.com/string-env-interpolation/-/string-env-interpolation-1.0.1.tgz#ad4397ae4ac53fe6c91d1402ad6f6a52862c7152" integrity sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg== +string-format@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" + integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== + string-hash@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" @@ -8138,13 +8432,15 @@ swap-case@^2.0.2: dependencies: tslib "^2.0.3" -sync-fetch@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/sync-fetch/-/sync-fetch-0.4.1.tgz#87b8684eef2fa25c96c4683ae308473a4e5c571f" - integrity sha512-JDtyFEvnKUzt1CxRtzzsGgkBanEv8XRmLyJo0F0nGkpCR8EjYmpOJJXz8GA/SWtlPU0nAYh0+CNMNnFworGyOA== +table-layout@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" + integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== dependencies: - buffer "^5.7.1" - node-fetch "^2.6.1" + array-back "^4.0.1" + deep-extend "~0.6.0" + typical "^5.2.0" + wordwrapjs "^4.0.0" terser@^5.0.0, terser@^5.7.0: version "5.16.5" @@ -8227,10 +8523,25 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +ts-command-line-args@^2.2.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz#e64456b580d1d4f6d948824c274cf6fa5f45f7f0" + integrity sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw== + dependencies: + chalk "^4.1.0" + command-line-args "^5.1.1" + command-line-usage "^6.1.0" + string-format "^2.0.0" + +ts-essentials@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== + ts-log@^2.2.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/ts-log/-/ts-log-2.2.4.tgz#d672cf904b33735eaba67a7395c93d45fba475b3" - integrity sha512-DEQrfv6l7IvN2jlzc/VTdZJYsWUnQNCsueYjMkC/iXoEoi5fNan6MjeDqkvhfzbmHgdz9UxDUluX3V5HdjTydQ== + version "2.2.5" + resolved "https://registry.yarnpkg.com/ts-log/-/ts-log-2.2.5.tgz#aef3252f1143d11047e2cb6f7cfaac7408d96623" + integrity sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA== ts-mockito@^2.6.1: version "2.6.1" @@ -8273,16 +8584,26 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.3.1, tslib@^2.4.1, tslib@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.5.0, tslib@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410" + integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig== -tslib@^2.0.3, tslib@^2.1.0, tslib@^2.4.0, tslib@~2.4.0: +tslib@^2.0.3, tslib@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== +tslib@~2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + +tslib@~2.5.0: + version "2.5.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913" + integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -8324,6 +8645,22 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== +typechain@^8.2.0: + version "8.3.1" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.3.1.tgz#dccbc839b94877997536c356380eff7325395cfb" + integrity sha512-fA7clol2IP/56yq6vkMTR+4URF1nGjV82Wx6Rf09EsqD4tkzMAvEaqYxVFCavJm/1xaRga/oD55K+4FtuXwQOQ== + dependencies: + "@types/prettier" "^2.1.1" + debug "^4.3.1" + fs-extra "^7.0.0" + glob "7.1.7" + js-sha3 "^0.8.0" + lodash "^4.17.15" + mkdirp "^1.0.4" + prettier "^2.3.1" + ts-command-line-args "^2.2.0" + ts-essentials "^7.0.1" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" @@ -8338,10 +8675,20 @@ typescript@^4.1.3, typescript@^4.9.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== -ua-parser-js@^0.7.30: - version "0.7.31" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.31.tgz#649a656b191dffab4f21d5e053e27ca17cbff5c6" - integrity sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ== +typical@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== + +typical@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" + integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== + +ua-parser-js@^1.0.35: + version "1.0.35" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.35.tgz#c4ef44343bc3db0a3cbefdf21822f1b1fc1ab011" + integrity sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA== uglify-js@^3.1.4: version "3.17.4" @@ -8363,11 +8710,6 @@ unc-path-regex@^0.1.2: resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" integrity sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg== -undici@5.5.1: - version "5.5.1" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.5.1.tgz#baaf25844a99eaa0b22e1ef8d205bffe587c8f43" - integrity sha512-MEvryPLf18HvlCbLSzCW0U00IMftKGI5udnjrQbC5D4P0Hodwffhv+iGfWuJwg16Y/TK11ZFK8i+BPVW2z/eAw== - unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" @@ -8391,6 +8733,11 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -8411,6 +8758,14 @@ update-browserslist-db@^1.0.10: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" + integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + update-browserslist-db@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38" @@ -8447,6 +8802,11 @@ urlpattern-polyfill@^6.0.2: dependencies: braces "^3.0.2" +urlpattern-polyfill@^8.0.0: + version "8.0.2" + resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz#99f096e35eff8bf4b5a2aa7d58a1523d6ebc7ce5" + integrity sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ== + util-deprecate@^1.0.1, util-deprecate@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -8471,12 +8831,7 @@ v8-to-istanbul@^9.0.1: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" -value-or-promise@1.0.11, value-or-promise@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/value-or-promise/-/value-or-promise-1.0.11.tgz#3e90299af31dd014fe843fe309cefa7c1d94b140" - integrity sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg== - -value-or-promise@1.0.12, value-or-promise@^1.0.12: +value-or-promise@^1.0.11, value-or-promise@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/value-or-promise/-/value-or-promise-1.0.12.tgz#0e5abfeec70148c78460a849f6b003ea7986f15c" integrity sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q== @@ -8504,22 +8859,17 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -web-streams-polyfill@4.0.0-beta.1: - version "4.0.0-beta.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.1.tgz#3b19b9817374b7cee06d374ba7eeb3aeb80e8c95" - integrity sha512-3ux37gEX670UUphBF9AMCq8XM6iQ8Ac6A+DSRRjDoRBm1ufCkaCDdNVbaqq60PsEkdNlLKrGtv/YBP4EJXqNtQ== - -web-streams-polyfill@^3.2.0, web-streams-polyfill@^3.2.1: +web-streams-polyfill@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== -webcrypto-core@^1.7.4: - version "1.7.5" - resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.7.5.tgz#c02104c953ca7107557f9c165d194c6316587ca4" - integrity sha512-gaExY2/3EHQlRNNNVSrbG2Cg94Rutl7fAaKILS1w8ZDhGxdFOaw6EbCfHIxPy9vt/xwp5o0VQAx9aySPF6hU1A== +webcrypto-core@^1.7.7: + version "1.7.7" + resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.7.7.tgz#06f24b3498463e570fed64d7cab149e5437b162c" + integrity sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g== dependencies: - "@peculiar/asn1-schema" "^2.1.6" + "@peculiar/asn1-schema" "^2.3.6" "@peculiar/json-schema" "^1.1.12" asn1js "^3.0.1" pvtsutils "^1.3.2" @@ -8530,11 +8880,6 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -whatwg-fetch@^3.4.1: - version "3.6.2" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c" - integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA== - whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -8555,9 +8900,9 @@ which-boxed-primitive@^1.0.2: is-symbol "^1.0.3" which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== + version "2.0.1" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" + integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== which-typed-array@^1.1.9: version "1.1.9" @@ -8588,7 +8933,15 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -wrap-ansi@^6.2.0: +wordwrapjs@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" + integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== + dependencies: + reduce-flatten "^2.0.0" + typical "^5.2.0" + +wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== @@ -8624,15 +8977,10 @@ ws@7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== -ws@8.12.0, ws@^8.12.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.0.tgz#485074cc392689da78e1828a9ff23585e06cddd8" - integrity sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig== - -ws@^8.3.0: - version "8.8.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" - integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== +ws@8.13.0, ws@^8.12.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" + integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== x-path@^0.0.2: version "0.0.2" @@ -8679,11 +9027,6 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^21.0.0: - version "21.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" - integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== - yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" @@ -8707,17 +9050,17 @@ yargs@^15.3.1: yargs-parser "^18.1.2" yargs@^17.0.0: - version "17.5.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" - integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== dependencies: - cliui "^7.0.2" + cliui "^8.0.1" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" string-width "^4.2.3" y18n "^5.0.5" - yargs-parser "^21.0.0" + yargs-parser "^21.1.1" yargs@^17.3.1: version "17.6.2" From d3d9edcbc1bc54ba6483b3ab5b57256deecd2ea6 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 9 Aug 2023 09:45:17 +0000 Subject: [PATCH 02/21] chore: sdk consts --- src/common/consts.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/common/consts.ts b/src/common/consts.ts index eb5e8958..94096f4d 100644 --- a/src/common/consts.ts +++ b/src/common/consts.ts @@ -4,6 +4,8 @@ import contractNetworks from '@cowprotocol/contracts/networks.json' const { GPv2Settlement } = JSON.parse(contractNetworks as unknown as string) as typeof contractNetworks export const BUY_ETH_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' +export const EXTENSIBLE_FALLBACK_HANDLER = '0x4e305935b14627eA57CBDbCfF57e81fd9F240403' +export const COMPOSABLE_COW = '0xF487887DA5a4b4e3eC114FDAd97dc0F785d72738' /** * The list of supported chains. @@ -24,3 +26,25 @@ export const COW_PROTOCOL_SETTLEMENT_CONTRACT_ADDRESS = ALL_SUPPORTED_CHAIN_IDS. }), {} ) + +/** + * An object containing the addresses of the `ExtensibleFallbackHandler` contracts for each supported chain. + */ +export const EXTENSIBLE_FALLBACK_HANDLER_CONTRACT_ADDRESS = ALL_SUPPORTED_CHAIN_IDS.reduce>( + (acc, chainId) => ({ + ...acc, + [chainId]: EXTENSIBLE_FALLBACK_HANDLER, + }), + {} +) + +/** + * An object containing the addresses of the `ComposableCow` contracts for each supported chain. + */ +export const COMPOSABLE_COW_CONTRACT_ADDRESS = ALL_SUPPORTED_CHAIN_IDS.reduce>( + (acc, chainId) => ({ + ...acc, + [chainId]: COMPOSABLE_COW, + }), + {} +) From 220a81309a7c8a026dbe48b516acc8707c9660f8 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 9 Aug 2023 09:47:16 +0000 Subject: [PATCH 03/21] feat: eip-1271 signing utils --- src/order-signing/orderSigningUtils.ts | 35 +++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/order-signing/orderSigningUtils.ts b/src/order-signing/orderSigningUtils.ts index 7b52f265..b6f2060a 100644 --- a/src/order-signing/orderSigningUtils.ts +++ b/src/order-signing/orderSigningUtils.ts @@ -2,7 +2,7 @@ import type { SupportedChainId } from '../common' import type { Signer } from '@ethersproject/abstract-signer' import type { TypedDataDomain } from '@cowprotocol/contracts' import type { SigningResult, UnsignedOrder } from './types' - +import { _TypedDataEncoder } from 'ethers/lib/utils' const getSignUtils = () => import('./utils') /** @@ -98,4 +98,37 @@ export class OrderSigningUtils { const { getDomain } = await getSignUtils() return getDomain(chainId) } + + /** + * Get the domain separator hash for the EIP-712 typed domain data being used for signing. + * @param chainId {SupportedChainId} chainId The CoW Protocol protocol `chainId` context that's being used. + * @returns A string representation of the EIP-712 typed domain data hash. + */ + static getDomainSeparator(chainId: SupportedChainId): string { + return _TypedDataEncoder.hashDomain(getDomain(chainId)) + } + + /** + * Get the EIP-712 types used for signing a GPv2Order.Data struct. This is useful for when + * signing orders using smart contracts, whereby this SDK cannot do the EIP-1271 signing for you. + * @returns The EIP-712 types used for signing. + */ + static getEIP712Types(): Record { + return { + Order: [ + { name: 'sellToken', type: 'address' }, + { name: 'buyToken', type: 'address' }, + { name: 'receiver', type: 'address' }, + { name: 'sellAmount', type: 'uint256' }, + { name: 'buyAmount', type: 'uint256' }, + { name: 'validTo', type: 'uint32' }, + { name: 'appData', type: 'bytes32' }, + { name: 'feeAmount', type: 'uint256' }, + { name: 'kind', type: 'string' }, + { name: 'partiallyFillable', type: 'bool' }, + { name: 'sellTokenBalance', type: 'string' }, + { name: 'buyTokenBalance', type: 'string' }, + ], + } + } } From a1c470978f0b1c0ddbb4a4d338032fb5ef35cdf2 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 9 Aug 2023 09:47:56 +0000 Subject: [PATCH 04/21] chore(es6): no async import --- src/order-signing/orderSigningUtils.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/order-signing/orderSigningUtils.ts b/src/order-signing/orderSigningUtils.ts index b6f2060a..e43c619f 100644 --- a/src/order-signing/orderSigningUtils.ts +++ b/src/order-signing/orderSigningUtils.ts @@ -3,7 +3,7 @@ import type { Signer } from '@ethersproject/abstract-signer' import type { TypedDataDomain } from '@cowprotocol/contracts' import type { SigningResult, UnsignedOrder } from './types' import { _TypedDataEncoder } from 'ethers/lib/utils' -const getSignUtils = () => import('./utils') +import { getDomain, signOrder, signOrderCancellation, signOrderCancellations } from './utils' /** * Utility class for signing order intents and cancellations. @@ -52,7 +52,6 @@ export class OrderSigningUtils { * @returns {Promise} Encoded signature including signing scheme for the order. */ static async signOrder(order: UnsignedOrder, chainId: SupportedChainId, signer: Signer): Promise { - const { signOrder } = await getSignUtils() return signOrder(order, chainId, signer) } @@ -68,7 +67,6 @@ export class OrderSigningUtils { chainId: SupportedChainId, signer: Signer ): Promise { - const { signOrderCancellation } = await getSignUtils() return signOrderCancellation(orderUid, chainId, signer) } @@ -84,7 +82,6 @@ export class OrderSigningUtils { chainId: SupportedChainId, signer: Signer ): Promise { - const { signOrderCancellations } = await getSignUtils() return signOrderCancellations(orderUids, chainId, signer) } @@ -95,7 +92,6 @@ export class OrderSigningUtils { * @see https://eips.ethereum.org/EIPS/eip-712 */ static async getDomain(chainId: SupportedChainId): Promise { - const { getDomain } = await getSignUtils() return getDomain(chainId) } From 15a1fe73e7bc5a2347a1f4217ca5b1c16a70cc73 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 9 Aug 2023 09:49:27 +0000 Subject: [PATCH 05/21] feat: composable cow abi --- abi/ComposableCoW.json | 1 + abi/ExtensibleFallbackHandler.json | 1 + abi/TWAP.json | 1 + 3 files changed, 3 insertions(+) create mode 100644 abi/ComposableCoW.json create mode 100644 abi/ExtensibleFallbackHandler.json create mode 100644 abi/TWAP.json diff --git a/abi/ComposableCoW.json b/abi/ComposableCoW.json new file mode 100644 index 00000000..b6735bd1 --- /dev/null +++ b/abi/ComposableCoW.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"_settlement","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InterfaceNotSupported","type":"error"},{"inputs":[],"name":"InvalidHandler","type":"error"},{"inputs":[],"name":"ProofNotAuthed","type":"error"},{"inputs":[],"name":"SingleOrderNotAuthed","type":"error"},{"inputs":[],"name":"SwapGuardRestricted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"indexed":false,"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"}],"name":"ConditionalOrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"bytes32","name":"root","type":"bytes32"},{"components":[{"internalType":"uint256","name":"location","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct ComposableCoW.Proof","name":"proof","type":"tuple"}],"name":"MerkleRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"contract ISwapGuard","name":"swapGuard","type":"address"}],"name":"SwapGuardSet","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"cabinet","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"},{"internalType":"bool","name":"dispatch","type":"bool"}],"name":"create","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"},{"internalType":"contract IValueFactory","name":"factory","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bool","name":"dispatch","type":"bool"}],"name":"createWithContext","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"},{"internalType":"bytes","name":"offchainInput","type":"bytes"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"getTradeableOrderWithSignature","outputs":[{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"internalType":"struct GPv2Order.Data","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"}],"name":"hash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract Safe","name":"safe","type":"address"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes32","name":"_domainSeparator","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes","name":"encodeData","type":"bytes"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"isValidSafeSignature","outputs":[{"internalType":"bytes4","name":"magic","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"singleOrderHash","type":"bytes32"}],"name":"remove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"roots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"components":[{"internalType":"uint256","name":"location","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ComposableCoW.Proof","name":"proof","type":"tuple"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"components":[{"internalType":"uint256","name":"location","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ComposableCoW.Proof","name":"proof","type":"tuple"},{"internalType":"contract IValueFactory","name":"factory","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setRootWithContext","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISwapGuard","name":"swapGuard","type":"address"}],"name":"setSwapGuard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"singleOrders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"swapGuards","outputs":[{"internalType":"contract ISwapGuard","name":"","type":"address"}],"stateMutability":"view","type":"function"}] \ No newline at end of file diff --git a/abi/ExtensibleFallbackHandler.json b/abi/ExtensibleFallbackHandler.json new file mode 100644 index 00000000..6837862a --- /dev/null +++ b/abi/ExtensibleFallbackHandler.json @@ -0,0 +1 @@ +[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"indexed":false,"internalType":"contract ISafeSignatureVerifier","name":"verifier","type":"address"}],"name":"AddedDomainVerifier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"AddedInterface","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"bytes32","name":"method","type":"bytes32"}],"name":"AddedSafeMethod","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"indexed":false,"internalType":"contract ISafeSignatureVerifier","name":"oldVerifier","type":"address"},{"indexed":false,"internalType":"contract ISafeSignatureVerifier","name":"newVerifier","type":"address"}],"name":"ChangedDomainVerifier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"bytes32","name":"oldMethod","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"newMethod","type":"bytes32"}],"name":"ChangedSafeMethod","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes32","name":"domainSeparator","type":"bytes32"}],"name":"RemovedDomainVerifier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"RemovedInterface","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"RemovedSafeMethod","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"contract Safe","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"domainVerifiers","outputs":[{"internalType":"contract ISafeSignatureVerifier","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"magic","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract Safe","name":"","type":"address"},{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"safeInterfaces","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Safe","name":"","type":"address"},{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"safeMethods","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"internalType":"contract ISafeSignatureVerifier","name":"newVerifier","type":"address"}],"name":"setDomainVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"bytes32","name":"newMethod","type":"bytes32"}],"name":"setSafeMethod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"},{"internalType":"bool","name":"supported","type":"bool"}],"name":"setSupportedInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"},{"internalType":"bytes32[]","name":"handlerWithSelectors","type":"bytes32[]"}],"name":"setSupportedInterfaceBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}] \ No newline at end of file diff --git a/abi/TWAP.json b/abi/TWAP.json new file mode 100644 index 00000000..b3c59c82 --- /dev/null +++ b/abi/TWAP.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract ComposableCoW","name":"_composableCow","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidFrequency","type":"error"},{"inputs":[],"name":"InvalidMinPartLimit","type":"error"},{"inputs":[],"name":"InvalidNumParts","type":"error"},{"inputs":[],"name":"InvalidPartSellAmount","type":"error"},{"inputs":[],"name":"InvalidSameToken","type":"error"},{"inputs":[],"name":"InvalidSpan","type":"error"},{"inputs":[],"name":"InvalidStartTime","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"OrderNotValid","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"indexed":false,"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"}],"name":"ConditionalOrderCreated","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"ctx","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"getTradeableOrder","outputs":[{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"internalType":"struct GPv2Order.Data","name":"order","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"internalType":"bytes32","name":"ctx","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"},{"internalType":"bytes","name":"offchainInput","type":"bytes"},{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"internalType":"struct GPv2Order.Data","name":"","type":"tuple"}],"name":"verify","outputs":[],"stateMutability":"view","type":"function"}] \ No newline at end of file From 3b6e91c4f7b57a76ce86b05f1839b54d46ff51de Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 9 Aug 2023 09:51:20 +0000 Subject: [PATCH 06/21] feat: composable cow --- src/composable/conditionalorder.spec.ts | 109 +++++ src/composable/conditionalorder.ts | 253 +++++++++++ src/composable/extensible.ts | 35 ++ src/composable/index.ts | 5 + src/composable/multiplexer.spec.ts | 286 +++++++++++++ src/composable/multiplexer.ts | 532 ++++++++++++++++++++++++ src/composable/types/index.ts | 1 + src/composable/types/twap.spec.ts | 117 ++++++ src/composable/types/twap.ts | 244 +++++++++++ src/index.ts | 1 + 10 files changed, 1583 insertions(+) create mode 100644 src/composable/conditionalorder.spec.ts create mode 100644 src/composable/conditionalorder.ts create mode 100644 src/composable/extensible.ts create mode 100644 src/composable/index.ts create mode 100644 src/composable/multiplexer.spec.ts create mode 100644 src/composable/multiplexer.ts create mode 100644 src/composable/types/index.ts create mode 100644 src/composable/types/twap.spec.ts create mode 100644 src/composable/types/twap.ts diff --git a/src/composable/conditionalorder.spec.ts b/src/composable/conditionalorder.spec.ts new file mode 100644 index 00000000..3c4080b0 --- /dev/null +++ b/src/composable/conditionalorder.spec.ts @@ -0,0 +1,109 @@ +import { BigNumber } from 'ethers' +import { BaseConditionalOrder } from './conditionalorder' +import { TWAP } from './types/twap' + +const TWAP_SERIALIZED = (salt?: string, handler?: string): string => { + return ( + '0x' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '000000000000000000000000' + + (handler?.substring(2) ?? '910d00a310f7dc5b29fe73458f47f519be547d3d') + + (salt?.substring(2) ?? '9379a0bf532ff9a66ffde940f94b1a025d6f18803054c1aef52dc94b15255bbe') + + '0000000000000000000000000000000000000000000000000000000000000060' + + '0000000000000000000000000000000000000000000000000000000000000140' + + '0000000000000000000000006810e776880c02933d47db1b9fc05908e5386b96' + + '000000000000000000000000dae5f1590db13e3b40423b5b5c5fbf175515910b' + + '000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' + + '000000000000000000000000000000000000000000000000016345785d8a0000' + + '000000000000000000000000000000000000000000000000016345785d8a0000' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '000000000000000000000000000000000000000000000000000000000000000a' + + '0000000000000000000000000000000000000000000000000000000000000e10' + + '0000000000000000000000000000000000000000000000000000000000000000' + + 'd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5' + ) +} + +describe('ConditionalOrder', () => { + test('Create: constructor fails if invalid params', () => { + // bad address + expect(() => new TestConditionalOrder('0xdeadbeef')).toThrow('Invalid handler: 0xdeadbeef') + // bad salt + + expect(() => new TestConditionalOrder('0x910d00a310f7Dc5B29FE73458F47f519be547D3d', 'cowtomoon')).toThrow( + 'Invalid salt: cowtomoon' + ) + expect(() => new TestConditionalOrder('0x910d00a310f7Dc5B29FE73458F47f519be547D3d', '0xdeadbeef')).toThrow( + 'Invalid salt: 0xdeadbeef' + ) + expect( + () => + new TestConditionalOrder( + '0x910d00a310f7Dc5B29FE73458F47f519be547D3d', + '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef' + ) + ).toThrow( + 'Invalid salt: 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef' + ) + }) + + test('Serialize: Fails if invalid params', () => { + const order = new TestConditionalOrder('0x910d00a310f7Dc5B29FE73458F47f519be547D3d') + expect(() => order.testEncodeStaticInput()).toThrow('SerializationFailed') + expect(() => BaseConditionalOrder.encodeParams({ handler: '0xdeadbeef', salt: '0x', staticInput: '0x' })).toThrow( + 'SerializationFailed' + ) + }) + + test('id: Returns correct id', () => { + const order = new TestConditionalOrder( + '0x910d00a310f7Dc5B29FE73458F47f519be547D3d', + '0x9379a0bf532ff9a66ffde940f94b1a025d6f18803054c1aef52dc94b15255bbe' + ) + expect(order.id).toEqual('0x88ca0698d8c5500b31015d84fa0166272e1812320d9af8b60e29ae00153363b3') + }) + + test('leafToId: Returns correct id', () => { + const order = new TestConditionalOrder( + '0x910d00a310f7Dc5B29FE73458F47f519be547D3d', + '0x9379a0bf532ff9a66ffde940f94b1a025d6f18803054c1aef52dc94b15255bbe' + ) + expect(BaseConditionalOrder.leafToId(order.leaf)).toEqual( + '0x88ca0698d8c5500b31015d84fa0166272e1812320d9af8b60e29ae00153363b3' + ) + }) + + test('Deserialize: Fails if handler mismatch', () => { + expect(() => TWAP.deserialize(TWAP_SERIALIZED(undefined, '0x9008D19f58AAbD9eD0D60971565AA8510560ab41'))).toThrow( + 'HandlerMismatch' + ) + }) +}) + +class TestConditionalOrder extends BaseConditionalOrder { + constructor(address: string, salt?: string, staticInput = '0x') { + super(address, salt, staticInput) + } + + get orderType(): string { + return 'TEST' + } + + encodeStaticInput(): string { + return this.staticInput + } + + testEncodeStaticInput(): string { + return super.encodeStaticInputHelper(['uint256'], this.staticInput) + } + + isValid(o: any): boolean { + throw new Error('Method not implemented.') + } + serialize(): string { + return BaseConditionalOrder.encodeParams(this.leaf) + } + toString(_tokenFormatter?: (address: string, amount: BigNumber) => string): string { + throw new Error('Method not implemented.') + } +} diff --git a/src/composable/conditionalorder.ts b/src/composable/conditionalorder.ts new file mode 100644 index 00000000..fb2673eb --- /dev/null +++ b/src/composable/conditionalorder.ts @@ -0,0 +1,253 @@ +import { BigNumber, ethers, utils } from 'ethers' +import { ContextFactory } from './multiplexer' +import { keccak256 } from 'ethers/lib/utils' + +// Define the ABI tuple for the TWAPData struct +export const CONDITIONAL_ORDER_PARAMS_ABI = ['tuple(address handler, bytes32 salt, bytes staticInput)'] + +export type ConditionalOrderParams = { + readonly handler: string + readonly salt: string + readonly staticInput: string +} + +/** + * An abstract base class from which all conditional orders should inherit. + * + * This class provides some basic functionality to help with handling conditional orders, + * such as: + * - Validating the conditional order + * - Creating a human-readable string representation of the conditional order + * - Serializing the conditional order for use with the `IConditionalOrder` struct + * - Getting any dependencies for the conditional order + * - Getting the off-chain input for the conditional order + * + * **NOTE**: Instances of conditional orders have an `id` property that is a `keccak256` hash of + * the serialized conditional order. + */ +export abstract class BaseConditionalOrder { + public readonly handler: string + public readonly salt: string + public readonly staticInput: T + public readonly hasOffChainInput: boolean + + /** + * A constructor that provides some basic validation for the conditional order. + * + * This constructor **MUST** be called by any class that inherits from `BaseConditionalOrder`. + * + * **NOTE**: The salt is optional and will be randomly generated if not provided. + * @param handler The address of the handler for the conditional order. + * @param salt A 32-byte string used to salt the conditional order. + * @param staticInput The static input for the conditional order. + * @param hasOffChainInput Whether the conditional order has off-chain input. + * @throws If the handler is not a valid ethereum address. + * @throws If the salt is not a valid 32-byte string. + */ + constructor( + handler: string, + salt: string = keccak256(ethers.utils.randomBytes(32)), + staticInput: P, + hasOffChainInput = false + ) { + // Verify input to the constructor + // 1. Verify that the handler is a valid ethereum address + if (!ethers.utils.isAddress(handler)) { + throw new Error(`Invalid handler: ${handler}`) + } + + // 2. Verify that the salt is a valid 32-byte string usable with ethers + if (!ethers.utils.isHexString(salt) || ethers.utils.hexDataLength(salt) !== 32) { + throw new Error(`Invalid salt: ${salt}`) + } + + this.handler = handler + this.salt = salt + this.staticInput = this.transformParamsToData(staticInput) + this.hasOffChainInput = hasOffChainInput + } + + /** + * Get the concrete type of the conditional order. + * @returns {string} The concrete type of the conditional order. + */ + abstract get orderType(): string + + /** + * Get the context dependency for the conditional order. + * + * This is used when calling `createWithContext` or `setRootWithContext` on a ComposableCoW-enabled Safe. + * @returns The context dependency. + */ + get context(): ContextFactory | undefined { + return undefined + } + + /** + * Calculate the id of the conditional order. + * + * This is a `keccak256` hash of the serialized conditional order. + * @returns The id of the conditional order. + */ + get id(): string { + return utils.keccak256(this.serialize()) + } + + /** + * Get the `leaf` of the conditional order. This is the data that is used to create the merkle tree. + * + * For the purposes of this library, the `leaf` is the `ConditionalOrderParams` struct. + * @returns The `leaf` of the conditional order. + * @see ConditionalOrderParams + */ + get leaf(): ConditionalOrderParams { + return { + handler: this.handler, + salt: this.salt, + staticInput: this.encodeStaticInput(), + } + } + + /** + * Calculate the id of the conditional order. + * @param leaf The `leaf` representing the conditional order. + * @returns The id of the conditional order. + * @see ConditionalOrderParams + */ + static leafToId(leaf: ConditionalOrderParams): string { + return utils.keccak256(BaseConditionalOrder.encodeParams(leaf)) + } + + /** + * If the conditional order has off-chain input, return it! + * + * **NOTE**: This should be overridden by any conditional order that has off-chain input. + * @returns The off-chain input. + */ + get offChainInput(): string { + return '0x' + } + + /** + * Helper method for validating ABI types. + * @param types ABI types to validate against. + * @param values The values to validate. + * @returns {boolean} Whether the values are valid ABI for the given types. + */ + protected static isValidAbi(types: readonly (string | ethers.utils.ParamType)[], values: any[]): boolean { + try { + ethers.utils.defaultAbiCoder.encode(types, values) + } catch (e) { + return false + } + return true + } + + /** + * Create a human-readable string representation of the conditional order. + * @param tokenFormatter An optional function that takes an address and an amount and returns a human-readable string. + */ + abstract toString(tokenFormatter?: (address: string, amount: BigNumber) => string): string + + /** + * Serializes the conditional order into it's ABI-encoded form. + * + * @returns The equivalent of `IConditionalOrder.Params` for the conditional order. + */ + abstract serialize(): string + + /** + * Encode the `staticInput` for the conditional order. + * @returns The ABI-encoded `staticInput` for the conditional order. + * @see ConditionalOrderParams + */ + abstract encodeStaticInput(): string + + /** + * A helper function for generically serializing a conditional order's static input. + * @param orderDataTypes ABI types for the order's data struct. + * @param staticInput The order's data struct. + * @returns An ABI-encoded representation of the order's data struct. + */ + protected encodeStaticInputHelper(orderDataTypes: string[], staticInput: T): string { + try { + return utils.defaultAbiCoder.encode(orderDataTypes, [staticInput]) + } catch (e) { + throw new Error('SerializationFailed') + } + } + + /** + * Apply any transformations to the parameters that are passed in to the constructor. + * + * **NOTE**: This should be overridden by any conditional order that requires transformations. + * This implementation is a no-op. + * @param params {P} Parameters that are passed in to the constructor. + * @returns {T} The static input for the conditional order. + */ + protected transformParamsToData(params: P): T { + return params as unknown as T + } + + /** + * Encode the `ConditionalOrderParams` for the conditional order. + * @param leaf The `ConditionalOrderParams` struct representing the conditional order as taken from a merkle tree. + * @returns The ABI-encoded conditional order. + * @see ConditionalOrderParams + */ + static encodeParams(leaf: ConditionalOrderParams): string { + try { + return utils.defaultAbiCoder.encode(CONDITIONAL_ORDER_PARAMS_ABI, [leaf]) + } catch (e) { + throw new Error('SerializationFailed') + } + } + + /** + * Decode the `ConditionalOrderParams` for the conditional order. + * @param encoded The encoded conditional order. + * @returns The decoded conditional order. + */ + static decodeParams(encoded: string): ConditionalOrderParams { + try { + return utils.defaultAbiCoder.decode(CONDITIONAL_ORDER_PARAMS_ABI, encoded)[0] + } catch (e) { + throw new Error('DeserializationFailed') + } + } + + /** + * A helper function for generically deserializing a conditional order. + * @param s The ABI-encoded `IConditionalOrder.Params` struct to deserialize. + * @param handler Address of the handler for the conditional order. + * @param orderDataTypes ABI types for the order's data struct. + * @param callback A callback function that takes the deserialized data struct and the salt and returns an instance of the class. + * @returns An instance of the conditional order class. + */ + protected static deserializeHelper( + s: string, + handler: string, + orderDataTypes: string[], + callback: (d: any, salt: string) => T + ): T { + try { + // First, decode the `IConditionalOrder.Params` struct + const { handler: recoveredHandler, salt, staticInput } = BaseConditionalOrder.decodeParams(s) + + // Second, verify that the recovered handler is the correct handler + if (!(recoveredHandler == handler)) throw new Error('HandlerMismatch') + + // Third, decode the data struct + const [d] = utils.defaultAbiCoder.decode(orderDataTypes, staticInput) + + // Create a new instance of the class + return callback(d, salt) + } catch (e: any) { + if (e.message === 'HandlerMismatch') { + throw e + } else { + throw new Error('InvalidSerializedConditionalOrder') + } + } + } +} diff --git a/src/composable/extensible.ts b/src/composable/extensible.ts new file mode 100644 index 00000000..e55aa2f0 --- /dev/null +++ b/src/composable/extensible.ts @@ -0,0 +1,35 @@ +import { providers } from 'ethers' +import { + COMPOSABLE_COW_CONTRACT_ADDRESS, + EXTENSIBLE_FALLBACK_HANDLER_CONTRACT_ADDRESS, + SupportedChainId, +} from '../common' +import { ExtensibleFallbackHandler__factory } from './generated' + +export function isExtensibleFallbackHandler(handler: string, chainId: SupportedChainId): boolean { + return handler === EXTENSIBLE_FALLBACK_HANDLER_CONTRACT_ADDRESS[chainId] +} + +export function isComposableCow(handler: string, chainId: SupportedChainId): boolean { + return handler === COMPOSABLE_COW_CONTRACT_ADDRESS[chainId] +} + +export async function getDomainVerifier( + safe: string, + domain: string, + chainId: SupportedChainId, + provider: providers.Provider +): Promise { + const contract = ExtensibleFallbackHandler__factory.connect( + EXTENSIBLE_FALLBACK_HANDLER_CONTRACT_ADDRESS[chainId], + provider + ) + return await contract.callStatic.domainVerifiers(safe, domain) +} + +export function createSetDomainVerifierTx(domain: string, verifier: string): string { + return ExtensibleFallbackHandler__factory.createInterface().encodeFunctionData('setDomainVerifier', [ + domain, + verifier, + ]) +} diff --git a/src/composable/index.ts b/src/composable/index.ts new file mode 100644 index 00000000..78be3e9e --- /dev/null +++ b/src/composable/index.ts @@ -0,0 +1,5 @@ +export * from './extensible' +export * from './multiplexer' +export * from './conditionalorder' +// export * from './generated' +export * from './types' diff --git a/src/composable/multiplexer.spec.ts b/src/composable/multiplexer.spec.ts new file mode 100644 index 00000000..79592749 --- /dev/null +++ b/src/composable/multiplexer.spec.ts @@ -0,0 +1,286 @@ +import { TWAP } from './types/twap' +import { TWAP_PARAMS_TEST, generateRandomTWAPData } from './types/twap.spec' +import { Multiplexer, Orders, ProofLocation } from './multiplexer' +import { SupportedChainId } from '../common' +import { ComposableCoW__factory } from './generated' + +describe('Multiplexer (ComposableCoW)', () => { + beforeEach(() => { + // Register the TWAP handler + Multiplexer.registerOrderType('TWAP', TWAP) + }) + + afterEach(() => { + jest.restoreAllMocks() + }) + + test('constructor: can create a new multiplexer', () => { + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + expect(m).toBeDefined() + }) + + test('constructor: orders cannot have non-zero length', () => { + expect(() => { + new Multiplexer(SupportedChainId.GNOSIS_CHAIN, {} as Orders) + }).toThrow('orders must have non-zero length') + }) + + test('constructor: cannot have undefined root for orders', () => { + expect(() => { + const twap = TWAP.default(generateRandomTWAPData()) + + new Multiplexer(SupportedChainId.GNOSIS_CHAIN, { [twap.id]: twap }) + }).toThrow('orders cannot have undefined root') + }) + + test('constructor: order types must be registered', () => { + Multiplexer.resetOrderTypeRegistry() + + const twap = TWAP.default(generateRandomTWAPData()) + expect(() => { + new Multiplexer(SupportedChainId.GNOSIS_CHAIN, { [twap.id]: twap }, '0x1234') + }).toThrow(`Unknown order type: ${twap.orderType}`) + }) + + test('constructor: orders must have valid root supplied', () => { + expect(() => { + const twap = TWAP.default(generateRandomTWAPData()) + + new Multiplexer(SupportedChainId.GNOSIS_CHAIN, { [twap.id]: twap }, '0x1234') + }).toThrow('root mismatch') + }) + + test('crud: can add, remove, update, and get orders', () => { + // Create a new multiplexer, add a TWAP order + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + const twap = TWAP.default(generateRandomTWAPData()) + m.add(twap) + + // Get the order by id + const order = m.getById(twap.id) + expect(order).toBeDefined() + expect(order).toEqual(twap) + + // Get the order by index + const order2 = m.getByIndex(0) + expect(order2).toBeDefined() + expect(order2).toEqual(twap) + + // Create another random TWAP order + const twap2 = TWAP.default(generateRandomTWAPData()) + m.add(twap2) + + // Confirm that the multiplexer has two orders + expect(m.orderIds.length).toEqual(2) + + // Out of curiosity, get the root + const root = m.root + + // Remove the first order + m.remove(twap.id) + + // Confirm that the multiplexer has one order + expect(m.orderIds.length).toEqual(1) + + // Update the second order, in that we'll just replace it with the first order + m.update(twap2.id, (_o) => twap) + + // Confirm that the multiplexer has one order + expect(m.orderIds.length).toEqual(1) + + // Confirm that the root has changed + expect(m.root).not.toEqual(root) + + // Get the order by id + const order3 = m.getById(twap.id) + expect(order3).toBeDefined() + expect(order3).toEqual(twap) + }) + + test('serde(toJSON): can serialize to JSON', () => { + // Create a new multiplexer, add a TWAP order + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + const twap = TWAP.default(generateRandomTWAPData()) + m.add(twap) + + // Serialize the multiplexer + const serialized = m.toJSON() + expect(serialized).toBeDefined() + + // Try to serialize again (check for side-effects) + const serialized2 = m.toJSON() + expect(serialized2).toBeDefined() + expect(serialized2).toEqual(serialized) + }) + + test('serde(fromJSON): enforce order types are registered', () => { + // Create a new multiplexer, add a TWAP order + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + const twap = TWAP.default(generateRandomTWAPData()) + m.add(twap) + + // Serialize the multiplexer + const serialized = m.toJSON() + + // Reset the registered order types + Multiplexer.resetOrderTypeRegistry() + + // Try to deserialize the multiplexer + expect(() => { + Multiplexer.fromJSON(serialized) + }).toThrow('Unknown order type: TWAP') + }) + + test('serde(toJSON/fromJSON): can serialize and deserialize', () => { + // Create a new multiplexer, add a TWAP order + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + + // generate `n` random TWAP orders + for (let i = 0; i < 10; i++) { + m.add(TWAP.default(generateRandomTWAPData())) + } + + // Generate a random index to get an order from the multiplexer + const index = Math.floor(Math.random() * 10) + + // Get an order from the multiplexer + const orderBefore = m.getByIndex(index) + const orderId = orderBefore.id + + // Serialize the multiplexer + const serialized = m.toJSON() + + // Deserialize the multiplexer + const m2 = Multiplexer.fromJSON(serialized) + + // Get an order from the deserialized multiplexer + const orderAfter = m2.getById(orderId) + + // Compare the two orders + expect(orderBefore).toEqual(orderAfter) + }) + + test('serde(dumpProofs/decodeFromJSON): can serialize and deserialize', () => { + // Create a new multiplexer, add a TWAP order + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + + // generate `n` random TWAP orders + for (let i = 0; i < 10; i++) { + m.add(TWAP.default(generateRandomTWAPData())) + } + + // Generate a random index to get an order from the multiplexer + const index = Math.floor(Math.random() * 10) + + // Get an order from the multiplexer + const orderBefore = m.getByIndex(index) + // get the leaf + const leaf = orderBefore.leaf + + const filter = (v: string[]) => { + const { handler, salt, staticInput } = leaf + return !(handler === v[0] && salt === v[1] && staticInput === v[2]) + } + + const badFilter = (_v: string[]) => { + m.add(TWAP.default(generateRandomTWAPData())) + return true + } + + // Guard against the filter modifying the multiplexer state + expect(() => { + m.dumpProofs(badFilter) + }).toThrow('Merkle tree not generated') + + // Dump the proofs + const serialized = m.dumpProofs(filter) + const unserialized = m.dumpProofsAndParams(filter) + + // Deserialize the proofs + const artifact = Multiplexer.decodeFromJSON(serialized) + + expect(artifact).toEqual(unserialized) + + // The artifact should not contain the leaf + artifact.forEach((v) => { + expect(v.params).not.toEqual(leaf) + }) + }) + + test('prepareProofStruct: can prepare a proof struct', async () => { + // Create a new multiplexer, add a TWAP order + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + + // generate `n` random TWAP orders + for (let i = 0; i < 10; i++) { + m.add(TWAP.default(generateRandomTWAPData())) + } + + const proofStruct = await m.prepareProofStruct() + + // use the typechain generated interface to see if the proof struct is valid + // by generating calldata for `setRoot`. + + const calldata = ComposableCoW__factory.createInterface().encodeFunctionData('setRoot', [m.root, proofStruct]) + }) + + test('prepareProofStruct: emits when location set to emitted', async () => { + // Create a new multiplexer, add the standard TWAP order + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + const twap = TWAP.default(TWAP_PARAMS_TEST) + m.add(twap) + + const proofStruct = await m.prepareProofStruct(ProofLocation.EMITTED) + + // use the typechain generated interface to see if the proof struct is valid + // by generating calldata for `setRoot`. + + const calldata = ComposableCoW__factory.createInterface().encodeFunctionData('setRoot', [m.root, proofStruct]) + }) + + test('prepareProofStruct: throws on invalid location', async () => { + // Create a new multiplexer, add the standard TWAP order + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + const twap = TWAP.default(TWAP_PARAMS_TEST) + m.add(twap) + + await expect(m.prepareProofStruct(ProofLocation.EMITTED + 100)).rejects.toThrow('Unsupported location') + }) + + test('prepareProofStruct: uploader', async () => { + // Create a new multiplexer, add the standard TWAP order + const m = new Multiplexer(SupportedChainId.GNOSIS_CHAIN) + const twap = TWAP.default(TWAP_PARAMS_TEST) + m.add(twap) + + try { + await m.prepareProofStruct(ProofLocation.SWARM) + } catch (e) { + expect(e.message).toMatch('Error preparing proof struct: Error: Must provide an uploader function') + } + + // define an async upload function + const upload = async (_data: string): Promise => { + return 'baddata' + } + + try { + await m.prepareProofStruct(ProofLocation.SWARM, undefined, upload) + } catch (e) { + expect(e.message).toMatch('Error preparing proof struct: Error: data returned by uploader is invalid') + } + + // define an upload function that throws an error + const upload2 = async (_data: string): Promise => { + throw new Error('bad') + } + + try { + await m.prepareProofStruct(ProofLocation.IPFS, undefined, upload2) + } catch (e) { + expect(e.message).toMatch( + 'Error preparing proof struct: Error: Error uploading to decentralized storage 5: Error: bad' + ) + } + }) +}) diff --git a/src/composable/multiplexer.ts b/src/composable/multiplexer.ts new file mode 100644 index 00000000..a4245e55 --- /dev/null +++ b/src/composable/multiplexer.ts @@ -0,0 +1,532 @@ +import { StandardMerkleTree } from '@openzeppelin/merkle-tree' +import { BigNumber, providers, utils } from 'ethers' + +import { COMPOSABLE_COW_CONTRACT_ADDRESS, SupportedChainId } from '../common' +import { BaseConditionalOrder, ConditionalOrderParams } from './conditionalorder' + +import { ComposableCoW__factory } from './generated' +import { ComposableCoW, GPv2Order } from './generated/ComposableCoW' + +const CONDITIONAL_ORDER_LEAF_ABI = ['address', 'bytes32', 'bytes'] + +const PAYLOAD_EMITTED_ABI = ['tuple(bytes32[] proof, tuple(address handler, bytes32 salt, bytes staticInput) params)[]'] + +export type Orders = Record> + +export enum ProofLocation { + // The location of the proofs is private to the caller. + PRIVATE = 0, + // The `data` field of the emitted `Proof` struct contains proofs + conditional order parameters. + EMITTED = 1, + // The `data` field of the emitted `Proof` struct contains the Swarm address (`bytes32`) of the proofs + conditional order parameters. + SWARM = 2, + // The `data` field is set to TBD. + WAKU = 3, + // The `data` field is set to TBD + RESERVED = 4, + // The `data` field of the emitted `Proof` struct contains the IPFS address (`bytes32`) of the proofs + conditional order parameters. + IPFS = 5, +} + +/** + * A factory and it's arguments that are called at transaction mining time to generate the context + * for a conditional order(s). + * + * This allows to support the case where conditional orders may want to *commence* validity at the + * time of transaction mining, like in the case of a `TWAP` executed by a DAO or `Safe` that takes + * a reasonable amount of time to aggregate signatures or collect votes. + * + * @remarks This is used in conjunction with `setRootWithContext` or `createWithContext`. + */ +export type ContextFactory = { + // The address of the `IValueFactory` that will be used to resolve the context. + address: string + // Any arguments that will be passed to the `IValueFactory` to resolve the context. + factoryArgs?: { + args: any[] + argsType: string[] + } +} + +/** + * A struct for a proof that can be used with `setRoot` and `setRootWithContext` on a + * ComposableCoW-enabled Safe. + */ +export type ProofStruct = { + // The location of the proof. + location: ProofLocation + // The data for the proof. + data: string | '0x' +} + +/** + * Payload for emitting a merkle root to a ComposableCoW-enabled Safe. + * + * If setting `ProofLocation.EMITTED`, this type should be used as the `data` in the `Proof` struct. + */ +export type PayloadLocationEmitted = { + // An array of conditional orders and their proofs. + proofs: ProofWithParams[] +} + +/** + * A proof for a conditional order and it's parameters. + */ +export type ProofWithParams = { + // The proof for the Merkle tree that contains the conditional order. + proof: string[] + // The parameters as expected by ABI encoding. + params: ConditionalOrderParams +} + +/** + * Multiplexer for conditional orders - using `ComposableCoW`! + * + * This class provides functionality to: + * - Generate a merkle tree of conditional orders + * - Generate proofs for all orders in the merkle tree + * - Save proofs, with the ability to omit / skip specific conditional orders + * - Support for passing an optional upload function to upload the proofs to a decentralized storage network + */ +export class Multiplexer { + static orderTypeRegistry: Record BaseConditionalOrder> = {} + + public chain: SupportedChainId + public location: ProofLocation + + private orders: Orders = {} + private tree?: StandardMerkleTree + private ctx?: string + + /** + * @param chain The `chainId` for where we're using `ComposableCoW`. + * @param orders An optional array of conditional orders to initialize the merkle tree with. + * @param root An optional root to verify against. + * @param location The location of the proofs for the conditional orders. + */ + constructor( + chain: SupportedChainId, + orders?: Orders, + root?: string, + location: ProofLocation = ProofLocation.PRIVATE + ) { + this.chain = chain + this.location = location + + // If orders are provided, the length must be > 0 + if (orders && Object.keys(orders).length === 0) { + throw new Error('orders must have non-zero length') + } + + // If orders are provided, so must a root, and vice versa + if ((orders && !root) || (!orders && root)) { + throw new Error('orders cannot have undefined root') + } + + // can only proceed past here if both orders and root are provided, or neither are + + // validate that no unknown order types are provided + for (const orderKey in orders) { + if (orders.hasOwnProperty(orderKey)) { + const order = orders[orderKey] + if (!Multiplexer.orderTypeRegistry.hasOwnProperty(order.orderType)) { + throw new Error(`Unknown order type: ${order.orderType}`) + } + } + } + + // If orders (and therefore the root) are provided, generate the merkle tree + if (orders) { + this.orders = orders + this.generate() + + // if generate was successful, this.tree will be defined and we can verify the root + if (this.tree && this.tree.root !== root) { + throw new Error('root mismatch') + } + } + } + + // --- user facing serialization methods --- + + /** + * Given a serialized multiplexer, create the multiplexer and rehydrate all conditional orders. + * Integrity of the multiplexer will be verified by generating the merkle tree and verifying + * the root. + * + * **NOTE**: Before using this method, you must register all conditional order types using `Multiplexer.registerOrderType`. + * @param s The serialized multiplexer. + * @returns The multiplexer with all conditional orders rehydrated. + * @throws If the multiplexer cannot be deserialized. + * @throws If the merkle tree cannot be generated. + * @throws If the merkle tree cannot be verified against the root. + */ + static fromJSON(s: string): Multiplexer { + // reviver function to deserialize the orders + const reviver = (k: string, v: any) => { + if (k === 'orders' && typeof v === 'object' && v !== null) { + const orders: Orders = {} + + for (const orderKey in v) { + if (v.hasOwnProperty(orderKey)) { + const { orderType, ...orderData } = v[orderKey] + + if (Multiplexer.orderTypeRegistry.hasOwnProperty(orderType)) { + const OrderConstructor = Multiplexer.orderTypeRegistry[orderType] + const orderArgs = Object.values(orderData) + orders[orderKey] = new OrderConstructor(...orderArgs) + } else { + throw new Error(`Unknown order type: ${orderType}`) + } + } + } + + return orders + } + + // Make sure we deserialize `BigNumber` correctly + if (typeof v === 'object' && v !== null && v.hasOwnProperty('type') && v.hasOwnProperty('hex')) { + if (v.type === 'BigNumber') { + return BigNumber.from(v) + } + } + + return v + } + + const { chain, orders, root, location } = JSON.parse(s, reviver) + const m = new Multiplexer(chain, orders, root) + m.location = location + return m + } + + /** + * Serialize the multiplexer to JSON. + * + * This will include all state necessary to reconstruct the multiplexer, including the root. + * @remarks This will **NOT** include the merkle tree. + * @returns The JSON representation of the multiplexer, including the root but excluding the merkle tree. + */ + toJSON(): string { + // Make sure the merkle tree is generated + if (!this.tree) { + // If the merkle tree doesn't generate, it will throw + this.generate() + } + + // serialize the multiplexer, including the root but excluding the merkle tree. + // use a non-null assertion because we know the merkle tree is defined + return JSON.stringify({ ...this, root: this.tree!.root }, (k, v) => { + // filter out the merkle tree + if (k === 'tree') return undefined + if (typeof v === 'object' && v !== null && 'orderType' in v) { + const conditionalOrder = v as BaseConditionalOrder + return { + ...conditionalOrder, + orderType: conditionalOrder.orderType, + } + } + // We do not do any custom serialization of `BigNumber` in order to preserve it's type. + return v + }) + } + + // --- crud methods --- + + /** + * Add a conditional order to the merkle tree. + * @param order The order to add to the merkle tree. + */ + add(order: BaseConditionalOrder): void { + this.orders[order.id] = order + this.reset() + } + + /** + * Remove a conditional order from the merkle tree. + * @param id The id of the `BaseConditionalOrder` to remove from the merkle tree. + */ + remove(id: string): void { + delete this.orders[id] + this.reset() + } + + /** + * Update a given conditional order in the merkle tree. + * @param id The id of the `BaseConditionalOrder` to update. + * @param updater A function that takes the existing `BaseConditionalOrder` and context, returning an updated `BaseConditionalOrder`. + */ + update( + id: string, + updater: (order: BaseConditionalOrder, ctx?: string) => BaseConditionalOrder + ): void { + // copy the existing order and update it, given the existing context (if any) + const order = updater(this.orders[id], this.ctx) + // delete the existing order + delete this.orders[id] + + // add the updated order + this.orders[order.id] = order + this.reset() + } + + // --- accessors --- + + /** + * Accessor for a given conditional order in the multiplexer. + * @param id The `id` of the `BaseConditionalOrder` to retrieve. + * @returns A `BaseConditionalOrder` with the given `id`. + */ + getById(id: string): BaseConditionalOrder { + return this.orders[id] + } + + /** + * Accessor for a given conditional order in the multiplexer. + * @param i The index of the `BaseConditionalOrder` to retrieve. + * @returns A `BaseConditionalOrder` at the given index. + */ + getByIndex(i: number): BaseConditionalOrder { + return this.orders[this.orderIds[i]] + } + + /** + * Get all the conditional order ids in the multiplexer. + */ + get orderIds(): string[] { + return Object.keys(this.orders) + } + + get root(): string { + if (!this.tree) { + // If the merkle tree doesn't generate, it will throw + this.generate() + } + + // use a non-null assertion because we know the merkle tree is defined + return this.tree!.root + } + + /** + * Generate the merkle tree for the current set of conditional orders. + * + * **CAUTION**: This will overwrite any existing merkle tree. This operation is expensive and should only be done when necessary. + * @throws If the merkle tree cannot be generated. + */ + private generate(): void { + this.tree = StandardMerkleTree.of( + Object.values(this.orders).map((order) => [...Object.values(order.leaf)]), + CONDITIONAL_ORDER_LEAF_ABI + ) + } + + // --- serialization for watchtowers / indexers --- + + /** + * The primary method for watch towers to use when deserializing the proofs and parameters for the conditional orders. + * @param s The serialized proofs with parameters for consumption by watchtowers / indexers. + * @returns The `ProofWithParams` array. + * @throws If the `ProofWithParams` array cannot be deserialized. + */ + static decodeFromJSON(s: string): ProofWithParams[] { + // no need to rehydrate `BigNumber` as this is fully ABI encoded + return JSON.parse(s) + } + + /** + * The primary entry point for dapps integrating with `ComposableCoW` to generate the proofs and + * parameters for the conditional orders. + * + * After populating the multiplexer with conditional orders, this method can be used to generate + * the proofs and parameters for the conditional orders. The returned `ProofStruct` can then be + * used with `setRoot` or `setRootWithContext` on a `ComposableCoW`-enabled Safe. + * + * @param filter {@link getProofs} + * @parma locFn A function that takes the off-chain encoded input, and returns the `location` + * for the `ProofStruct`, and the `data` for the `ProofStruct`. + * @returns The ABI-encoded `ProofStruct` for `setRoot` and `setRootWithContext`. + */ + async prepareProofStruct( + location: ProofLocation = this.location, + filter?: (v: string[]) => boolean, + uploader?: (offChainEncoded: string) => Promise + ): Promise { + if (!this.tree) { + // If the merkle tree doesn't generate, it will throw + this.generate() + } + + const data = async (): Promise => { + switch (location) { + case ProofLocation.PRIVATE: + return '0x' + case ProofLocation.EMITTED: + return this.encodeToABI(filter) + case ProofLocation.SWARM: + case ProofLocation.WAKU: + case ProofLocation.IPFS: + if (!uploader) throw new Error('Must provide an uploader function') + try { + return await uploader(this.encodeToJSON(filter)) + } catch (e) { + throw new Error(`Error uploading to decentralized storage ${location}: ${e}`) + } + default: + throw new Error('Unsupported location') + } + } + + return await data() + .then((d) => { + try { + // validate that `d` is a valid `bytes` ready to be abi-encoded + utils.hexlify(utils.arrayify(d)) + + // if we get here, we have a valid `data` field for the `ProofStruct` + // This means that if there was an upload function, it was called and the upload was successful + // note: we don't check if the location has changed because we don't care + this.location = location + + return { + location, + data: d, + } + } catch (e) { + throw new Error(`data returned by uploader is invalid`) + } + }) + .catch((e) => { + throw new Error(`Error preparing proof struct: ${e}`) + }) + } + + /** + * Poll a conditional order to see if it is tradeable. + * @param owner The owner of the conditional order. + * @param p The proof and parameters. + * @param chain Which chain to use for the ComposableCoW contract. + * @param provider An RPC provider for the chain. + * @param offChainInputFn A function, if provided, that will return the off-chain input for the conditional order. + * @throws If the conditional order is not tradeable. + * @returns The tradeable `GPv2Order.Data` struct and the `signature` for the conditional order. + */ + static async poll( + owner: string, + p: ProofWithParams, + chain: SupportedChainId, + provider: providers.Provider, + offChainInputFn?: (owner: string, params: ConditionalOrderParams) => Promise + ): Promise<[GPv2Order.DataStructOutput, string]> { + const contract = ComposableCoW__factory.connect(COMPOSABLE_COW_CONTRACT_ADDRESS[chain], provider) + const offChainInput = offChainInputFn ? await offChainInputFn(owner, p.params) : '0x' + return await contract.getTradeableOrderWithSignature(owner, p.params, offChainInput, p.proof) + } + + /** + * The primary entry point for dumping the proofs and parameters for the conditional orders. + * + * This is to be used by watchtowers / indexers to store the proofs and parameters for the + * conditional orders off-chain. The encoding returned by this method may **NOT** contain all + * proofs and parameters, depending on the `filter` provided, and therefore should not be used + * to rehydrate the multiplexer from a user's perspective. + * @param filter {@link getProofs} + * @returns A JSON-encoded string of the proofs and parameters for the conditional orders. + */ + dumpProofs(filter?: (v: string[]) => boolean): string { + return this.encodeToJSON(filter) + } + + dumpProofsAndParams(filter?: (v: string[]) => boolean): ProofWithParams[] { + return this.getProofs(filter) + } + + /** + * Get the proofs with parameters for the conditional orders in the merkle tree. + * @param filter A function that takes a conditional order and returns a boolean indicating + * whether the order should be included in the proof. + * @returns An array of proofs and their order's parameters for the conditional orders in the + * merkle tree. + */ + private getProofs(filter?: (v: string[]) => boolean): ProofWithParams[] { + if (!this.tree) { + // If the merkle tree doesn't generate, it will throw + this.generate() + } + + // Get a list of all entry indices in the tree, excluding any that don't match the filter + // non-null assertion because we know the tree is defined + return [...this.tree!.entries()] + .map(([i, v]) => { + if ((filter && filter(v)) || filter === undefined) { + return { idx: i, value: v } + } else { + return undefined + } + }) + .reduce((acc: ProofWithParams[], x) => { + // guard against the tree not being defined + if (!this.tree) { + throw new Error('Merkle tree not generated') + } + + if (x) { + const p: ConditionalOrderParams = { + handler: x.value[0], + salt: x.value[1], + staticInput: x.value[2], + } + acc.push({ + proof: this.tree.getProof(x.idx), + params: p, + }) + } + return acc + }, []) + } + + /** + * ABI-encode the proofs and parameters for the conditional orders in the merkle tree. + * @param filter {@link getProofs} + * @returns ABI-encoded `data` for the `ProofStruct`. + */ + private encodeToABI(filter?: (v: string[]) => boolean): string { + return utils.defaultAbiCoder.encode(PAYLOAD_EMITTED_ABI, [this.getProofs(filter)]) + } + + /** + * JSON-encode the proofs and parameters for the conditional orders in the merkle tree. + * @param filter {@link getProofs} + * @returns The JSON-encoded data for storage off-chain. + */ + private encodeToJSON(filter?: (v: string[]) => boolean): string { + return JSON.stringify(this.getProofs(filter)) + } + + /** + * A helper to reset the merkle tree. + */ + private reset(): void { + this.tree = undefined + } + + /** + * Register a conditional order type with the multiplexer. + * + * **CAUTION**: This is required for using `Multiplexer.fromJSON` and `Multiplexer.toJSON`. + * @param orderType The order type to register. + * @param conditionalOrderClass The class to use for the given order type. + */ + public static registerOrderType( + orderType: string, + conditionalOrderClass: new (...args: any[]) => BaseConditionalOrder + ) { + Multiplexer.orderTypeRegistry[orderType] = conditionalOrderClass + } + + /** + * Reset the order type registry. + */ + public static resetOrderTypeRegistry() { + Multiplexer.orderTypeRegistry = {} + } +} diff --git a/src/composable/types/index.ts b/src/composable/types/index.ts new file mode 100644 index 00000000..22f9acdd --- /dev/null +++ b/src/composable/types/index.ts @@ -0,0 +1 @@ +export * from './twap' diff --git a/src/composable/types/twap.spec.ts b/src/composable/types/twap.spec.ts new file mode 100644 index 00000000..47e21369 --- /dev/null +++ b/src/composable/types/twap.spec.ts @@ -0,0 +1,117 @@ +import { TWAP, type TWAPDataParams } from './twap' +import { BigNumber, utils, constants } from 'ethers' + +export const TWAP_PARAMS_TEST: TWAPDataParams = { + sellToken: '0x6810e776880C02933D47DB1b9fc05908e5386b96', + buyToken: '0xDAE5F1590db13E3B40423B5b5c5fbf175515910b', + receiver: '0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF', + sellAmount: utils.parseEther('1'), + buyAmount: utils.parseEther('1'), + t: BigNumber.from(60 * 60), + n: BigNumber.from(10), + span: BigNumber.from(0), + t0: BigNumber.from(0), + appData: '0xd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5', +} + +export const TWAP_SERIALIZED = (salt?: string): string => { + return ( + '0x' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '000000000000000000000000910d00a310f7dc5b29fe73458f47f519be547d3d' + + (salt?.substring(2) ?? '9379a0bf532ff9a66ffde940f94b1a025d6f18803054c1aef52dc94b15255bbe') + + '0000000000000000000000000000000000000000000000000000000000000060' + + '0000000000000000000000000000000000000000000000000000000000000140' + + '0000000000000000000000006810e776880c02933d47db1b9fc05908e5386b96' + + '000000000000000000000000dae5f1590db13e3b40423b5b5c5fbf175515910b' + + '000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef' + + '000000000000000000000000000000000000000000000000016345785d8a0000' + + '000000000000000000000000000000000000000000000000016345785d8a0000' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '000000000000000000000000000000000000000000000000000000000000000a' + + '0000000000000000000000000000000000000000000000000000000000000e10' + + '0000000000000000000000000000000000000000000000000000000000000000' + + 'd51f28edffcaaa76be4a22f6375ad289272c037f3cc072345676e88d92ced8b5' + ) +} + +export function generateRandomTWAPData(): TWAPDataParams { + return { + sellToken: utils.getAddress(utils.hexlify(utils.randomBytes(20))), + buyToken: utils.getAddress(utils.hexlify(utils.randomBytes(20))), + receiver: constants.AddressZero, + sellAmount: utils.parseEther('1'), + buyAmount: utils.parseEther('1'), + t: BigNumber.from(60 * 60), + n: BigNumber.from(10), + span: BigNumber.from(0), + t0: BigNumber.from(0), + appData: utils.hexlify(utils.randomBytes(32)), + } +} + +describe('TWAP', () => { + test('Create: constructor creates valid TWAP', () => { + const twap = TWAP.default(TWAP_PARAMS_TEST) + expect(twap.orderType).toEqual('TWAP') + expect(twap.hasOffChainInput).toEqual(false) + expect(twap.offChainInput).toEqual('0x') + expect(twap.context?.address).not.toBeUndefined() + + const twap2 = TWAP.default({ ...TWAP_PARAMS_TEST, t0: BigNumber.from(1) }) + expect(twap2.context).toBeUndefined() + + expect(() => new TWAP('0xdeaddeaddeaddeaddeaddeaddeaddeaddeaddead', undefined, TWAP_PARAMS_TEST)).toThrow( + 'InvalidHandler' + ) + }) + + test('isValid: Validates TWAP params', () => { + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST })).not.toThrow() + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, sellToken: TWAP_PARAMS_TEST.buyToken })).toThrow( + 'InvalidSameToken' + ) + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, sellToken: constants.AddressZero })).toThrow('InvalidToken') + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, buyToken: constants.AddressZero })).toThrow('InvalidToken') + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, sellAmount: BigNumber.from(0) })).toThrow('InvalidSellAmount') + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, buyAmount: BigNumber.from(0) })).toThrow('InvalidMinBuyAmount') + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, t0: BigNumber.from(-1) })).toThrow('InvalidStartTime') + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, n: BigNumber.from(0) })).toThrow('InvalidNumParts') + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, t: BigNumber.from(0) })).toThrow('InvalidFrequency') + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, span: TWAP_PARAMS_TEST.t.add(1) })).toThrow('InvalidSpan') + }) + + test('isValidAbi: Fails if invalid', () => { + // The below test triggers a throw by trying to ABI parse `appData` as a `bytes32` when + // it only has 20 bytes (ie. an address) + expect(() => TWAP.default({ ...TWAP_PARAMS_TEST, appData: constants.AddressZero })).toThrow('InvalidData') + }) + + test('serialize: Serializes correctly', () => { + const twap = TWAP.default(TWAP_PARAMS_TEST) + expect(twap.serialize()).toEqual(TWAP_SERIALIZED(twap.salt)) + }) + + test('deserialize: Deserializes correctly', () => { + const twap = TWAP.default(TWAP_PARAMS_TEST) + expect(TWAP.deserialize(TWAP_SERIALIZED(twap.salt))).toMatchObject(twap) + }) + + test('deserialize: Throws if invalid', () => { + expect(() => TWAP.deserialize('0x')).toThrow('InvalidSerializedConditionalOrder') + }) + + test('toString: Formats correctly', () => { + expect(TWAP.default(TWAP_PARAMS_TEST).toString()).toEqual( + `TWAP: Sell total ${TWAP_PARAMS_TEST.sellToken}@${TWAP_PARAMS_TEST.sellAmount} for a minimum of ${TWAP_PARAMS_TEST.buyToken}@${TWAP_PARAMS_TEST.buyAmount} over ${TWAP_PARAMS_TEST.n} parts with a spacing of ${TWAP_PARAMS_TEST.t}s beginning at time of mining` + ) + const t0 = BigNumber.from(BigInt(Date.now()) / 1000n) + expect(TWAP.default({ ...TWAP_PARAMS_TEST, t0 }).toString()).toEqual( + `TWAP: Sell total ${TWAP_PARAMS_TEST.sellToken}@${TWAP_PARAMS_TEST.sellAmount} for a minimum of ${ + TWAP_PARAMS_TEST.buyToken + }@${TWAP_PARAMS_TEST.buyAmount} over ${TWAP_PARAMS_TEST.n} parts with a spacing of ${ + TWAP_PARAMS_TEST.t + }s beginning at ${new Date(Number(t0) * 1000)}` + ) + }) +}) diff --git a/src/composable/types/twap.ts b/src/composable/types/twap.ts new file mode 100644 index 00000000..1ed43a50 --- /dev/null +++ b/src/composable/types/twap.ts @@ -0,0 +1,244 @@ +import { BigNumber, constants, ethers, utils } from 'ethers' + +import { BaseConditionalOrder } from '../conditionalorder' +import { ContextFactory } from '../multiplexer' + +// The type of Conditional Order +const TWAP_ORDER_TYPE = 'TWAP' +// The address of the TWAP handler contract +export const TWAP_ADDRESS = '0x910d00a310f7Dc5B29FE73458F47f519be547D3d' +/** + * The address of the `CurrentBlockTimestampFactory` contract + * + * **NOTE**: This is used in the event that TWAP's have a `t0` of `0`. + */ +export const CURRENT_BLOCK_TIMESTAMP_FACTORY_ADDRESS = '0x0899c7DC280363d263Cc954506134F249CceC4a5' + +// Define the ABI tuple for the TWAPData struct +const TWAP_DATA_ABI = [ + 'tuple(address sellToken, address buyToken, address receiver, uint256 partSellAmount, uint256 minPartLimit, uint256 t0, uint256 n, uint256 t, uint256 span, bytes32 appData)', +] + +/** + * Parameters for a TWAP order, made a little more user-friendly for SDK users. + * @see {@link TWAPData} for the native struct. + */ +export type TWAPDataParams = Omit & { + // total amount of sellToken to sell across the entire TWAP + readonly sellAmount: BigNumber + // minimum amount of buyToken that must be bought across the entire TWAP + readonly buyAmount: BigNumber +} + +/** + * Parameters for a TWAP order, as expected by the contract's `staticInput`. + */ +export type TWAPData = { + // which token to sell + readonly sellToken: string + // which token to buy + readonly buyToken: string + // who to send the tokens to + readonly receiver: string + // amount of sellToken to sell in each part + readonly partSellAmount: BigNumber + // minimum amount of buyToken that must be bought in each part + readonly minPartLimit: BigNumber + // start time of the TWAP + readonly t0: BigNumber + // number of parts + readonly n: BigNumber + // duration of the TWAP interval + readonly t: BigNumber + // whether the TWAP is valid for the entire interval or not + readonly span: BigNumber + // appData + readonly appData: string +} + +/** + * `ComposableCoW` implementation of a TWAP order. + * @author mfw78 + */ +export class TWAP extends BaseConditionalOrder { + /** + * @see {@link BaseConditionalOrder.constructor} + * @throws If the TWAP order is invalid. + * @throws If the TWAP order is not ABI-encodable. + * @throws If the handler is not the TWAP address. + */ + constructor( + handler: string, + salt: string = utils.keccak256(ethers.utils.randomBytes(32)), + staticInput: TWAPDataParams, + hasOffChainInput = false + ) { + // First, verify that the handler is the TWAP address + if (handler !== TWAP_ADDRESS) throw new Error('InvalidHandler') + + // Second, verify that the order params are logically valid + TWAP.isValid(staticInput) + + // Third, construct the base class using transformed parameters + super(TWAP_ADDRESS, salt, staticInput, hasOffChainInput) + + // Finally, verify that the transformed data is ABI-encodable + if (!TWAP.isValidAbi(TWAP_DATA_ABI, [this.staticInput])) throw new Error('InvalidData') + } + + /** + * Create a TWAP order with sound defaults. + * @param staticInput The TWAP order parameters in a more user-friendly format. + * @returns An instance of the TWAP order. + */ + static default(staticInput: TWAPDataParams): BaseConditionalOrder { + return new TWAP(TWAP_ADDRESS, undefined, staticInput, false) + } + + /** + * Enforces that TWAPs will commence at the beginning of a block by use of the + * `CurrentBlockTimestampFactory` contract to provide the current block timestamp + * as the start time of the TWAP. + */ + get context(): ContextFactory | undefined { + if (this.staticInput.t0.gt(0)) { + return super.context + } else { + return { + address: CURRENT_BLOCK_TIMESTAMP_FACTORY_ADDRESS, + factoryArgs: undefined, + } + } + } + + /** + * @inheritdoc {@link BaseConditionalOrder.orderType} + */ + get orderType(): string { + return TWAP_ORDER_TYPE + } + + /** + * Validate the TWAP order. + * @param data The TWAP order to validate. + * @returns Whether the TWAP order is valid. + * @throws If the TWAP order is invalid. + * @see {@link TWAPData} for the native struct. + */ + static isValid(data: TWAPDataParams): boolean { + if (!(data.sellToken != data.buyToken)) throw new Error('InvalidSameToken') + if (!(data.sellToken != constants.AddressZero && data.buyToken != constants.AddressZero)) + throw new Error('InvalidToken') + if (!data.sellAmount.gt(0)) throw new Error('InvalidSellAmount') + if (!data.buyAmount.gt(0)) throw new Error('InvalidMinBuyAmount') + if (!(data.t0.gte(0) && data.t0.lt(2 ** 32))) throw new Error('InvalidStartTime') + if (!(data.n.gt(1) && data.n.lte(2 ** 32))) throw new Error('InvalidNumParts') + if (!(data.t.gt(0) && data.t.lte(365 * 24 * 60 * 60))) throw new Error('InvalidFrequency') + if (!data.span.lte(data.t)) throw new Error('InvalidSpan') + return true + } + + /** + * Serialize the TWAP order into it's ABI-encoded form. + * @returns {string} The ABI-encoded TWAP order. + */ + serialize(): string { + return BaseConditionalOrder.encodeParams(this.leaf) + } + + /** + * Get the encoded static input for the TWAP order. + * @returns {string} The ABI-encoded TWAP order. + */ + encodeStaticInput(): string { + return super.encodeStaticInputHelper(TWAP_DATA_ABI, this.staticInput) + } + + /** + * Deserialize a TWAP order from it's ABI-encoded form. + * @param {string} s ABI-encoded TWAP order to deserialize. + * @returns A deserialized TWAP order. + */ + static deserialize(s: string): TWAP { + return super.deserializeHelper( + s, + TWAP_ADDRESS, + TWAP_DATA_ABI, + (o: TWAPData, salt: string) => + new TWAP( + TWAP_ADDRESS, + salt, + { + ...o, + ...TWAP.partsToTotal(o), + }, + false + ) + ) + } + + /** + * Create a human-readable string representation of the TWAP order. + * @param {((address: string, amount: BigNumber) => string) | undefined} tokenFormatter An optional + * function that takes an address and an amount and returns a human-readable string. + * @returns {string} A human-readable string representation of the TWAP order. + */ + toString(tokenFormatter?: (address: string, amount: BigNumber) => string): string { + const defaultFormatter = (address: string, amount: BigNumber) => `${address}@${amount}` + tokenFormatter = tokenFormatter || defaultFormatter + + const { sellAmount, buyAmount } = TWAP.partsToTotal(this.staticInput) + + return `${this.orderType}: Sell total ${tokenFormatter( + this.staticInput.sellToken, + sellAmount + )} for a minimum of ${tokenFormatter(this.staticInput.buyToken, buyAmount)} over ${ + this.staticInput.n + } parts with a spacing of ${this.staticInput.t}s beginning at ${ + this.staticInput.t0.eq(0) ? 'time of mining' : new Date(Number(this.staticInput.t0) * 1000) + }` + } + + /** + * Transform parameters into a native struct. + * @param {TWAPDataParams} params As passed by the consumer of the API. + * @returns {TWAPData} A formatted struct as expected by the smart contract. + */ + transformParamsToData(params: TWAPDataParams): TWAPData { + return { + ...params, + ...TWAP.totalToPart(params), + } + } + + /** + * Convert TWAP parts to total amounts. + * @param {TWAPData} o The TWAP order. + * @returns {object} The total sell amount and total minimum buy amount. + */ + private static partsToTotal(o: TWAPData): { + sellAmount: BigNumber + buyAmount: BigNumber + } { + return { + sellAmount: o.partSellAmount.mul(o.n), + buyAmount: o.minPartLimit.mul(o.n), + } + } + + /** + * Convert total amounts to TWAP parts. + * @param {TWAPDataParams} o The TWAP order parameters. + * @returns {object} The part sell amount and minimum part limit. + * @throws If the number of parts is less than 1. + */ + private static totalToPart(o: TWAPDataParams): { + partSellAmount: BigNumber + minPartLimit: BigNumber + } { + return { + partSellAmount: o.sellAmount.div(o.n), + minPartLimit: o.buyAmount.div(o.n), + } + } +} diff --git a/src/index.ts b/src/index.ts index 3aa8aea9..07193af7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,3 +2,4 @@ export * from './common' export * from './order-book' export * from './subgraph' export * from './order-signing' +export * from './composable' From ac5d157b70eebc1f179582088d5db6a8375b4794 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Tue, 15 Aug 2023 08:40:08 +0000 Subject: [PATCH 07/21] style: ABI formatting --- abi/ComposableCoW.json | 609 ++++++++++++++++++++++++++++- abi/ExtensibleFallbackHandler.json | 494 ++++++++++++++++++++++- abi/TWAP.json | 325 ++++++++++++++- 3 files changed, 1425 insertions(+), 3 deletions(-) diff --git a/abi/ComposableCoW.json b/abi/ComposableCoW.json index b6735bd1..8f50c242 100644 --- a/abi/ComposableCoW.json +++ b/abi/ComposableCoW.json @@ -1 +1,608 @@ -[{"inputs":[{"internalType":"address","name":"_settlement","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InterfaceNotSupported","type":"error"},{"inputs":[],"name":"InvalidHandler","type":"error"},{"inputs":[],"name":"ProofNotAuthed","type":"error"},{"inputs":[],"name":"SingleOrderNotAuthed","type":"error"},{"inputs":[],"name":"SwapGuardRestricted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"indexed":false,"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"}],"name":"ConditionalOrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"bytes32","name":"root","type":"bytes32"},{"components":[{"internalType":"uint256","name":"location","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct ComposableCoW.Proof","name":"proof","type":"tuple"}],"name":"MerkleRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"contract ISwapGuard","name":"swapGuard","type":"address"}],"name":"SwapGuardSet","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"cabinet","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"},{"internalType":"bool","name":"dispatch","type":"bool"}],"name":"create","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"},{"internalType":"contract IValueFactory","name":"factory","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bool","name":"dispatch","type":"bool"}],"name":"createWithContext","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"},{"internalType":"bytes","name":"offchainInput","type":"bytes"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"getTradeableOrderWithSignature","outputs":[{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"internalType":"struct GPv2Order.Data","name":"order","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"}],"name":"hash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract Safe","name":"safe","type":"address"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes32","name":"_domainSeparator","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes","name":"encodeData","type":"bytes"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"isValidSafeSignature","outputs":[{"internalType":"bytes4","name":"magic","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"singleOrderHash","type":"bytes32"}],"name":"remove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"roots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"components":[{"internalType":"uint256","name":"location","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ComposableCoW.Proof","name":"proof","type":"tuple"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"components":[{"internalType":"uint256","name":"location","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ComposableCoW.Proof","name":"proof","type":"tuple"},{"internalType":"contract IValueFactory","name":"factory","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setRootWithContext","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISwapGuard","name":"swapGuard","type":"address"}],"name":"setSwapGuard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"singleOrders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"swapGuards","outputs":[{"internalType":"contract ISwapGuard","name":"","type":"address"}],"stateMutability":"view","type":"function"}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_settlement", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "InterfaceNotSupported", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidHandler", + "type": "error" + }, + { + "inputs": [], + "name": "ProofNotAuthed", + "type": "error" + }, + { + "inputs": [], + "name": "SingleOrderNotAuthed", + "type": "error" + }, + { + "inputs": [], + "name": "SwapGuardRestricted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "components": [ + { + "internalType": "contract IConditionalOrder", + "name": "handler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "staticInput", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct IConditionalOrder.ConditionalOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "ConditionalOrderCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "location", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct ComposableCoW.Proof", + "name": "proof", + "type": "tuple" + } + ], + "name": "MerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ISwapGuard", + "name": "swapGuard", + "type": "address" + } + ], + "name": "SwapGuardSet", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "cabinet", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract IConditionalOrder", + "name": "handler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "staticInput", + "type": "bytes" + } + ], + "internalType": "struct IConditionalOrder.ConditionalOrderParams", + "name": "params", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "dispatch", + "type": "bool" + } + ], + "name": "create", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract IConditionalOrder", + "name": "handler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "staticInput", + "type": "bytes" + } + ], + "internalType": "struct IConditionalOrder.ConditionalOrderParams", + "name": "params", + "type": "tuple" + }, + { + "internalType": "contract IValueFactory", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "dispatch", + "type": "bool" + } + ], + "name": "createWithContext", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "domainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "components": [ + { + "internalType": "contract IConditionalOrder", + "name": "handler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "staticInput", + "type": "bytes" + } + ], + "internalType": "struct IConditionalOrder.ConditionalOrderParams", + "name": "params", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "offchainInput", + "type": "bytes" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + } + ], + "name": "getTradeableOrderWithSignature", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "sellToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "buyToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sellAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "buyAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "validTo", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "appData", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "kind", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "partiallyFillable", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "sellTokenBalance", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "buyTokenBalance", + "type": "bytes32" + } + ], + "internalType": "struct GPv2Order.Data", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract IConditionalOrder", + "name": "handler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "staticInput", + "type": "bytes" + } + ], + "internalType": "struct IConditionalOrder.ConditionalOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "hash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract Safe", + "name": "safe", + "type": "address" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_domainSeparator", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "encodeData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "isValidSafeSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magic", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "singleOrderHash", + "type": "bytes32" + } + ], + "name": "remove", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "roots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "location", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct ComposableCoW.Proof", + "name": "proof", + "type": "tuple" + } + ], + "name": "setRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "location", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct ComposableCoW.Proof", + "name": "proof", + "type": "tuple" + }, + { + "internalType": "contract IValueFactory", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "setRootWithContext", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISwapGuard", + "name": "swapGuard", + "type": "address" + } + ], + "name": "setSwapGuard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "singleOrders", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "swapGuards", + "outputs": [ + { + "internalType": "contract ISwapGuard", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/abi/ExtensibleFallbackHandler.json b/abi/ExtensibleFallbackHandler.json index 6837862a..907244db 100644 --- a/abi/ExtensibleFallbackHandler.json +++ b/abi/ExtensibleFallbackHandler.json @@ -1 +1,493 @@ -[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"indexed":false,"internalType":"contract ISafeSignatureVerifier","name":"verifier","type":"address"}],"name":"AddedDomainVerifier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"AddedInterface","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"bytes32","name":"method","type":"bytes32"}],"name":"AddedSafeMethod","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"indexed":false,"internalType":"contract ISafeSignatureVerifier","name":"oldVerifier","type":"address"},{"indexed":false,"internalType":"contract ISafeSignatureVerifier","name":"newVerifier","type":"address"}],"name":"ChangedDomainVerifier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"},{"indexed":false,"internalType":"bytes32","name":"oldMethod","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"newMethod","type":"bytes32"}],"name":"ChangedSafeMethod","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes32","name":"domainSeparator","type":"bytes32"}],"name":"RemovedDomainVerifier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"RemovedInterface","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Safe","name":"safe","type":"address"},{"indexed":false,"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"RemovedSafeMethod","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"contract Safe","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"domainVerifiers","outputs":[{"internalType":"contract ISafeSignatureVerifier","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"magic","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract Safe","name":"","type":"address"},{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"safeInterfaces","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Safe","name":"","type":"address"},{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"safeMethods","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"internalType":"contract ISafeSignatureVerifier","name":"newVerifier","type":"address"}],"name":"setDomainVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"},{"internalType":"bytes32","name":"newMethod","type":"bytes32"}],"name":"setSafeMethod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"},{"internalType":"bool","name":"supported","type":"bool"}],"name":"setSupportedInterface","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"},{"internalType":"bytes32[]","name":"handlerWithSelectors","type":"bytes32[]"}],"name":"setSupportedInterfaceBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}] \ No newline at end of file +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Safe", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "domainSeparator", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "contract ISafeSignatureVerifier", + "name": "verifier", + "type": "address" + } + ], + "name": "AddedDomainVerifier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Safe", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "AddedInterface", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Safe", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "method", + "type": "bytes32" + } + ], + "name": "AddedSafeMethod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Safe", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "domainSeparator", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "contract ISafeSignatureVerifier", + "name": "oldVerifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ISafeSignatureVerifier", + "name": "newVerifier", + "type": "address" + } + ], + "name": "ChangedDomainVerifier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Safe", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "oldMethod", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "newMethod", + "type": "bytes32" + } + ], + "name": "ChangedSafeMethod", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Safe", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "domainSeparator", + "type": "bytes32" + } + ], + "name": "RemovedDomainVerifier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Safe", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "RemovedInterface", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract Safe", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "RemovedSafeMethod", + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "inputs": [ + { + "internalType": "contract Safe", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "domainVerifiers", + "outputs": [ + { + "internalType": "contract ISafeSignatureVerifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magic", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract Safe", + "name": "", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "name": "safeInterfaces", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract Safe", + "name": "", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "name": "safeMethods", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "domainSeparator", + "type": "bytes32" + }, + { + "internalType": "contract ISafeSignatureVerifier", + "name": "newVerifier", + "type": "address" + } + ], + "name": "setDomainVerifier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "internalType": "bytes32", + "name": "newMethod", + "type": "bytes32" + } + ], + "name": "setSafeMethod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + }, + { + "internalType": "bool", + "name": "supported", + "type": "bool" + } + ], + "name": "setSupportedInterface", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_interfaceId", + "type": "bytes4" + }, + { + "internalType": "bytes32[]", + "name": "handlerWithSelectors", + "type": "bytes32[]" + } + ], + "name": "setSupportedInterfaceBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/abi/TWAP.json b/abi/TWAP.json index b3c59c82..e6f15edd 100644 --- a/abi/TWAP.json +++ b/abi/TWAP.json @@ -1 +1,324 @@ -[{"inputs":[{"internalType":"contract ComposableCoW","name":"_composableCow","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidFrequency","type":"error"},{"inputs":[],"name":"InvalidMinPartLimit","type":"error"},{"inputs":[],"name":"InvalidNumParts","type":"error"},{"inputs":[],"name":"InvalidPartSellAmount","type":"error"},{"inputs":[],"name":"InvalidSameToken","type":"error"},{"inputs":[],"name":"InvalidSpan","type":"error"},{"inputs":[],"name":"InvalidStartTime","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"OrderNotValid","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"contract IConditionalOrder","name":"handler","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"}],"indexed":false,"internalType":"struct IConditionalOrder.ConditionalOrderParams","name":"params","type":"tuple"}],"name":"ConditionalOrderCreated","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"ctx","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"getTradeableOrder","outputs":[{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"internalType":"struct GPv2Order.Data","name":"order","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes32","name":"domainSeparator","type":"bytes32"},{"internalType":"bytes32","name":"ctx","type":"bytes32"},{"internalType":"bytes","name":"staticInput","type":"bytes"},{"internalType":"bytes","name":"offchainInput","type":"bytes"},{"components":[{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"contract IERC20","name":"buyToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"uint32","name":"validTo","type":"uint32"},{"internalType":"bytes32","name":"appData","type":"bytes32"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bytes32","name":"kind","type":"bytes32"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bytes32","name":"sellTokenBalance","type":"bytes32"},{"internalType":"bytes32","name":"buyTokenBalance","type":"bytes32"}],"internalType":"struct GPv2Order.Data","name":"","type":"tuple"}],"name":"verify","outputs":[],"stateMutability":"view","type":"function"}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "contract ComposableCoW", + "name": "_composableCow", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "InvalidFrequency", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinPartLimit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidNumParts", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidPartSellAmount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSameToken", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSpan", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidStartTime", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidToken", + "type": "error" + }, + { + "inputs": [], + "name": "OrderNotValid", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "components": [ + { + "internalType": "contract IConditionalOrder", + "name": "handler", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "staticInput", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct IConditionalOrder.ConditionalOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "ConditionalOrderCreated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "ctx", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "staticInput", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "getTradeableOrder", + "outputs": [ + { + "components": [ + { + "internalType": "contract IERC20", + "name": "sellToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "buyToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sellAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "buyAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "validTo", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "appData", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "kind", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "partiallyFillable", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "sellTokenBalance", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "buyTokenBalance", + "type": "bytes32" + } + ], + "internalType": "struct GPv2Order.Data", + "name": "order", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "domainSeparator", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "ctx", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "staticInput", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "offchainInput", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract IERC20", + "name": "sellToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "buyToken", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sellAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "buyAmount", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "validTo", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "appData", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "kind", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "partiallyFillable", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "sellTokenBalance", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "buyTokenBalance", + "type": "bytes32" + } + ], + "internalType": "struct GPv2Order.Data", + "name": "", + "type": "tuple" + } + ], + "name": "verify", + "outputs": [], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file From 30e393cf3a419257020a16402a741a7ab5b710d1 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Tue, 15 Aug 2023 09:13:04 +0000 Subject: [PATCH 08/21] fix: audited deployment addresses --- src/common/consts.ts | 4 ++-- src/composable/types/twap.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/consts.ts b/src/common/consts.ts index 94096f4d..da014b94 100644 --- a/src/common/consts.ts +++ b/src/common/consts.ts @@ -4,8 +4,8 @@ import contractNetworks from '@cowprotocol/contracts/networks.json' const { GPv2Settlement } = JSON.parse(contractNetworks as unknown as string) as typeof contractNetworks export const BUY_ETH_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' -export const EXTENSIBLE_FALLBACK_HANDLER = '0x4e305935b14627eA57CBDbCfF57e81fd9F240403' -export const COMPOSABLE_COW = '0xF487887DA5a4b4e3eC114FDAd97dc0F785d72738' +export const EXTENSIBLE_FALLBACK_HANDLER = '0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5' +export const COMPOSABLE_COW = '0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74' /** * The list of supported chains. diff --git a/src/composable/types/twap.ts b/src/composable/types/twap.ts index 1ed43a50..28fb6b9e 100644 --- a/src/composable/types/twap.ts +++ b/src/composable/types/twap.ts @@ -6,13 +6,13 @@ import { ContextFactory } from '../multiplexer' // The type of Conditional Order const TWAP_ORDER_TYPE = 'TWAP' // The address of the TWAP handler contract -export const TWAP_ADDRESS = '0x910d00a310f7Dc5B29FE73458F47f519be547D3d' +export const TWAP_ADDRESS = '0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5' /** * The address of the `CurrentBlockTimestampFactory` contract * * **NOTE**: This is used in the event that TWAP's have a `t0` of `0`. */ -export const CURRENT_BLOCK_TIMESTAMP_FACTORY_ADDRESS = '0x0899c7DC280363d263Cc954506134F249CceC4a5' +export const CURRENT_BLOCK_TIMESTAMP_FACTORY_ADDRESS = '0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc' // Define the ABI tuple for the TWAPData struct const TWAP_DATA_ABI = [ From 5dddc3e3c1f305336a6a7608635cca015e1536e0 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Tue, 15 Aug 2023 09:21:52 +0000 Subject: [PATCH 09/21] fix: remove commented code --- src/composable/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/composable/index.ts b/src/composable/index.ts index 78be3e9e..37fea78d 100644 --- a/src/composable/index.ts +++ b/src/composable/index.ts @@ -1,5 +1,4 @@ export * from './extensible' export * from './multiplexer' export * from './conditionalorder' -// export * from './generated' export * from './types' From 8a0e9081d306b6e9cfed49abca3d727c5fa42149 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Tue, 15 Aug 2023 10:26:16 +0000 Subject: [PATCH 10/21] fix: eslint no-unused-vars --- .eslintrc.json | 8 +++++++- src/composable/conditionalorder.spec.ts | 2 +- src/composable/multiplexer.spec.ts | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8ff05739..814ccbf1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,13 @@ ], "plugins": ["prettier"], "rules": { - "prettier/prettier": "error" + "prettier/prettier": "error", + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_" + } + ] }, "ignorePatterns": ["dist", "node_modules", "src/subgraph/graphql.ts", "examples"] diff --git a/src/composable/conditionalorder.spec.ts b/src/composable/conditionalorder.spec.ts index 3c4080b0..a9e1cf89 100644 --- a/src/composable/conditionalorder.spec.ts +++ b/src/composable/conditionalorder.spec.ts @@ -97,7 +97,7 @@ class TestConditionalOrder extends BaseConditionalOrder { return super.encodeStaticInputHelper(['uint256'], this.staticInput) } - isValid(o: any): boolean { + isValid(_o: unknown): boolean { throw new Error('Method not implemented.') } serialize(): string { diff --git a/src/composable/multiplexer.spec.ts b/src/composable/multiplexer.spec.ts index 79592749..1d56f427 100644 --- a/src/composable/multiplexer.spec.ts +++ b/src/composable/multiplexer.spec.ts @@ -221,7 +221,7 @@ describe('Multiplexer (ComposableCoW)', () => { // use the typechain generated interface to see if the proof struct is valid // by generating calldata for `setRoot`. - const calldata = ComposableCoW__factory.createInterface().encodeFunctionData('setRoot', [m.root, proofStruct]) + ComposableCoW__factory.createInterface().encodeFunctionData('setRoot', [m.root, proofStruct]) }) test('prepareProofStruct: emits when location set to emitted', async () => { @@ -235,7 +235,7 @@ describe('Multiplexer (ComposableCoW)', () => { // use the typechain generated interface to see if the proof struct is valid // by generating calldata for `setRoot`. - const calldata = ComposableCoW__factory.createInterface().encodeFunctionData('setRoot', [m.root, proofStruct]) + ComposableCoW__factory.createInterface().encodeFunctionData('setRoot', [m.root, proofStruct]) }) test('prepareProofStruct: throws on invalid location', async () => { From f93d31940bc90e2f2b5ea238443db5de2c361620 Mon Sep 17 00:00:00 2001 From: Alfetopito Date: Tue, 15 Aug 2023 11:49:06 +0100 Subject: [PATCH 11/21] chore: update services repo tag to include openapi changes --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 37dbbaf3..a04c1a22 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "prepare": "npm run build", "prepublishOnly": "npm test && npm run lint", "graphql:codegen": "graphql-codegen --config graphql-codegen.yml", - "swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.117.1/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false", + "swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.119.0/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false", "typechain:codegen": "typechain --target ethers-v5 --out-dir ./src/composable/generated './abi/*.json'" }, "dependencies": { From 2797c4ee9ac40cad88f784dd8e65f74a48eead6d Mon Sep 17 00:00:00 2001 From: Alfetopito Date: Tue, 15 Aug 2023 12:07:25 +0100 Subject: [PATCH 12/21] chore: use unused-imports/no-unused-vars for linting rather than no-unused-vars Apparently the default checker is quite dumb and doesn't realize when a variable is exported/used in another file --- .eslintrc.json | 9 +++++++-- package.json | 7 ++++--- yarn.lock | 12 ++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 814ccbf1..b241b332 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,12 +6,17 @@ "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended" ], - "plugins": ["prettier"], + "plugins": ["prettier", "unused-imports"], "rules": { "prettier/prettier": "error", - "no-unused-vars": [ + "no-unused-vars": "off", + "unused-imports/no-unused-imports": "error", + "unused-imports/no-unused-vars": [ "error", { + "vars": "all", + "varsIgnorePattern": "^_", + "args": "after-used", "argsIgnorePattern": "^_" } ] diff --git a/package.json b/package.json index a04c1a22..b785bd4e 100644 --- a/package.json +++ b/package.json @@ -34,10 +34,10 @@ "@cowprotocol/contracts": "^1.4.0", "@ethersproject/abstract-signer": "^5.7.0", "@openzeppelin/merkle-tree": "^1.0.5", - "exponential-backoff": "^3.1.1", - "limiter": "^2.1.0", "cross-fetch": "^3.1.5", - "graphql-request": "^4.3.0" + "exponential-backoff": "^3.1.1", + "graphql-request": "^4.3.0", + "limiter": "^2.1.0" }, "peerDependencies": { "ethers": "^5.7.2" @@ -60,6 +60,7 @@ "eslint": "^8.33.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-unused-imports": "^3.0.0", "ethers": "^5.7.2", "graphql": "^16.3.0", "jest": "^29.4.2", diff --git a/yarn.lock b/yarn.lock index 3b518ffb..6d8df11c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4708,6 +4708,18 @@ eslint-plugin-prettier@^4.2.1: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-unused-imports@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.0.0.tgz#d25175b0072ff16a91892c3aa72a09ca3a9e69e7" + integrity sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw== + dependencies: + eslint-rule-composer "^0.3.0" + +eslint-rule-composer@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" + integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== + eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" From 54add19fda2b5b9624d93149d80e7569d71932d7 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Tue, 15 Aug 2023 12:00:15 +0000 Subject: [PATCH 13/21] fix: dry code and remove non-null assertion --- src/composable/multiplexer.ts | 66 ++++++++++++----------------------- 1 file changed, 23 insertions(+), 43 deletions(-) diff --git a/src/composable/multiplexer.ts b/src/composable/multiplexer.ts index a4245e55..5274a5ca 100644 --- a/src/composable/multiplexer.ts +++ b/src/composable/multiplexer.ts @@ -138,10 +138,9 @@ export class Multiplexer { // If orders (and therefore the root) are provided, generate the merkle tree if (orders) { this.orders = orders - this.generate() - // if generate was successful, this.tree will be defined and we can verify the root - if (this.tree && this.tree.root !== root) { + // if generate was successful, we can verify the root + if (this.getOrGenerateTree().root !== root) { throw new Error('root mismatch') } } @@ -208,15 +207,10 @@ export class Multiplexer { * @returns The JSON representation of the multiplexer, including the root but excluding the merkle tree. */ toJSON(): string { - // Make sure the merkle tree is generated - if (!this.tree) { - // If the merkle tree doesn't generate, it will throw - this.generate() - } + const root = this.getOrGenerateTree().root // serialize the multiplexer, including the root but excluding the merkle tree. - // use a non-null assertion because we know the merkle tree is defined - return JSON.stringify({ ...this, root: this.tree!.root }, (k, v) => { + return JSON.stringify({ ...this, root }, (k, v) => { // filter out the merkle tree if (k === 'tree') return undefined if (typeof v === 'object' && v !== null && 'orderType' in v) { @@ -298,26 +292,25 @@ export class Multiplexer { } get root(): string { - if (!this.tree) { - // If the merkle tree doesn't generate, it will throw - this.generate() - } - - // use a non-null assertion because we know the merkle tree is defined - return this.tree!.root + return this.getOrGenerateTree().root } /** - * Generate the merkle tree for the current set of conditional orders. - * + * Retrieve the merkle tree of orders, or generate it if it doesn't exist. + * * **CAUTION**: This will overwrite any existing merkle tree. This operation is expensive and should only be done when necessary. * @throws If the merkle tree cannot be generated. + * @returns The merkle tree for the current set of conditional orders. */ - private generate(): void { - this.tree = StandardMerkleTree.of( - Object.values(this.orders).map((order) => [...Object.values(order.leaf)]), - CONDITIONAL_ORDER_LEAF_ABI - ) + private getOrGenerateTree(): StandardMerkleTree { + if (!this.tree) { + this.tree = StandardMerkleTree.of( + Object.values(this.orders).map((order) => [...Object.values(order.leaf)]), + CONDITIONAL_ORDER_LEAF_ABI + ) + } + + return this.tree } // --- serialization for watchtowers / indexers --- @@ -351,11 +344,6 @@ export class Multiplexer { filter?: (v: string[]) => boolean, uploader?: (offChainEncoded: string) => Promise ): Promise { - if (!this.tree) { - // If the merkle tree doesn't generate, it will throw - this.generate() - } - const data = async (): Promise => { switch (location) { case ProofLocation.PRIVATE: @@ -433,7 +421,10 @@ export class Multiplexer { * @returns A JSON-encoded string of the proofs and parameters for the conditional orders. */ dumpProofs(filter?: (v: string[]) => boolean): string { - return this.encodeToJSON(filter) + const root = this.getOrGenerateTree().root + const payload = this.encodeToJSON(filter) + if (root !== this.getOrGenerateTree().root) throw new Error('cannot modify tree with filter') + return payload } dumpProofsAndParams(filter?: (v: string[]) => boolean): ProofWithParams[] { @@ -448,14 +439,8 @@ export class Multiplexer { * merkle tree. */ private getProofs(filter?: (v: string[]) => boolean): ProofWithParams[] { - if (!this.tree) { - // If the merkle tree doesn't generate, it will throw - this.generate() - } - // Get a list of all entry indices in the tree, excluding any that don't match the filter - // non-null assertion because we know the tree is defined - return [...this.tree!.entries()] + return [...this.getOrGenerateTree().entries()] .map(([i, v]) => { if ((filter && filter(v)) || filter === undefined) { return { idx: i, value: v } @@ -464,11 +449,6 @@ export class Multiplexer { } }) .reduce((acc: ProofWithParams[], x) => { - // guard against the tree not being defined - if (!this.tree) { - throw new Error('Merkle tree not generated') - } - if (x) { const p: ConditionalOrderParams = { handler: x.value[0], @@ -476,7 +456,7 @@ export class Multiplexer { staticInput: x.value[2], } acc.push({ - proof: this.tree.getProof(x.idx), + proof: this.getOrGenerateTree().getProof(x.idx), params: p, }) } From 3e5cb7c3e88fd490911cc370faab8fc68b90a5fe Mon Sep 17 00:00:00 2001 From: mfw78 Date: Tue, 15 Aug 2023 12:01:11 +0000 Subject: [PATCH 14/21] fix: tests twap address and multiplexer throw --- src/composable/multiplexer.spec.ts | 2 +- src/composable/types/twap.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/composable/multiplexer.spec.ts b/src/composable/multiplexer.spec.ts index 1d56f427..2f8d8f07 100644 --- a/src/composable/multiplexer.spec.ts +++ b/src/composable/multiplexer.spec.ts @@ -190,7 +190,7 @@ describe('Multiplexer (ComposableCoW)', () => { // Guard against the filter modifying the multiplexer state expect(() => { m.dumpProofs(badFilter) - }).toThrow('Merkle tree not generated') + }).toThrow('cannot modify tree with filter') // Dump the proofs const serialized = m.dumpProofs(filter) diff --git a/src/composable/types/twap.spec.ts b/src/composable/types/twap.spec.ts index 47e21369..d4e74696 100644 --- a/src/composable/types/twap.spec.ts +++ b/src/composable/types/twap.spec.ts @@ -1,4 +1,4 @@ -import { TWAP, type TWAPDataParams } from './twap' +import { TWAP, TWAP_ADDRESS, type TWAPDataParams } from './twap' import { BigNumber, utils, constants } from 'ethers' export const TWAP_PARAMS_TEST: TWAPDataParams = { @@ -18,7 +18,7 @@ export const TWAP_SERIALIZED = (salt?: string): string => { return ( '0x' + '0000000000000000000000000000000000000000000000000000000000000020' + - '000000000000000000000000910d00a310f7dc5b29fe73458f47f519be547d3d' + + '000000000000000000000000' + TWAP_ADDRESS.substring(2).toLowerCase() + (salt?.substring(2) ?? '9379a0bf532ff9a66ffde940f94b1a025d6f18803054c1aef52dc94b15255bbe') + '0000000000000000000000000000000000000000000000000000000000000060' + '0000000000000000000000000000000000000000000000000000000000000140' + From 9551e21f53c2ae4efdcb88d99670a89d579ed4de Mon Sep 17 00:00:00 2001 From: mfw78 Date: Tue, 15 Aug 2023 12:42:40 +0000 Subject: [PATCH 15/21] fix: lazy constructor --- src/composable/types/twap.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/composable/types/twap.ts b/src/composable/types/twap.ts index 28fb6b9e..14d0a873 100644 --- a/src/composable/types/twap.ts +++ b/src/composable/types/twap.ts @@ -92,7 +92,7 @@ export class TWAP extends BaseConditionalOrder { * @returns An instance of the TWAP order. */ static default(staticInput: TWAPDataParams): BaseConditionalOrder { - return new TWAP(TWAP_ADDRESS, undefined, staticInput, false) + return new TWAP(TWAP_ADDRESS, undefined, staticInput) } /** @@ -171,8 +171,7 @@ export class TWAP extends BaseConditionalOrder { { ...o, ...TWAP.partsToTotal(o), - }, - false + } ) ) } From adafc9378ab32b0272ee70b9945bb21b4ce7bcc8 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Tue, 15 Aug 2023 12:50:43 +0000 Subject: [PATCH 16/21] fix: extract constants --- src/composable/types/twap.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/composable/types/twap.ts b/src/composable/types/twap.ts index 14d0a873..a1dca160 100644 --- a/src/composable/types/twap.ts +++ b/src/composable/types/twap.ts @@ -14,6 +14,9 @@ export const TWAP_ADDRESS = '0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5' */ export const CURRENT_BLOCK_TIMESTAMP_FACTORY_ADDRESS = '0x52eD56Da04309Aca4c3FECC595298d80C2f16BAc' +export const MAX_UINT32 = BigNumber.from(2).pow(32).sub(1) // 2^32 - 1 +export const MAX_FREQUENCY = BigNumber.from(365 * 24 * 60 * 60) // 1 year + // Define the ABI tuple for the TWAPData struct const TWAP_DATA_ABI = [ 'tuple(address sellToken, address buyToken, address receiver, uint256 partSellAmount, uint256 minPartLimit, uint256 t0, uint256 n, uint256 t, uint256 span, bytes32 appData)', @@ -129,11 +132,11 @@ export class TWAP extends BaseConditionalOrder { if (!(data.sellToken != data.buyToken)) throw new Error('InvalidSameToken') if (!(data.sellToken != constants.AddressZero && data.buyToken != constants.AddressZero)) throw new Error('InvalidToken') - if (!data.sellAmount.gt(0)) throw new Error('InvalidSellAmount') - if (!data.buyAmount.gt(0)) throw new Error('InvalidMinBuyAmount') - if (!(data.t0.gte(0) && data.t0.lt(2 ** 32))) throw new Error('InvalidStartTime') - if (!(data.n.gt(1) && data.n.lte(2 ** 32))) throw new Error('InvalidNumParts') - if (!(data.t.gt(0) && data.t.lte(365 * 24 * 60 * 60))) throw new Error('InvalidFrequency') + if (!data.sellAmount.gt(constants.Zero)) throw new Error('InvalidSellAmount') + if (!data.buyAmount.gt(constants.Zero)) throw new Error('InvalidMinBuyAmount') + if (!(data.t0.gte(constants.Zero) && data.t0.lt(MAX_UINT32))) throw new Error('InvalidStartTime') + if (!(data.n.gt(constants.One) && data.n.lte(MAX_UINT32))) throw new Error('InvalidNumParts') + if (!(data.t.gt(constants.Zero) && data.t.lte(MAX_FREQUENCY))) throw new Error('InvalidFrequency') if (!data.span.lte(data.t)) throw new Error('InvalidSpan') return true } From 085ec7a8ad4d06415193cfe37b590c051df592e2 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Tue, 15 Aug 2023 13:34:46 +0000 Subject: [PATCH 17/21] fix: prettier --- src/composable/multiplexer.ts | 2 +- src/composable/types/twap.spec.ts | 3 ++- src/composable/types/twap.ts | 12 ++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/composable/multiplexer.ts b/src/composable/multiplexer.ts index 5274a5ca..470f74d0 100644 --- a/src/composable/multiplexer.ts +++ b/src/composable/multiplexer.ts @@ -297,7 +297,7 @@ export class Multiplexer { /** * Retrieve the merkle tree of orders, or generate it if it doesn't exist. - * + * * **CAUTION**: This will overwrite any existing merkle tree. This operation is expensive and should only be done when necessary. * @throws If the merkle tree cannot be generated. * @returns The merkle tree for the current set of conditional orders. diff --git a/src/composable/types/twap.spec.ts b/src/composable/types/twap.spec.ts index d4e74696..6003a929 100644 --- a/src/composable/types/twap.spec.ts +++ b/src/composable/types/twap.spec.ts @@ -18,7 +18,8 @@ export const TWAP_SERIALIZED = (salt?: string): string => { return ( '0x' + '0000000000000000000000000000000000000000000000000000000000000020' + - '000000000000000000000000' + TWAP_ADDRESS.substring(2).toLowerCase() + + '000000000000000000000000' + + TWAP_ADDRESS.substring(2).toLowerCase() + (salt?.substring(2) ?? '9379a0bf532ff9a66ffde940f94b1a025d6f18803054c1aef52dc94b15255bbe') + '0000000000000000000000000000000000000000000000000000000000000060' + '0000000000000000000000000000000000000000000000000000000000000140' + diff --git a/src/composable/types/twap.ts b/src/composable/types/twap.ts index a1dca160..4c003031 100644 --- a/src/composable/types/twap.ts +++ b/src/composable/types/twap.ts @@ -168,14 +168,10 @@ export class TWAP extends BaseConditionalOrder { TWAP_ADDRESS, TWAP_DATA_ABI, (o: TWAPData, salt: string) => - new TWAP( - TWAP_ADDRESS, - salt, - { - ...o, - ...TWAP.partsToTotal(o), - } - ) + new TWAP(TWAP_ADDRESS, salt, { + ...o, + ...TWAP.partsToTotal(o), + }) ) } From 5967be162873f55230001f2c96a102d0b7f9222c Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 16 Aug 2023 09:30:39 +0000 Subject: [PATCH 18/21] feat: single order calldata generation --- src/composable/conditionalorder.ts | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/composable/conditionalorder.ts b/src/composable/conditionalorder.ts index fb2673eb..88376495 100644 --- a/src/composable/conditionalorder.ts +++ b/src/composable/conditionalorder.ts @@ -1,6 +1,8 @@ import { BigNumber, ethers, utils } from 'ethers' import { ContextFactory } from './multiplexer' import { keccak256 } from 'ethers/lib/utils' +import { ComposableCoW__factory } from './generated' +import { IConditionalOrder } from './generated/ComposableCoW' // Define the ABI tuple for the TWAPData struct export const CONDITIONAL_ORDER_PARAMS_ABI = ['tuple(address handler, bytes32 salt, bytes staticInput)'] @@ -83,6 +85,48 @@ export abstract class BaseConditionalOrder { return undefined } + /** + * Get the calldata for creating the conditional order. + * + * This will automatically determine whether or not to use `create` or `createWithContext` based on the + * order type's context dependency. + * + * **NOTE**: By default, this will cause the create to emit the `ConditionalOrderCreated` event. + * @returns The calldata for creating the conditional order. + */ + get createCalldata(): string { + const context = this.context + const composableCow = ComposableCoW__factory.createInterface() + const paramsStruct: IConditionalOrder.ConditionalOrderParamsStruct = { + handler: this.handler, + salt: this.salt, + staticInput: this.encodeStaticInput(), + } + + if (context) { + const contextArgsAbi = context.factoryArgs + ? utils.defaultAbiCoder.encode(context.factoryArgs.argsType, context.factoryArgs.args) + : '0x' + return composableCow.encodeFunctionData('createWithContext', [ + paramsStruct, + context.address, + contextArgsAbi, + true, + ]) + } else { + return composableCow.encodeFunctionData('create', [paramsStruct, true]) + } + } + + /** + * Get the calldata for removing a conditional order that was created as a single order. + * @returns The calldata for removing the conditional order. + */ + get removeCalldata(): string { + const composableCow = ComposableCoW__factory.createInterface() + return composableCow.encodeFunctionData('remove', [this.id]) + } + /** * Calculate the id of the conditional order. * From 9644893612e57308d0dda3b8b184ffb605034055 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 16 Aug 2023 09:31:08 +0000 Subject: [PATCH 19/21] chore: revert lazy loading sign utils --- src/order-signing/orderSigningUtils.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/order-signing/orderSigningUtils.ts b/src/order-signing/orderSigningUtils.ts index e43c619f..df9657b6 100644 --- a/src/order-signing/orderSigningUtils.ts +++ b/src/order-signing/orderSigningUtils.ts @@ -2,8 +2,9 @@ import type { SupportedChainId } from '../common' import type { Signer } from '@ethersproject/abstract-signer' import type { TypedDataDomain } from '@cowprotocol/contracts' import type { SigningResult, UnsignedOrder } from './types' -import { _TypedDataEncoder } from 'ethers/lib/utils' -import { getDomain, signOrder, signOrderCancellation, signOrderCancellations } from './utils' + +const getSignUtils = () => import('./utils') +const ethersUtils = () => import('ethers/lib/utils') /** * Utility class for signing order intents and cancellations. @@ -52,6 +53,7 @@ export class OrderSigningUtils { * @returns {Promise} Encoded signature including signing scheme for the order. */ static async signOrder(order: UnsignedOrder, chainId: SupportedChainId, signer: Signer): Promise { + const { signOrder } = await getSignUtils() return signOrder(order, chainId, signer) } @@ -67,6 +69,7 @@ export class OrderSigningUtils { chainId: SupportedChainId, signer: Signer ): Promise { + const { signOrderCancellation } = await getSignUtils() return signOrderCancellation(orderUid, chainId, signer) } @@ -82,6 +85,7 @@ export class OrderSigningUtils { chainId: SupportedChainId, signer: Signer ): Promise { + const { signOrderCancellations } = await getSignUtils() return signOrderCancellations(orderUids, chainId, signer) } @@ -92,6 +96,7 @@ export class OrderSigningUtils { * @see https://eips.ethereum.org/EIPS/eip-712 */ static async getDomain(chainId: SupportedChainId): Promise { + const { getDomain } = await getSignUtils() return getDomain(chainId) } @@ -100,7 +105,9 @@ export class OrderSigningUtils { * @param chainId {SupportedChainId} chainId The CoW Protocol protocol `chainId` context that's being used. * @returns A string representation of the EIP-712 typed domain data hash. */ - static getDomainSeparator(chainId: SupportedChainId): string { + static async getDomainSeparator(chainId: SupportedChainId): Promise { + const { getDomain } = await getSignUtils() + const { _TypedDataEncoder } = await ethersUtils() return _TypedDataEncoder.hashDomain(getDomain(chainId)) } From 8e1899b62289ecf96f7f394e996d348a02dddd27 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 16 Aug 2023 12:45:55 +0000 Subject: [PATCH 20/21] fix: remove conflated callback mutation check --- src/composable/multiplexer.spec.ts | 10 ---------- src/composable/multiplexer.ts | 5 +---- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/composable/multiplexer.spec.ts b/src/composable/multiplexer.spec.ts index 2f8d8f07..6e9e4729 100644 --- a/src/composable/multiplexer.spec.ts +++ b/src/composable/multiplexer.spec.ts @@ -182,16 +182,6 @@ describe('Multiplexer (ComposableCoW)', () => { return !(handler === v[0] && salt === v[1] && staticInput === v[2]) } - const badFilter = (_v: string[]) => { - m.add(TWAP.default(generateRandomTWAPData())) - return true - } - - // Guard against the filter modifying the multiplexer state - expect(() => { - m.dumpProofs(badFilter) - }).toThrow('cannot modify tree with filter') - // Dump the proofs const serialized = m.dumpProofs(filter) const unserialized = m.dumpProofsAndParams(filter) diff --git a/src/composable/multiplexer.ts b/src/composable/multiplexer.ts index 470f74d0..1b49ef92 100644 --- a/src/composable/multiplexer.ts +++ b/src/composable/multiplexer.ts @@ -421,10 +421,7 @@ export class Multiplexer { * @returns A JSON-encoded string of the proofs and parameters for the conditional orders. */ dumpProofs(filter?: (v: string[]) => boolean): string { - const root = this.getOrGenerateTree().root - const payload = this.encodeToJSON(filter) - if (root !== this.getOrGenerateTree().root) throw new Error('cannot modify tree with filter') - return payload + return this.encodeToJSON(filter) } dumpProofsAndParams(filter?: (v: string[]) => boolean): ProofWithParams[] { From 0623bc6b254daf99a2ca419d63acc2b930870181 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Wed, 16 Aug 2023 12:48:52 +0000 Subject: [PATCH 21/21] docs: sdk maintainer typedoc --- src/composable/multiplexer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/composable/multiplexer.ts b/src/composable/multiplexer.ts index 1b49ef92..4e19a88f 100644 --- a/src/composable/multiplexer.ts +++ b/src/composable/multiplexer.ts @@ -298,7 +298,9 @@ export class Multiplexer { /** * Retrieve the merkle tree of orders, or generate it if it doesn't exist. * - * **CAUTION**: This will overwrite any existing merkle tree. This operation is expensive and should only be done when necessary. + * **CAUTION**: Developers of the SDK should prefer to use this method instead of generating the + * merkle tree themselves. This method makes use of caching to avoid generating the + * merkle tree needlessly. * @throws If the merkle tree cannot be generated. * @returns The merkle tree for the current set of conditional orders. */