From e6213825ca1023006dcea4c16a126985b800f382 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 16 Jul 2024 18:15:31 +0200 Subject: [PATCH 1/2] feat(viem): add viem support --- .eslintrc | 25 - .husky/pre-commit | 2 +- .prettierignore | 92 - .prettierrc.cjs | 15 - .yarn/sdks/eslint/bin/eslint.js | 27 - .yarn/sdks/eslint/lib/api.js | 27 - .yarn/sdks/eslint/lib/unsupported-api.js | 27 - .yarn/sdks/eslint/package.json | 14 - .yarn/sdks/prettier/bin/prettier.cjs | 27 - .yarn/sdks/prettier/index.cjs | 27 - .yarn/sdks/prettier/package.json | 7 - biome.json | 30 + package.json | 15 +- packages/blue-sdk-ethers/README.md | 14 +- packages/blue-sdk-ethers/package.json | 9 +- packages/blue-sdk-ethers/src/ethers/utils.ts | 2 +- packages/blue-sdk-ethers/src/evm.ts | 4 +- packages/blue-sdk-ethers/src/fetch/Holding.ts | 4 +- packages/blue-sdk-ethers/src/fetch/Market.ts | 2 +- .../blue-sdk-ethers/src/fetch/MarketConfig.ts | 6 +- .../blue-sdk-ethers/src/fetch/Position.ts | 6 +- packages/blue-sdk-ethers/src/fetch/Token.ts | 4 +- packages/blue-sdk-ethers/src/fetch/Vault.ts | 2 +- .../blue-sdk-ethers/src/fetch/VaultConfig.ts | 2 +- .../src/fetch/VaultMarketConfig.ts | 2 +- .../fetch/VaultMarketPublicAllocatorConfig.ts | 4 +- .../blue-sdk-ethers/src/signatures/index.ts | 8 +- .../blue-sdk-ethers/src/signatures/permit.ts | 2 +- .../blue-sdk-ethers/src/signatures/permit2.ts | 2 +- packages/blue-sdk-viem/README.md | 123 + packages/blue-sdk-viem/package.json | 45 + packages/blue-sdk-viem/src/abis.ts | 7866 +++++++++++++++++ packages/blue-sdk-viem/src/fetch/Holding.ts | 194 + packages/blue-sdk-viem/src/fetch/Market.ts | 135 + .../blue-sdk-viem/src/fetch/MarketConfig.ts | 72 + packages/blue-sdk-viem/src/fetch/Position.ts | 137 + packages/blue-sdk-viem/src/fetch/Token.ts | 120 + packages/blue-sdk-viem/src/fetch/Vault.ts | 328 + .../blue-sdk-viem/src/fetch/VaultConfig.ts | 96 + .../src/fetch/VaultMarketAllocation.ts | 98 + .../src/fetch/VaultMarketConfig.ts | 81 + .../fetch/VaultMarketPublicAllocatorConfig.ts | 70 + packages/blue-sdk-viem/src/fetch/index.ts | 10 + packages/blue-sdk-viem/src/index.ts | 5 + packages/blue-sdk-viem/src/types.ts | 15 + packages/blue-sdk-viem/tsconfig.build.json | 8 + packages/blue-sdk-viem/tsconfig.json | 8 + packages/blue-sdk/package.json | 9 +- packages/blue-sdk/src/chain.test.ts | 2 +- packages/blue-sdk/src/chain.ts | 2 - packages/blue-sdk/src/helpers/locale.ts | 2 +- packages/blue-sdk/src/market/MarketConfig.ts | 2 +- packages/blue-sdk/src/vault/VaultConfig.ts | 2 +- packages/morpho-test/package.json | 9 +- packages/morpho-ts/package.json | 9 +- yarn.lock | 1673 +--- 56 files changed, 9682 insertions(+), 1847 deletions(-) delete mode 100644 .eslintrc delete mode 100644 .prettierignore delete mode 100644 .prettierrc.cjs delete mode 100755 .yarn/sdks/eslint/bin/eslint.js delete mode 100644 .yarn/sdks/eslint/lib/api.js delete mode 100644 .yarn/sdks/eslint/lib/unsupported-api.js delete mode 100644 .yarn/sdks/eslint/package.json delete mode 100755 .yarn/sdks/prettier/bin/prettier.cjs delete mode 100644 .yarn/sdks/prettier/index.cjs delete mode 100644 .yarn/sdks/prettier/package.json create mode 100644 biome.json create mode 100644 packages/blue-sdk-viem/README.md create mode 100644 packages/blue-sdk-viem/package.json create mode 100644 packages/blue-sdk-viem/src/abis.ts create mode 100644 packages/blue-sdk-viem/src/fetch/Holding.ts create mode 100644 packages/blue-sdk-viem/src/fetch/Market.ts create mode 100644 packages/blue-sdk-viem/src/fetch/MarketConfig.ts create mode 100644 packages/blue-sdk-viem/src/fetch/Position.ts create mode 100644 packages/blue-sdk-viem/src/fetch/Token.ts create mode 100644 packages/blue-sdk-viem/src/fetch/Vault.ts create mode 100644 packages/blue-sdk-viem/src/fetch/VaultConfig.ts create mode 100644 packages/blue-sdk-viem/src/fetch/VaultMarketAllocation.ts create mode 100644 packages/blue-sdk-viem/src/fetch/VaultMarketConfig.ts create mode 100644 packages/blue-sdk-viem/src/fetch/VaultMarketPublicAllocatorConfig.ts create mode 100644 packages/blue-sdk-viem/src/fetch/index.ts create mode 100644 packages/blue-sdk-viem/src/index.ts create mode 100644 packages/blue-sdk-viem/src/types.ts create mode 100644 packages/blue-sdk-viem/tsconfig.build.json create mode 100644 packages/blue-sdk-viem/tsconfig.json diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 6d9599e3..00000000 --- a/.eslintrc +++ /dev/null @@ -1,25 +0,0 @@ -{ - // Root leverages the cascading feature of ESLint. - // Children can still overrides settings. - // https://eslint.org/docs/latest/user-guide/configuring/configuration-files#cascading-and-hierarchy - "root": true, - - // Common config shared accross all children projects. - "parser": "@typescript-eslint/parser", - "extends": ["plugin:prettier/recommended"], - "plugins": ["@typescript-eslint", "unused-imports", "address"], - "rules": { - "no-console": "error", - "unused-imports/no-unused-imports": "error", - "no-unused-vars": [ - "error", - { - "vars": "all", - "args": "after-used", - "ignoreRestSiblings": true - } - ], - "address/addr-type": ["error", "checksum"] - }, - "ignorePatterns": ["out", ".next", "dist", "cache", "lib", "storybook-*"] -} diff --git a/.husky/pre-commit b/.husky/pre-commit index c36020d9..c6f52339 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -5,6 +5,6 @@ STAGED_TS_FILES=$(git diff --staged --name-only --diff-filter=d | grep '\.tsx\?$ if [ -n "$STAGED_TS_FILES" ]; then # yarn eslint --fix $STAGED_TS_FILES - yarn prettier --write $STAGED_TS_FILES + yarn biome check --write $STAGED_TS_FILES git add $STAGED_TS_FILES fi diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 00096f50..00000000 --- a/.prettierignore +++ /dev/null @@ -1,92 +0,0 @@ -# IDE -.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# dependencies -node_modules - -# testing -coverage -.nyc_output -.mp4 - -# production -build -dist -packages/**/lib -sdks/**/lib -services/**/lib -services/**/.esbuild -services/**/.serverless - -# misc -.DS_Store -*.env* -!*.env.example* -!*.env.test -*.pem -stats-*.json -**/disk-store - - -# debug -cache -*.log* -*.tsbuildinfo - -# yarn -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions - - -# auto generated files -manifest.json -!**/public/manifest.json - -# Logs -logs -*.log -npm-debug.log* -pnpm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Local -local_* - -# Cypress -**/cypress/videos -**/cypress/screenshots - -# Local Netlify folder -.netlify - -# next.js -.next -out - - - -# Ignore artifacts -**/.next -**/out -**/deployments -**/generated - -.json -**/.yarn - -*.hbs -artifacts -typechain-types \ No newline at end of file diff --git a/.prettierrc.cjs b/.prettierrc.cjs deleted file mode 100644 index abfa9f61..00000000 --- a/.prettierrc.cjs +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - embeddedLanguageFormatting: "off", - importOrder: [ - "^react.*", - "^(?![@\\.]).*", - "^@(?!morpho|/).*", - "^@morpho.*", - "^@", - "^\\.\\.", - "^\\.", - ], - importOrderSeparation: true, - importOrderParserPlugins: ["typescript", "decorators-legacy"], - plugins: [require("@trivago/prettier-plugin-sort-imports")], -}; diff --git a/.yarn/sdks/eslint/bin/eslint.js b/.yarn/sdks/eslint/bin/eslint.js deleted file mode 100755 index 42eab993..00000000 --- a/.yarn/sdks/eslint/bin/eslint.js +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire, register} = require(`module`); -const {resolve} = require(`path`); -const {pathToFileURL} = require(`url`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); -const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require eslint/bin/eslint.js - require(absPnpApiPath).setup(); - if (isPnpLoaderEnabled && register) { - register(pathToFileURL(absPnpLoaderPath)); - } - } -} - -// Defer to the real eslint/bin/eslint.js your application uses -module.exports = absRequire(`eslint/bin/eslint.js`); diff --git a/.yarn/sdks/eslint/lib/api.js b/.yarn/sdks/eslint/lib/api.js deleted file mode 100644 index ea2b46a7..00000000 --- a/.yarn/sdks/eslint/lib/api.js +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire, register} = require(`module`); -const {resolve} = require(`path`); -const {pathToFileURL} = require(`url`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); -const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require eslint - require(absPnpApiPath).setup(); - if (isPnpLoaderEnabled && register) { - register(pathToFileURL(absPnpLoaderPath)); - } - } -} - -// Defer to the real eslint your application uses -module.exports = absRequire(`eslint`); diff --git a/.yarn/sdks/eslint/lib/unsupported-api.js b/.yarn/sdks/eslint/lib/unsupported-api.js deleted file mode 100644 index f5f8e24d..00000000 --- a/.yarn/sdks/eslint/lib/unsupported-api.js +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire, register} = require(`module`); -const {resolve} = require(`path`); -const {pathToFileURL} = require(`url`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); -const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require eslint/use-at-your-own-risk - require(absPnpApiPath).setup(); - if (isPnpLoaderEnabled && register) { - register(pathToFileURL(absPnpLoaderPath)); - } - } -} - -// Defer to the real eslint/use-at-your-own-risk your application uses -module.exports = absRequire(`eslint/use-at-your-own-risk`); diff --git a/.yarn/sdks/eslint/package.json b/.yarn/sdks/eslint/package.json deleted file mode 100644 index 263cd3d5..00000000 --- a/.yarn/sdks/eslint/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "eslint", - "version": "8.57.0-sdk", - "main": "./lib/api.js", - "type": "commonjs", - "bin": { - "eslint": "./bin/eslint.js" - }, - "exports": { - "./package.json": "./package.json", - ".": "./lib/api.js", - "./use-at-your-own-risk": "./lib/unsupported-api.js" - } -} diff --git a/.yarn/sdks/prettier/bin/prettier.cjs b/.yarn/sdks/prettier/bin/prettier.cjs deleted file mode 100755 index 00f1f7f7..00000000 --- a/.yarn/sdks/prettier/bin/prettier.cjs +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire, register} = require(`module`); -const {resolve} = require(`path`); -const {pathToFileURL} = require(`url`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); -const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require prettier/bin/prettier.cjs - require(absPnpApiPath).setup(); - if (isPnpLoaderEnabled && register) { - register(pathToFileURL(absPnpLoaderPath)); - } - } -} - -// Defer to the real prettier/bin/prettier.cjs your application uses -module.exports = absRequire(`prettier/bin/prettier.cjs`); diff --git a/.yarn/sdks/prettier/index.cjs b/.yarn/sdks/prettier/index.cjs deleted file mode 100644 index d546c6a7..00000000 --- a/.yarn/sdks/prettier/index.cjs +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire, register} = require(`module`); -const {resolve} = require(`path`); -const {pathToFileURL} = require(`url`); - -const relPnpApiPath = "../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); -const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require prettier - require(absPnpApiPath).setup(); - if (isPnpLoaderEnabled && register) { - register(pathToFileURL(absPnpLoaderPath)); - } - } -} - -// Defer to the real prettier your application uses -module.exports = absRequire(`prettier`); diff --git a/.yarn/sdks/prettier/package.json b/.yarn/sdks/prettier/package.json deleted file mode 100644 index cf1b58d4..00000000 --- a/.yarn/sdks/prettier/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "prettier", - "version": "3.3.3-sdk", - "main": "./index.cjs", - "type": "commonjs", - "bin": "./bin/prettier.cjs" -} diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..c386ad2a --- /dev/null +++ b/biome.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", + "files": { + "ignore": ["out", "lib", "dist", ".pnp.*", ".vscode"] + }, + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "attributePosition": "auto" + }, + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": false, + "correctness": { + "noUnusedImports": "error", + "noUnusedVariables": "error" + }, + "style": { + "useBlockStatements": "off" + } + } + } +} diff --git a/package.json b/package.json index 9b0634c6..de1ee4f0 100644 --- a/package.json +++ b/package.json @@ -10,29 +10,18 @@ "node": ">=18" }, "packageManager": "yarn@4.3.1", - "workspaces": [ - "packages/*" - ], + "workspaces": ["packages/*"], "scripts": { "postinstall": "husky install", - "lint": "eslint && prettier --check .", - "lint:fix": "eslint --fix && prettier -w .", "publish": "lerna publish from-package" }, "devDependencies": { + "@biomejs/biome": "^1.8.3", "@lerna-lite/cli": "3.5.1", "@lerna-lite/publish": "3.5.1", - "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@typescript-eslint/eslint-plugin": "^7.12.0", "@typescript-eslint/parser": "^7.12.0", - "eslint": "^8.46.0", - "eslint-config-prettier": "^8.10.0", - "eslint-plugin-address": "^0.0.2", - "eslint-plugin-import": "^2.28.0", - "eslint-plugin-prettier": "^4.2.0", - "eslint-plugin-unused-imports": "^3.2.0", "husky": "^9.0.11", - "prettier": "^3.3.3", "typescript": "^5.4.5" } } diff --git a/packages/blue-sdk-ethers/README.md b/packages/blue-sdk-ethers/README.md index 4fc20003..1090b374 100644 --- a/packages/blue-sdk-ethers/README.md +++ b/packages/blue-sdk-ethers/README.md @@ -1,4 +1,4 @@ -# @morpho-org/blue-sdk-ethers-ethers +# @morpho-org/blue-sdk-ethers [![npm package][npm-img]][npm-url] [![Downloads][downloads-img]][downloads-url] @@ -46,11 +46,11 @@ import "@morpho-org/blue-sdk-ethers/lib/fetch"; Leverage the [`MarketConfig`](./src/market/MarketConfig.ts) class to fetch information on a given market's immutable configuration: ```typescript -import { MarketConfig } from "@morpho-org/blue-sdk"; +import { MarketId, MarketConfig } from "@morpho-org/blue-sdk"; import "@morpho-org/blue-sdk-ethers/lib/fetch/MarketConfig"; const config = await MarketConfig.fetch( - "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc", + "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc" as MarketId, provider // Ethers provider. ); @@ -63,11 +63,11 @@ Leverage the [`Market`](./src/market/Market.ts) class to fetch information on a ```typescript import { Time } from "@morpho-org/morpho-ts"; -import { Market } from "@morpho-org/blue-sdk-ethers"; +import { MarketId, Market } from "@morpho-org/blue-sdk"; import "@morpho-org/blue-sdk-ethers/lib/fetch/Market"; const market = await Market.fetch( - "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc", + "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc" as MarketId, provider // Ethers provider. ); @@ -92,12 +92,12 @@ Leverage the [`Position`](./src/position/Position.ts) class to fetch the positio ```typescript import { Time } from "@morpho-org/morpho-ts"; -import { AccrualPosition } from "@morpho-org/blue-sdk-ethers"; +import { MarketId, AccrualPosition } from "@morpho-org/blue-sdk"; import "@morpho-org/blue-sdk-ethers/lib/fetch/Position"; const position = await AccrualPosition.fetch( "0x7f65e7326F22963e2039734dDfF61958D5d284Ca", - "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc", + "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc" as MarketId, provider // Ethers provider. ); diff --git a/packages/blue-sdk-ethers/package.json b/packages/blue-sdk-ethers/package.json index 9dda78fd..8b8cd6dc 100644 --- a/packages/blue-sdk-ethers/package.json +++ b/packages/blue-sdk-ethers/package.json @@ -4,9 +4,7 @@ "author": "Morpho Association ", "license": "MIT", "main": "src/index.ts", - "files": [ - "lib" - ], + "files": ["lib"], "scripts": { "prepublish": "yarn build", "build": "tsc --build tsconfig.build.json", @@ -44,10 +42,7 @@ ] }, "testRegex": "(/src/.*|(\\.|/)(test|spec)+)\\.test\\.(jsx?|tsx?)$", - "moduleFileExtensions": [ - "js", - "ts" - ], + "moduleFileExtensions": ["js", "ts"], "preset": "ts-jest" } } diff --git a/packages/blue-sdk-ethers/src/ethers/utils.ts b/packages/blue-sdk-ethers/src/ethers/utils.ts index f3ff0f69..a83eedfb 100644 --- a/packages/blue-sdk-ethers/src/ethers/utils.ts +++ b/packages/blue-sdk-ethers/src/ethers/utils.ts @@ -1,4 +1,4 @@ -import { parseUnits, getAddress, ZeroAddress, AddressLike } from "ethers"; +import { AddressLike, ZeroAddress, getAddress, parseUnits } from "ethers"; // Alternative to Number.toFixed that doesn't use scientific notation for excessively small or large numbers. const toFixed = (x: number, decimals: number) => diff --git a/packages/blue-sdk-ethers/src/evm.ts b/packages/blue-sdk-ethers/src/evm.ts index 3cf8a66c..5013a1ab 100644 --- a/packages/blue-sdk-ethers/src/evm.ts +++ b/packages/blue-sdk-ethers/src/evm.ts @@ -1,8 +1,8 @@ import { - TransactionRequest, Signer, - parseUnits, + TransactionRequest, TransactionResponse, + parseUnits, } from "ethers"; import { ChainId, MathLib } from "@morpho-org/blue-sdk"; diff --git a/packages/blue-sdk-ethers/src/fetch/Holding.ts b/packages/blue-sdk-ethers/src/fetch/Holding.ts index 16057cc1..aef866ee 100644 --- a/packages/blue-sdk-ethers/src/fetch/Holding.ts +++ b/packages/blue-sdk-ethers/src/fetch/Holding.ts @@ -14,12 +14,12 @@ import { ChainId, ChainUtils, ERC20_ALLOWANCE_RECIPIENTS, - getChainAddresses, Holding, NATIVE_ADDRESS, + PERMIT2_ALLOWANCE_RECIPIENTS, + getChainAddresses, permissionedBackedTokens, permissionedWrapperTokens, - PERMIT2_ALLOWANCE_RECIPIENTS, } from "@morpho-org/blue-sdk"; import { fromEntries } from "@morpho-org/morpho-ts"; diff --git a/packages/blue-sdk-ethers/src/fetch/Market.ts b/packages/blue-sdk-ethers/src/fetch/Market.ts index caa43492..f5f64de9 100644 --- a/packages/blue-sdk-ethers/src/fetch/Market.ts +++ b/packages/blue-sdk-ethers/src/fetch/Market.ts @@ -9,10 +9,10 @@ import { ViewOverrides } from "ethers-types/dist/common"; import { ChainId, ChainUtils, - getChainAddresses, Market, MarketConfig, MarketId, + getChainAddresses, } from "@morpho-org/blue-sdk"; import "./MarketConfig"; diff --git a/packages/blue-sdk-ethers/src/fetch/MarketConfig.ts b/packages/blue-sdk-ethers/src/fetch/MarketConfig.ts index 09ea9ecc..3224a36c 100644 --- a/packages/blue-sdk-ethers/src/fetch/MarketConfig.ts +++ b/packages/blue-sdk-ethers/src/fetch/MarketConfig.ts @@ -4,11 +4,11 @@ import { MorphoBlue__factory } from "ethers-types"; import { ChainId, ChainUtils, - getChainAddresses, + MarketConfig, + MarketId, UnknownMarketConfigError, _try, - MarketId, - MarketConfig, + getChainAddresses, } from "@morpho-org/blue-sdk"; export async function fetchMarketConfig( diff --git a/packages/blue-sdk-ethers/src/fetch/Position.ts b/packages/blue-sdk-ethers/src/fetch/Position.ts index e20287a8..81841faf 100644 --- a/packages/blue-sdk-ethers/src/fetch/Position.ts +++ b/packages/blue-sdk-ethers/src/fetch/Position.ts @@ -4,14 +4,14 @@ import { ViewOverrides } from "ethers-types/dist/common"; import { AccrualPosition, + Address, ChainId, ChainUtils, - getChainAddresses, - Address, - MarketId, Market, MarketConfig, + MarketId, Position, + getChainAddresses, } from "@morpho-org/blue-sdk"; import "./Market"; diff --git a/packages/blue-sdk-ethers/src/fetch/Token.ts b/packages/blue-sdk-ethers/src/fetch/Token.ts index 1a1d1d69..204bf493 100644 --- a/packages/blue-sdk-ethers/src/fetch/Token.ts +++ b/packages/blue-sdk-ethers/src/fetch/Token.ts @@ -1,8 +1,8 @@ import { - Provider, Contract, ContractRunner, Interface, + Provider, decodeBytes32String, isHexString, } from "ethers"; @@ -12,6 +12,7 @@ import { ViewOverrides } from "ethers-types/dist/common"; import { ERC20, ERC20Interface } from "ethers-types/dist/token/ERC20/ERC20"; import { + Address, ChainId, ChainUtils, ConstantWrappedToken, @@ -21,7 +22,6 @@ import { addresses, getChainAddresses, getUnwrappedToken, - Address, } from "@morpho-org/blue-sdk"; export const isBytes32ERC20Metadata = (address: string, chainId: ChainId) => { diff --git a/packages/blue-sdk-ethers/src/fetch/Vault.ts b/packages/blue-sdk-ethers/src/fetch/Vault.ts index 2fda8cbc..af7114f1 100644 --- a/packages/blue-sdk-ethers/src/fetch/Vault.ts +++ b/packages/blue-sdk-ethers/src/fetch/Vault.ts @@ -7,12 +7,12 @@ import { Address, ChainId, ChainUtils, - getChainAddresses, MarketId, Vault, VaultConfig, VaultMarketAllocation, VaultPublicAllocatorConfig, + getChainAddresses, } from "@morpho-org/blue-sdk"; import "./VaultConfig"; diff --git a/packages/blue-sdk-ethers/src/fetch/VaultConfig.ts b/packages/blue-sdk-ethers/src/fetch/VaultConfig.ts index f297d9b9..5eea13f6 100644 --- a/packages/blue-sdk-ethers/src/fetch/VaultConfig.ts +++ b/packages/blue-sdk-ethers/src/fetch/VaultConfig.ts @@ -2,12 +2,12 @@ import { Provider } from "ethers"; import { MetaMorpho__factory } from "ethers-types"; import { + Address, ChainId, ChainUtils, UnknownVaultConfigError, VaultConfig, _try, - Address, } from "@morpho-org/blue-sdk"; export async function fetchVaultConfig( diff --git a/packages/blue-sdk-ethers/src/fetch/VaultMarketConfig.ts b/packages/blue-sdk-ethers/src/fetch/VaultMarketConfig.ts index 86a0a39f..3981ea8b 100644 --- a/packages/blue-sdk-ethers/src/fetch/VaultMarketConfig.ts +++ b/packages/blue-sdk-ethers/src/fetch/VaultMarketConfig.ts @@ -3,9 +3,9 @@ import { MetaMorpho__factory } from "ethers-types"; import { ViewOverrides } from "ethers-types/dist/common"; import { + Address, ChainId, ChainUtils, - Address, MarketId, VaultMarketConfig, VaultMarketPublicAllocatorConfig, diff --git a/packages/blue-sdk-ethers/src/fetch/VaultMarketPublicAllocatorConfig.ts b/packages/blue-sdk-ethers/src/fetch/VaultMarketPublicAllocatorConfig.ts index b3ef4d28..6635fb1a 100644 --- a/packages/blue-sdk-ethers/src/fetch/VaultMarketPublicAllocatorConfig.ts +++ b/packages/blue-sdk-ethers/src/fetch/VaultMarketPublicAllocatorConfig.ts @@ -3,12 +3,12 @@ import { PublicAllocator__factory } from "ethers-types"; import { ViewOverrides } from "ethers-types/dist/common"; import { + Address, ChainId, ChainUtils, - getChainAddresses, - Address, MarketId, VaultMarketPublicAllocatorConfig, + getChainAddresses, } from "@morpho-org/blue-sdk"; export async function fetchVaultMarketPublicAllocatorConfig( diff --git a/packages/blue-sdk-ethers/src/signatures/index.ts b/packages/blue-sdk-ethers/src/signatures/index.ts index b7efac0a..83ee771b 100644 --- a/packages/blue-sdk-ethers/src/signatures/index.ts +++ b/packages/blue-sdk-ethers/src/signatures/index.ts @@ -2,17 +2,17 @@ import * as _Manager from "./manager"; import * as _Permit from "./permit"; import * as _Permit2 from "./permit2"; import { + getMessage as _getMessage, safeSignTypedData as _safeSignTypedData, verifySignature as _verifySignature, - getMessage as _getMessage, } from "./utils"; export * from "./types"; export namespace SignatureUtils { - export import Permit = _Permit; - export import Permit2 = _Permit2; - export import Manager = _Manager; + export const Permit = _Permit; + export const Permit2 = _Permit2; + export const Manager = _Manager; export const safeSignTypedData = _safeSignTypedData; export const verifySignature = _verifySignature; diff --git a/packages/blue-sdk-ethers/src/signatures/permit.ts b/packages/blue-sdk-ethers/src/signatures/permit.ts index b2b41009..e0848408 100644 --- a/packages/blue-sdk-ethers/src/signatures/permit.ts +++ b/packages/blue-sdk-ethers/src/signatures/permit.ts @@ -1,7 +1,7 @@ import { + Address, ChainId, Token, - Address, addresses, getChainAddresses, } from "@morpho-org/blue-sdk"; diff --git a/packages/blue-sdk-ethers/src/signatures/permit2.ts b/packages/blue-sdk-ethers/src/signatures/permit2.ts index c2d3d079..3e2aea13 100644 --- a/packages/blue-sdk-ethers/src/signatures/permit2.ts +++ b/packages/blue-sdk-ethers/src/signatures/permit2.ts @@ -1,7 +1,7 @@ import { + Address, ChainId, MathLib, - Address, getChainAddresses, } from "@morpho-org/blue-sdk"; diff --git a/packages/blue-sdk-viem/README.md b/packages/blue-sdk-viem/README.md new file mode 100644 index 00000000..baaad8e5 --- /dev/null +++ b/packages/blue-sdk-viem/README.md @@ -0,0 +1,123 @@ +# @morpho-org/blue-sdk-viem + +[![npm package][npm-img]][npm-url] +[![Downloads][downloads-img]][downloads-url] + +Viem-based SDK to augment [`@morpho-org/blue-sdk`](../blue-sdk/) with fetchers using a viem client. + +## Install + +```bash +npm install @morpho-org/blue-sdk-viem +``` + +```bash +yarn add @morpho-org/blue-sdk-viem +``` + +--- + +## Getting Started + +### Augment blue-sdk entity classes with fetchers + +Opt in classes augmentation to easily fetch an entire entity of the Morpho Blue & MetaMorpho ecosystem using viem: + +```typescript +// Granular, opt-in, per-entity class augmentation: +import "@morpho-org/blue-sdk-viem/lib/fetch/AccrualPosition"; +import "@morpho-org/blue-sdk-viem/lib/fetch/Holding"; +import "@morpho-org/blue-sdk-viem/lib/fetch/Market"; +import "@morpho-org/blue-sdk-viem/lib/fetch/MarketConfig"; +import "@morpho-org/blue-sdk-viem/lib/fetch/Position"; +import "@morpho-org/blue-sdk-viem/lib/fetch/Token"; +import "@morpho-org/blue-sdk-viem/lib/fetch/Vault"; +import "@morpho-org/blue-sdk-viem/lib/fetch/VaultConfig"; +import "@morpho-org/blue-sdk-viem/lib/fetch/VaultMarketAllocation"; +import "@morpho-org/blue-sdk-viem/lib/fetch/VaultMarketConfig"; +import "@morpho-org/blue-sdk-viem/lib/fetch/VaultMarketPublicAllocatorConfig"; + +// Or full, opt-in class augmentation: +import "@morpho-org/blue-sdk-viem/lib/fetch"; +``` + +### Fetch the config of a specific market + +Leverage the [`MarketConfig`](./src/market/MarketConfig.ts) class to fetch information on a given market's immutable configuration: + +```typescript +import { MarketConfig } from "@morpho-org/blue-sdk"; +import "@morpho-org/blue-sdk-viem/lib/fetch/MarketConfig"; + +const config = await MarketConfig.fetch( + "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc", + provider // viem provider. +); + +config.collateralToken; // e.g. 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0. +``` + +### Fetch data of a specific market + +Leverage the [`Market`](./src/market/Market.ts) class to fetch information on a specific market: + +```typescript +import { Time } from "@morpho-org/morpho-ts"; +import { Market } from "@morpho-org/blue-sdk"; +import "@morpho-org/blue-sdk-viem/lib/fetch/Market"; + +const market = await Market.fetch( + "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc", + provider // viem provider. +); + +// Or from a config, to fetch faster (skips fetching the config): +// const market = Market.fetchFromConfig( +// config, +// provider // viem provider. +// ); + +market.utilization; // e.g. 92% (scaled by WAD). +market.liquidity; // e.g. 23_000000n (in loan assets). +market.apyAtTarget; // e.g. 3% (scaled by WAD). + +const accruedMarket = market.accrueInterest(Time.timestamp()); // Accrue interest to the latest's timestamp. + +accruedMarket.toSupplyAssets(shares); // Convert supply shares to assets. +``` + +### Fetch data on the position of a specific user on a specific market + +Leverage the [`Position`](./src/position/Position.ts) class to fetch the position of a user on a given market: + +```typescript +import { Time } from "@morpho-org/morpho-ts"; +import { AccrualPosition } from "@morpho-org/blue-sdk"; +import "@morpho-org/blue-sdk-viem/lib/fetch/Position"; + +const position = await AccrualPosition.fetch( + "0x7f65e7326F22963e2039734dDfF61958D5d284Ca", + "0xb323495f7e4148be5643a4ea4a8221eef163e4bccfdedc2a6f4696baacbc86cc", + provider // viem provider. +); + +// Or from a config, to fetch faster: +// const position = AccrualPosition.fetchFromConfig( +// "0x7f65e7326F22963e2039734dDfF61958D5d284Ca", +// config, +// provider // viem provider. +// ); + +position.borrowAssets; // e.g. 23_000000n (in loan assets). +position.isHealthy; // e.g. true. +position.maxBorrowableAssets; // e.g. 2100_000000n (in loan assets). + +const accruedPosition = position.accrueInterest(Time.timestamp()); // Accrue interest to the latest's timestamp. + +position.borrowAssets; // e.g. 23_500000n (in loan assets). +``` + +[downloads-img]: https://img.shields.io/npm/dt/@morpho-org/blue-sdk-viem +[downloads-url]: https://www.npmtrends.com/@morpho-org/blue-sdk-viem +[npm-img]: https://img.shields.io/npm/v/@morpho-org/blue-sdk-viem +[npm-url]: https://www.npmjs.com/package/@morpho-org/blue-sdk-viem diff --git a/packages/blue-sdk-viem/package.json b/packages/blue-sdk-viem/package.json new file mode 100644 index 00000000..a5a987dd --- /dev/null +++ b/packages/blue-sdk-viem/package.json @@ -0,0 +1,45 @@ +{ + "name": "@morpho-org/blue-sdk-viem", + "version": "1.0.0", + "author": "Morpho Association ", + "license": "MIT", + "main": "src/index.ts", + "files": ["lib"], + "scripts": { + "prepublish": "yarn build", + "build": "tsc --build tsconfig.build.json", + "test": "jest" + }, + "dependencies": { + "@morpho-org/blue-sdk": "workspace:*", + "@morpho-org/morpho-ts": "workspace:*", + "viem": "^2.17.4" + }, + "devDependencies": { + "@morpho-org/morpho-test": "workspace:*", + "@types/jest": "^29.5.12", + "jest": "^29.7.0", + "ts-jest": "^29.2.2", + "typescript": "^5.4.5" + }, + "publishConfig": { + "access": "public", + "main": "lib/index.js" + }, + "jest": { + "verbose": true, + "testTimeout": 15000, + "maxWorkers": 1, + "transform": { + "^.+\\.tsx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.json" + } + ] + }, + "testRegex": "(/src/.*|(\\.|/)(test|spec)+)\\.test\\.(jsx?|tsx?)$", + "moduleFileExtensions": ["js", "ts"], + "preset": "ts-jest" + } +} diff --git a/packages/blue-sdk-viem/src/abis.ts b/packages/blue-sdk-viem/src/abis.ts new file mode 100644 index 00000000..b05485db --- /dev/null +++ b/packages/blue-sdk-viem/src/abis.ts @@ -0,0 +1,7866 @@ +export const erc2612Abi = [ + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export const permit2Abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "AllowanceExpired", + type: "error", + }, + { + inputs: [], + name: "ExcessiveInvalidation", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "InsufficientAllowance", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "maxAmount", + type: "uint256", + }, + ], + name: "InvalidAmount", + type: "error", + }, + { + inputs: [], + name: "InvalidContractSignature", + type: "error", + }, + { + inputs: [], + name: "InvalidNonce", + type: "error", + }, + { + inputs: [], + name: "InvalidSignature", + type: "error", + }, + { + inputs: [], + name: "InvalidSignatureLength", + type: "error", + }, + { + inputs: [], + name: "InvalidSigner", + type: "error", + }, + { + inputs: [], + name: "LengthMismatch", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "signatureDeadline", + type: "uint256", + }, + ], + name: "SignatureExpired", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint160", + name: "amount", + type: "uint160", + }, + { + indexed: false, + internalType: "uint48", + name: "expiration", + type: "uint48", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "Lockdown", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint48", + name: "newNonce", + type: "uint48", + }, + { + indexed: false, + internalType: "uint48", + name: "oldNonce", + type: "uint48", + }, + ], + name: "NonceInvalidation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint160", + name: "amount", + type: "uint160", + }, + { + indexed: false, + internalType: "uint48", + name: "expiration", + type: "uint48", + }, + { + indexed: false, + internalType: "uint48", + name: "nonce", + type: "uint48", + }, + ], + name: "Permit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "word", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "mask", + type: "uint256", + }, + ], + name: "UnorderedNonceInvalidation", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint160", + name: "amount", + type: "uint160", + }, + { + internalType: "uint48", + name: "expiration", + type: "uint48", + }, + { + internalType: "uint48", + name: "nonce", + type: "uint48", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint160", + name: "amount", + type: "uint160", + }, + { + internalType: "uint48", + name: "expiration", + type: "uint48", + }, + ], + name: "approve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint48", + name: "newNonce", + type: "uint48", + }, + ], + name: "invalidateNonces", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "wordPos", + type: "uint256", + }, + { + internalType: "uint256", + name: "mask", + type: "uint256", + }, + ], + name: "invalidateUnorderedNonces", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + internalType: "struct IAllowanceTransfer.TokenSpenderPair[]", + name: "approvals", + type: "tuple[]", + }, + ], + name: "lockdown", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "nonceBitmap", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + components: [ + { + components: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint160", + name: "amount", + type: "uint160", + }, + { + internalType: "uint48", + name: "expiration", + type: "uint48", + }, + { + internalType: "uint48", + name: "nonce", + type: "uint48", + }, + ], + internalType: "struct IAllowanceTransfer.PermitDetails[]", + name: "details", + type: "tuple[]", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "sigDeadline", + type: "uint256", + }, + ], + internalType: "struct IAllowanceTransfer.PermitBatch", + name: "permitBatch", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + components: [ + { + components: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint160", + name: "amount", + type: "uint160", + }, + { + internalType: "uint48", + name: "expiration", + type: "uint48", + }, + { + internalType: "uint48", + name: "nonce", + type: "uint48", + }, + ], + internalType: "struct IAllowanceTransfer.PermitDetails", + name: "details", + type: "tuple", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "sigDeadline", + type: "uint256", + }, + ], + internalType: "struct IAllowanceTransfer.PermitSingle", + name: "permitSingle", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.TokenPermissions", + name: "permitted", + type: "tuple", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.PermitTransferFrom", + name: "permit", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "requestedAmount", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.SignatureTransferDetails", + name: "transferDetails", + type: "tuple", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "permitTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.TokenPermissions[]", + name: "permitted", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.PermitBatchTransferFrom", + name: "permit", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "requestedAmount", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.SignatureTransferDetails[]", + name: "transferDetails", + type: "tuple[]", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "permitTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.TokenPermissions", + name: "permitted", + type: "tuple", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.PermitTransferFrom", + name: "permit", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "requestedAmount", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.SignatureTransferDetails", + name: "transferDetails", + type: "tuple", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "bytes32", + name: "witness", + type: "bytes32", + }, + { + internalType: "string", + name: "witnessTypeString", + type: "string", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "permitWitnessTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.TokenPermissions[]", + name: "permitted", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.PermitBatchTransferFrom", + name: "permit", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "requestedAmount", + type: "uint256", + }, + ], + internalType: "struct ISignatureTransfer.SignatureTransferDetails[]", + name: "transferDetails", + type: "tuple[]", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "bytes32", + name: "witness", + type: "bytes32", + }, + { + internalType: "string", + name: "witnessTypeString", + type: "string", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "permitWitnessTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint160", + name: "amount", + type: "uint160", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + ], + internalType: "struct IAllowanceTransfer.AllowanceTransferDetails[]", + name: "transferDetails", + type: "tuple[]", + }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint160", + name: "amount", + type: "uint160", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export const wstEthAbi = [ + { + inputs: [ + { + internalType: "contract IStETH", + name: "_stETH", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_wstETHAmount", + type: "uint256", + }, + ], + name: "getStETHByWstETH", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_stETHAmount", + type: "uint256", + }, + ], + name: "getWstETHByStETH", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "stETH", + outputs: [ + { + internalType: "contract IStETH", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "stEthPerToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tokensPerStEth", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_wstETHAmount", + type: "uint256", + }, + ], + name: "unwrap", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_stETHAmount", + type: "uint256", + }, + ], + name: "wrap", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +] as const; + +export const blueAbi = [ + { + type: "event", + name: "AccrueInterest", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "prevBorrowRate", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "interest", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "feeShares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Borrow", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "caller", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "onBehalf", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "receiver", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "assets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "CreateMarket", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "marketParams", + type: "tuple", + indexed: false, + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + anonymous: false, + }, + { + type: "event", + name: "EnableIrm", + inputs: [ + { + name: "irm", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "EnableLltv", + inputs: [ + { + name: "lltv", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "FlashLoan", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "assets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "IncrementNonce", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "authorizer", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "usedNonce", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Liquidate", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "borrower", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "repaidAssets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "repaidShares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "seizedAssets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "badDebtAssets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "badDebtShares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Repay", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "onBehalf", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "assets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetAuthorization", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "authorizer", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "authorized", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newIsAuthorized", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetFee", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "newFee", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetFeeRecipient", + inputs: [ + { + name: "newFeeRecipient", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetOwner", + inputs: [ + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Supply", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "onBehalf", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "assets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SupplyCollateral", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "onBehalf", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "assets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Withdraw", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "caller", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "onBehalf", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "receiver", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "assets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "WithdrawCollateral", + inputs: [ + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "caller", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "onBehalf", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "receiver", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "assets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "constructor", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "DOMAIN_SEPARATOR", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "accrueInterest", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "borrow", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + { + name: "onBehalf", + type: "address", + internalType: "address", + }, + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "createMarket", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "enableIrm", + inputs: [ + { + name: "irm", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "enableLltv", + inputs: [ + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "extSloads", + inputs: [ + { + name: "slots", + type: "bytes32[]", + internalType: "bytes32[]", + }, + ], + outputs: [ + { + name: "res", + type: "bytes32[]", + internalType: "bytes32[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "feeRecipient", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "flashLoan", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "idToMarketParams", + inputs: [ + { + name: "", + type: "bytes32", + internalType: "Id", + }, + ], + outputs: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isAuthorized", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isIrmEnabled", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isLltvEnabled", + inputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "liquidate", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "borrower", + type: "address", + internalType: "address", + }, + { + name: "seizedAssets", + type: "uint256", + internalType: "uint256", + }, + { + name: "repaidShares", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "market", + inputs: [ + { + name: "", + type: "bytes32", + internalType: "Id", + }, + ], + outputs: [ + { + name: "totalSupplyAssets", + type: "uint128", + internalType: "uint128", + }, + { + name: "totalSupplyShares", + type: "uint128", + internalType: "uint128", + }, + { + name: "totalBorrowAssets", + type: "uint128", + internalType: "uint128", + }, + { + name: "totalBorrowShares", + type: "uint128", + internalType: "uint128", + }, + { + name: "lastUpdate", + type: "uint128", + internalType: "uint128", + }, + { + name: "fee", + type: "uint128", + internalType: "uint128", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "nonce", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "position", + inputs: [ + { + name: "", + type: "bytes32", + internalType: "Id", + }, + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "supplyShares", + type: "uint256", + internalType: "uint256", + }, + { + name: "borrowShares", + type: "uint128", + internalType: "uint128", + }, + { + name: "collateral", + type: "uint128", + internalType: "uint128", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "repay", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + { + name: "onBehalf", + type: "address", + internalType: "address", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setAuthorization", + inputs: [ + { + name: "authorized", + type: "address", + internalType: "address", + }, + { + name: "newIsAuthorized", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setAuthorizationWithSig", + inputs: [ + { + name: "authorization", + type: "tuple", + internalType: "struct Authorization", + components: [ + { + name: "authorizer", + type: "address", + internalType: "address", + }, + { + name: "authorized", + type: "address", + internalType: "address", + }, + { + name: "isAuthorized", + type: "bool", + internalType: "bool", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "deadline", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "signature", + type: "tuple", + internalType: "struct Signature", + components: [ + { + name: "v", + type: "uint8", + internalType: "uint8", + }, + { + name: "r", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "s", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setFee", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "newFee", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setFeeRecipient", + inputs: [ + { + name: "newFeeRecipient", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setOwner", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "supply", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + { + name: "onBehalf", + type: "address", + internalType: "address", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "supplyCollateral", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "onBehalf", + type: "address", + internalType: "address", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdraw", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + { + name: "onBehalf", + type: "address", + internalType: "address", + }, + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdrawCollateral", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "onBehalf", + type: "address", + internalType: "address", + }, + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, +] as const; + +export const adaptiveCurveIrmAbi = [ + { + inputs: [ + { + internalType: "address", + name: "morpho", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "Id", + name: "id", + type: "bytes32", + indexed: true, + }, + { + internalType: "uint256", + name: "avgBorrowRate", + type: "uint256", + indexed: false, + }, + { + internalType: "uint256", + name: "rateAtTarget", + type: "uint256", + indexed: false, + }, + ], + type: "event", + name: "BorrowRateUpdate", + anonymous: false, + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "MORPHO", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + }, + { + inputs: [ + { + internalType: "struct MarketParams", + name: "marketParams", + type: "tuple", + components: [ + { + internalType: "address", + name: "loanToken", + type: "address", + }, + { + internalType: "address", + name: "collateralToken", + type: "address", + }, + { + internalType: "address", + name: "oracle", + type: "address", + }, + { + internalType: "address", + name: "irm", + type: "address", + }, + { + internalType: "uint256", + name: "lltv", + type: "uint256", + }, + ], + }, + { + internalType: "struct Market", + name: "market", + type: "tuple", + components: [ + { + internalType: "uint128", + name: "totalSupplyAssets", + type: "uint128", + }, + { + internalType: "uint128", + name: "totalSupplyShares", + type: "uint128", + }, + { + internalType: "uint128", + name: "totalBorrowAssets", + type: "uint128", + }, + { + internalType: "uint128", + name: "totalBorrowShares", + type: "uint128", + }, + { + internalType: "uint128", + name: "lastUpdate", + type: "uint128", + }, + { + internalType: "uint128", + name: "fee", + type: "uint128", + }, + ], + }, + ], + stateMutability: "nonpayable", + type: "function", + name: "borrowRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + }, + { + inputs: [ + { + internalType: "struct MarketParams", + name: "marketParams", + type: "tuple", + components: [ + { + internalType: "address", + name: "loanToken", + type: "address", + }, + { + internalType: "address", + name: "collateralToken", + type: "address", + }, + { + internalType: "address", + name: "oracle", + type: "address", + }, + { + internalType: "address", + name: "irm", + type: "address", + }, + { + internalType: "uint256", + name: "lltv", + type: "uint256", + }, + ], + }, + { + internalType: "struct Market", + name: "market", + type: "tuple", + components: [ + { + internalType: "uint128", + name: "totalSupplyAssets", + type: "uint128", + }, + { + internalType: "uint128", + name: "totalSupplyShares", + type: "uint128", + }, + { + internalType: "uint128", + name: "totalBorrowAssets", + type: "uint128", + }, + { + internalType: "uint128", + name: "totalBorrowShares", + type: "uint128", + }, + { + internalType: "uint128", + name: "lastUpdate", + type: "uint128", + }, + { + internalType: "uint128", + name: "fee", + type: "uint128", + }, + ], + }, + ], + stateMutability: "view", + type: "function", + name: "borrowRateView", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + }, + { + inputs: [ + { + internalType: "Id", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + name: "rateAtTarget", + outputs: [ + { + internalType: "int256", + name: "", + type: "int256", + }, + ], + }, +] as const; + +export const blueOracleAbi = [ + { + type: "function", + name: "price", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, +] as const; + +export const metaMorphoAbi = [ + { + type: "constructor", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "morpho", + type: "address", + internalType: "address", + }, + { + name: "initialTimelock", + type: "uint256", + internalType: "uint256", + }, + { + name: "_asset", + type: "address", + internalType: "address", + }, + { + name: "_name", + type: "string", + internalType: "string", + }, + { + name: "_symbol", + type: "string", + internalType: "string", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "DECIMALS_OFFSET", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "DOMAIN_SEPARATOR", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "MORPHO", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IMorpho", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "acceptCap", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "acceptGuardian", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "acceptOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "acceptTimelock", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "asset", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "config", + inputs: [ + { + name: "", + type: "bytes32", + internalType: "Id", + }, + ], + outputs: [ + { + name: "cap", + type: "uint184", + internalType: "uint184", + }, + { + name: "enabled", + type: "bool", + internalType: "bool", + }, + { + name: "removableAt", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "convertToAssets", + inputs: [ + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "convertToShares", + inputs: [ + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "curator", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "deposit", + inputs: [ + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "eip712Domain", + inputs: [], + outputs: [ + { + name: "fields", + type: "bytes1", + internalType: "bytes1", + }, + { + name: "name", + type: "string", + internalType: "string", + }, + { + name: "version", + type: "string", + internalType: "string", + }, + { + name: "chainId", + type: "uint256", + internalType: "uint256", + }, + { + name: "verifyingContract", + type: "address", + internalType: "address", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "extensions", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "fee", + inputs: [], + outputs: [ + { + name: "", + type: "uint96", + internalType: "uint96", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "feeRecipient", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "guardian", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isAllocator", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "lastTotalAssets", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "maxDeposit", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "maxMint", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "maxRedeem", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "maxWithdraw", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "mint", + inputs: [ + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "multicall", + inputs: [ + { + name: "data", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + outputs: [ + { + name: "results", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "nonces", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "pendingCap", + inputs: [ + { + name: "", + type: "bytes32", + internalType: "Id", + }, + ], + outputs: [ + { + name: "value", + type: "uint192", + internalType: "uint192", + }, + { + name: "validAt", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "pendingGuardian", + inputs: [], + outputs: [ + { + name: "value", + type: "address", + internalType: "address", + }, + { + name: "validAt", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "pendingOwner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "pendingTimelock", + inputs: [], + outputs: [ + { + name: "value", + type: "uint192", + internalType: "uint192", + }, + { + name: "validAt", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "permit", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "deadline", + type: "uint256", + internalType: "uint256", + }, + { + name: "v", + type: "uint8", + internalType: "uint8", + }, + { + name: "r", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "s", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "previewDeposit", + inputs: [ + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "previewMint", + inputs: [ + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "previewRedeem", + inputs: [ + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "previewWithdraw", + inputs: [ + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "reallocate", + inputs: [ + { + name: "allocations", + type: "tuple[]", + internalType: "struct MarketAllocation[]", + components: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "redeem", + inputs: [ + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "revokePendingCap", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "revokePendingGuardian", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "revokePendingMarketRemoval", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "revokePendingTimelock", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setCurator", + inputs: [ + { + name: "newCurator", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setFee", + inputs: [ + { + name: "newFee", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setFeeRecipient", + inputs: [ + { + name: "newFeeRecipient", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setIsAllocator", + inputs: [ + { + name: "newAllocator", + type: "address", + internalType: "address", + }, + { + name: "newIsAllocator", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setSkimRecipient", + inputs: [ + { + name: "newSkimRecipient", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setSupplyQueue", + inputs: [ + { + name: "newSupplyQueue", + type: "bytes32[]", + internalType: "Id[]", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "skim", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "skimRecipient", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "submitCap", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + name: "newSupplyCap", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "submitGuardian", + inputs: [ + { + name: "newGuardian", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "submitMarketRemoval", + inputs: [ + { + name: "marketParams", + type: "tuple", + internalType: "struct MarketParams", + components: [ + { + name: "loanToken", + type: "address", + internalType: "address", + }, + { + name: "collateralToken", + type: "address", + internalType: "address", + }, + { + name: "oracle", + type: "address", + internalType: "address", + }, + { + name: "irm", + type: "address", + internalType: "address", + }, + { + name: "lltv", + type: "uint256", + internalType: "uint256", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "submitTimelock", + inputs: [ + { + name: "newTimelock", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "supplyQueue", + inputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "Id", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "supplyQueueLength", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "timelock", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalAssets", + inputs: [], + outputs: [ + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "updateWithdrawQueue", + inputs: [ + { + name: "indexes", + type: "uint256[]", + internalType: "uint256[]", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdraw", + inputs: [ + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdrawQueue", + inputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "Id", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "withdrawQueueLength", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "AccrueInterest", + inputs: [ + { + name: "newTotalAssets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "feeShares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Deposit", + inputs: [ + { + name: "sender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "assets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "EIP712DomainChanged", + inputs: [], + anonymous: false, + }, + { + type: "event", + name: "OwnershipTransferStarted", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ReallocateSupply", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "suppliedAssets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "suppliedShares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ReallocateWithdraw", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "withdrawnAssets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "withdrawnShares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "RevokePendingCap", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "RevokePendingGuardian", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "RevokePendingMarketRemoval", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "RevokePendingTimelock", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetCap", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "cap", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetCurator", + inputs: [ + { + name: "newCurator", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetFee", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newFee", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetFeeRecipient", + inputs: [ + { + name: "newFeeRecipient", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetGuardian", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "guardian", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetIsAllocator", + inputs: [ + { + name: "allocator", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "isAllocator", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetSkimRecipient", + inputs: [ + { + name: "newSkimRecipient", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetSupplyQueue", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newSupplyQueue", + type: "bytes32[]", + indexed: false, + internalType: "Id[]", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetTimelock", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newTimelock", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetWithdrawQueue", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newWithdrawQueue", + type: "bytes32[]", + indexed: false, + internalType: "Id[]", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Skim", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SubmitCap", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + { + name: "cap", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SubmitGuardian", + inputs: [ + { + name: "newGuardian", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SubmitMarketRemoval", + inputs: [ + { + name: "caller", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "id", + type: "bytes32", + indexed: true, + internalType: "Id", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SubmitTimelock", + inputs: [ + { + name: "newTimelock", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "UpdateLastTotalAssets", + inputs: [ + { + name: "updatedTotalAssets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Withdraw", + inputs: [ + { + name: "sender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "receiver", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "assets", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "shares", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "AboveMaxTimelock", + inputs: [], + }, + { + type: "error", + name: "AddressEmptyCode", + inputs: [ + { + name: "target", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "AddressInsufficientBalance", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "AllCapsReached", + inputs: [], + }, + { + type: "error", + name: "AlreadyPending", + inputs: [], + }, + { + type: "error", + name: "AlreadySet", + inputs: [], + }, + { + type: "error", + name: "BelowMinTimelock", + inputs: [], + }, + { + type: "error", + name: "DuplicateMarket", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + }, + { + type: "error", + name: "ECDSAInvalidSignature", + inputs: [], + }, + { + type: "error", + name: "ECDSAInvalidSignatureLength", + inputs: [ + { + name: "length", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ECDSAInvalidSignatureS", + inputs: [ + { + name: "s", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "ERC20InsufficientAllowance", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "allowance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InsufficientBalance", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidApprover", + inputs: [ + { + name: "approver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidReceiver", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSender", + inputs: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC20InvalidSpender", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC2612ExpiredSignature", + inputs: [ + { + name: "deadline", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC2612InvalidSigner", + inputs: [ + { + name: "signer", + type: "address", + internalType: "address", + }, + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ERC4626ExceededMaxDeposit", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "max", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC4626ExceededMaxMint", + inputs: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + { + name: "max", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC4626ExceededMaxRedeem", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "shares", + type: "uint256", + internalType: "uint256", + }, + { + name: "max", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "ERC4626ExceededMaxWithdraw", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "assets", + type: "uint256", + internalType: "uint256", + }, + { + name: "max", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "FailedInnerCall", + inputs: [], + }, + { + type: "error", + name: "InconsistentAsset", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + }, + { + type: "error", + name: "InconsistentReallocation", + inputs: [], + }, + { + type: "error", + name: "InvalidAccountNonce", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + { + name: "currentNonce", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "InvalidMarketRemovalNonZeroCap", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + }, + { + type: "error", + name: "InvalidMarketRemovalNonZeroSupply", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + }, + { + type: "error", + name: "InvalidMarketRemovalTimelockNotElapsed", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + }, + { + type: "error", + name: "InvalidShortString", + inputs: [], + }, + { + type: "error", + name: "MarketNotCreated", + inputs: [], + }, + { + type: "error", + name: "MarketNotEnabled", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + }, + { + type: "error", + name: "MathOverflowedMulDiv", + inputs: [], + }, + { + type: "error", + name: "MaxFeeExceeded", + inputs: [], + }, + { + type: "error", + name: "MaxQueueLengthExceeded", + inputs: [], + }, + { + type: "error", + name: "NoPendingValue", + inputs: [], + }, + { + type: "error", + name: "NonZeroCap", + inputs: [], + }, + { + type: "error", + name: "NotAllocatorRole", + inputs: [], + }, + { + type: "error", + name: "NotCuratorNorGuardianRole", + inputs: [], + }, + { + type: "error", + name: "NotCuratorRole", + inputs: [], + }, + { + type: "error", + name: "NotEnoughLiquidity", + inputs: [], + }, + { + type: "error", + name: "NotGuardianRole", + inputs: [], + }, + { + type: "error", + name: "OwnableInvalidOwner", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "OwnableUnauthorizedAccount", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "PendingCap", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + }, + { + type: "error", + name: "PendingRemoval", + inputs: [], + }, + { + type: "error", + name: "SafeCastOverflowedUintDowncast", + inputs: [ + { + name: "bits", + type: "uint8", + internalType: "uint8", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "StringTooLong", + inputs: [ + { + name: "str", + type: "string", + internalType: "string", + }, + ], + }, + { + type: "error", + name: "SupplyCapExceeded", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + }, + { + type: "error", + name: "TimelockNotElapsed", + inputs: [], + }, + { + type: "error", + name: "UnauthorizedMarket", + inputs: [ + { + name: "id", + type: "bytes32", + internalType: "Id", + }, + ], + }, + { + type: "error", + name: "ZeroAddress", + inputs: [], + }, + { + type: "error", + name: "ZeroFeeRecipient", + inputs: [], + }, +] as const; + +export const publicAllocatorAbi = [ + { + inputs: [ + { + internalType: "address", + name: "morpho", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "AlreadySet", + type: "error", + }, + { + inputs: [], + name: "DepositMarketInWithdrawals", + type: "error", + }, + { + inputs: [], + name: "EmptyWithdrawals", + type: "error", + }, + { + inputs: [], + name: "InconsistentWithdrawals", + type: "error", + }, + { + inputs: [], + name: "IncorrectFee", + type: "error", + }, + { + inputs: [ + { + internalType: "Id", + name: "id", + type: "bytes32", + }, + ], + name: "MarketNotEnabled", + type: "error", + }, + { + inputs: [ + { + internalType: "Id", + name: "id", + type: "bytes32", + }, + ], + name: "MaxInflowExceeded", + type: "error", + }, + { + inputs: [ + { + internalType: "Id", + name: "id", + type: "bytes32", + }, + ], + name: "MaxOutflowExceeded", + type: "error", + }, + { + inputs: [], + name: "MaxSettableFlowCapExceeded", + type: "error", + }, + { + inputs: [], + name: "NotAdminNorVaultOwner", + type: "error", + }, + { + inputs: [ + { + internalType: "Id", + name: "id", + type: "bytes32", + }, + ], + name: "NotEnoughSupply", + type: "error", + }, + { + inputs: [ + { + internalType: "Id", + name: "id", + type: "bytes32", + }, + ], + name: "WithdrawZero", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "vault", + type: "address", + }, + { + indexed: true, + internalType: "Id", + name: "supplyMarketId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "suppliedAssets", + type: "uint256", + }, + ], + name: "PublicReallocateTo", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "vault", + type: "address", + }, + { + indexed: true, + internalType: "Id", + name: "id", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "withdrawnAssets", + type: "uint256", + }, + ], + name: "PublicWithdrawal", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "vault", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "admin", + type: "address", + }, + ], + name: "SetAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "vault", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "fee", + type: "uint256", + }, + ], + name: "SetFee", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "vault", + type: "address", + }, + { + components: [ + { + internalType: "Id", + name: "id", + type: "bytes32", + }, + { + components: [ + { + internalType: "uint128", + name: "maxIn", + type: "uint128", + }, + { + internalType: "uint128", + name: "maxOut", + type: "uint128", + }, + ], + internalType: "struct FlowCaps", + name: "caps", + type: "tuple", + }, + ], + indexed: false, + internalType: "struct FlowCapsConfig[]", + name: "config", + type: "tuple[]", + }, + ], + name: "SetFlowCaps", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "vault", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "feeRecipient", + type: "address", + }, + ], + name: "TransferFee", + type: "event", + }, + { + inputs: [], + name: "MORPHO", + outputs: [ + { + internalType: "contract IMorpho", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "accruedFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "fee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "Id", + name: "", + type: "bytes32", + }, + ], + name: "flowCaps", + outputs: [ + { + internalType: "uint128", + name: "maxIn", + type: "uint128", + }, + { + internalType: "uint128", + name: "maxOut", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "vault", + type: "address", + }, + { + components: [ + { + components: [ + { + internalType: "address", + name: "loanToken", + type: "address", + }, + { + internalType: "address", + name: "collateralToken", + type: "address", + }, + { + internalType: "address", + name: "oracle", + type: "address", + }, + { + internalType: "address", + name: "irm", + type: "address", + }, + { + internalType: "uint256", + name: "lltv", + type: "uint256", + }, + ], + internalType: "struct MarketParams", + name: "marketParams", + type: "tuple", + }, + { + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + internalType: "struct Withdrawal[]", + name: "withdrawals", + type: "tuple[]", + }, + { + components: [ + { + internalType: "address", + name: "loanToken", + type: "address", + }, + { + internalType: "address", + name: "collateralToken", + type: "address", + }, + { + internalType: "address", + name: "oracle", + type: "address", + }, + { + internalType: "address", + name: "irm", + type: "address", + }, + { + internalType: "uint256", + name: "lltv", + type: "uint256", + }, + ], + internalType: "struct MarketParams", + name: "supplyMarketParams", + type: "tuple", + }, + ], + name: "reallocateTo", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "vault", + type: "address", + }, + { + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "setAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "vault", + type: "address", + }, + { + internalType: "uint256", + name: "newFee", + type: "uint256", + }, + ], + name: "setFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "vault", + type: "address", + }, + { + components: [ + { + internalType: "Id", + name: "id", + type: "bytes32", + }, + { + components: [ + { + internalType: "uint128", + name: "maxIn", + type: "uint128", + }, + { + internalType: "uint128", + name: "maxOut", + type: "uint128", + }, + ], + internalType: "struct FlowCaps", + name: "caps", + type: "tuple", + }, + ], + internalType: "struct FlowCapsConfig[]", + name: "config", + type: "tuple[]", + }, + ], + name: "setFlowCaps", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "vault", + type: "address", + }, + { + internalType: "address payable", + name: "feeRecipient", + type: "address", + }, + ], + name: "transferFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export const wrappedBackedTokenAbi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + ], + name: "NonWhitelistedFromAddress", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "NonWhitelistedToAddress", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "EIP712DomainChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "whitelistedBy", + type: "address", + }, + ], + name: "TransferDestinationAuthorized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "whitelistedBy", + type: "address", + }, + ], + name: "TransferOriginatorAuthorized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "depositFor", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "eip712Domain", + outputs: [ + { + internalType: "bytes1", + name: "fields", + type: "bytes1", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "string", + name: "version", + type: "string", + }, + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + internalType: "address", + name: "verifyingContract", + type: "address", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "uint256[]", + name: "extensions", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "underlyingToken", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "controllerAggregator", + type: "address", + }, + ], + name: "setWhitelistController", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "underlying", + outputs: [ + { + internalType: "contract IERC20Upgradeable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "whitelistControllerAggregator", + outputs: [ + { + internalType: "contract WhitelistControllerAggregator", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "withdrawTo", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export const whitelistControllerAggregatorV2Abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "controller", + type: "address", + }, + ], + name: "AddedController", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "controller", + type: "address", + }, + ], + name: "RemovedController", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "controller", + type: "address", + }, + ], + name: "add", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "controllers", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "addressToCheck", + type: "address", + }, + ], + name: "isWhitelisted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "remove", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export const permissionedErc20WrapperAbi = [ + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + ], + name: "AddressEmptyCode", + type: "error", + }, + { + inputs: [], + name: "ECDSAInvalidSignature", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "length", + type: "uint256", + }, + ], + name: "ECDSAInvalidSignatureLength", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "ECDSAInvalidSignatureS", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "allowance", + type: "uint256", + }, + { + internalType: "uint256", + name: "needed", + type: "uint256", + }, + ], + name: "ERC20InsufficientAllowance", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + { + internalType: "uint256", + name: "needed", + type: "uint256", + }, + ], + name: "ERC20InsufficientBalance", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "approver", + type: "address", + }, + ], + name: "ERC20InvalidApprover", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + ], + name: "ERC20InvalidReceiver", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "ERC20InvalidSender", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "ERC20InvalidSpender", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "ERC20InvalidUnderlying", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + name: "ERC2612ExpiredSignature", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "signer", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "ERC2612InvalidSigner", + type: "error", + }, + { + inputs: [], + name: "FailedCall", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + { + internalType: "uint256", + name: "needed", + type: "uint256", + }, + ], + name: "InsufficientBalance", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "currentNonce", + type: "uint256", + }, + ], + name: "InvalidAccountNonce", + type: "error", + }, + { + inputs: [], + name: "InvalidShortString", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "NoPermission", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "SafeERC20FailedOperation", + type: "error", + }, + { + inputs: [ + { + internalType: "string", + name: "str", + type: "string", + }, + ], + name: "StringTooLong", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "EIP712DomainChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "BUNDLER", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MORPHO", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "depositFor", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "eip712Domain", + outputs: [ + { + internalType: "bytes1", + name: "fields", + type: "bytes1", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "string", + name: "version", + type: "string", + }, + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + internalType: "address", + name: "verifyingContract", + type: "address", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "uint256[]", + name: "extensions", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasPermission", + outputs: [ + { + internalType: "bool", + name: "attested", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "underlying", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "withdrawTo", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/packages/blue-sdk-viem/src/fetch/Holding.ts b/packages/blue-sdk-viem/src/fetch/Holding.ts new file mode 100644 index 00000000..b1b1eef0 --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/Holding.ts @@ -0,0 +1,194 @@ +import { + ChainId, + ChainUtils, + ERC20_ALLOWANCE_RECIPIENTS, + Holding, + NATIVE_ADDRESS, + PERMIT2_ALLOWANCE_RECIPIENTS, + getChainAddresses, + permissionedBackedTokens, + permissionedWrapperTokens, +} from "@morpho-org/blue-sdk"; +import { fromEntries } from "@morpho-org/morpho-ts"; +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, + erc20Abi, + maxUint256, +} from "viem"; +import { + erc2612Abi, + permissionedErc20WrapperAbi, + permit2Abi, + whitelistControllerAggregatorV2Abi, + wrappedBackedTokenAbi, +} from "../abis"; +import { ViewOverrides } from "../types"; + +export async function fetchHolding< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + user: Address, + + token: Address, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + { + chainId, + overrides = {}, + }: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + chainId = ChainUtils.parseSupportedChainId( + chainId ?? (await client.getChainId()), + ); + + const chainAddresses = getChainAddresses(chainId); + + if (token === NATIVE_ADDRESS) + return new Holding({ + user, + token, + erc20Allowances: fromEntries( + ERC20_ALLOWANCE_RECIPIENTS.map((label) => [label, maxUint256]), + ), + permit2Allowances: fromEntries( + PERMIT2_ALLOWANCE_RECIPIENTS.map((label) => [ + label, + { + amount: 0n, + expiration: 0n, + nonce: 0n, + }, + ]), + ), + balance: await client.getBalance({ ...overrides, address: user }), + }); + + // const erc20 = ERC20__factory.connect(token, runner); + // const permit2 = Permit2__factory.connect(chainAddresses.permit2, runner); + // const erc2612 = ERC2612__factory.connect(token, runner); + + const [ + balance, + erc20Allowances, + permit2Allowances, + erc2612Nonce, + whitelistControllerAggregator, + hasErc20WrapperPermission, + ] = await Promise.all([ + client.readContract({ + ...overrides, + abi: erc20Abi, + address: token, + functionName: "balanceOf", + args: [user], + }), + Promise.all( + ERC20_ALLOWANCE_RECIPIENTS.map( + async (label) => + [ + label, + await client.readContract({ + ...overrides, + abi: erc20Abi, + address: token, + functionName: "allowance", + args: [user, chainAddresses[label] as Address], + }), + ] as const, + ), + ), + Promise.all( + PERMIT2_ALLOWANCE_RECIPIENTS.map( + async (label) => + [ + label, + await client + .readContract({ + ...overrides, + abi: permit2Abi, + address: chainAddresses.permit2 as Address, + functionName: "allowance", + args: [user, token, chainAddresses[label] as Address], + }) + .then(([amount, expiration, nonce]) => ({ + amount, + expiration: BigInt(expiration), + nonce: BigInt(nonce), + })), + ] as const, + ), + ), + client + .readContract({ + ...overrides, + abi: erc2612Abi, + address: token, + functionName: "nonces", + args: [user], + }) + .catch(() => undefined), + permissionedBackedTokens[chainId].has(token) + ? client.readContract({ + ...overrides, + abi: wrappedBackedTokenAbi, + address: token, + functionName: "whitelistControllerAggregator", + }) + : undefined, + client + .readContract({ + ...overrides, + abi: permissionedErc20WrapperAbi, + address: token, + functionName: "hasPermission", + args: [user], + }) + .catch(() => + permissionedWrapperTokens[chainId].has(token) ? false : undefined, + ), + ]); + + const holding = new Holding({ + user, + token, + erc20Allowances: fromEntries(erc20Allowances), + permit2Allowances: fromEntries(permit2Allowances), + erc2612Nonce, + balance, + canTransfer: hasErc20WrapperPermission ?? true, + }); + + if (whitelistControllerAggregator) + holding.canTransfer = await client + .readContract({ + ...overrides, + abi: whitelistControllerAggregatorV2Abi, + address: whitelistControllerAggregator, + functionName: "isWhitelisted", + args: [user], + }) + .catch(() => undefined); + + return holding; +} + +declare module "@morpho-org/blue-sdk" { + namespace Holding { + let fetch: typeof fetchHolding; + } +} + +Holding.fetch = fetchHolding; diff --git a/packages/blue-sdk-viem/src/fetch/Market.ts b/packages/blue-sdk-viem/src/fetch/Market.ts new file mode 100644 index 00000000..5775e107 --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/Market.ts @@ -0,0 +1,135 @@ +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, + zeroAddress, +} from "viem"; + +import { + ChainId, + ChainUtils, + Market, + MarketConfig, + MarketId, + getChainAddresses, +} from "@morpho-org/blue-sdk"; + +import "./MarketConfig"; +import { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi } from "../abis"; +import { ViewOverrides } from "../types"; + +export async function fetchMarket< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + id: MarketId, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + { + chainId, + overrides = {}, + }: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + chainId = ChainUtils.parseSupportedChainId( + chainId ?? (await client.getChainId()), + ); + + const config = await MarketConfig.fetch(id, client, { chainId }); + + return Market.fetchFromConfig(config, client, { chainId, overrides }); +} + +export async function fetchMarketFromConfig< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + config: MarketConfig, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + { + chainId, + overrides = {}, + }: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + chainId = ChainUtils.parseSupportedChainId( + chainId ?? (await client.getChainId()), + ); + + const { morpho, adaptiveCurveIrm } = getChainAddresses(chainId); + + const [ + [ + totalSupplyAssets, + totalSupplyShares, + totalBorrowShares, + totalBorrowAssets, + lastUpdate, + fee, + ], + price, + rateAtTarget, + ] = await Promise.all([ + client.readContract({ + ...overrides, + address: morpho as Address, + abi: blueAbi, + functionName: "market", + args: [config.id], + }), + config.oracle !== zeroAddress + ? client.readContract({ + ...overrides, + address: config.oracle as Address, + abi: blueOracleAbi, + functionName: "price", + }) + : 0n, + config.irm === adaptiveCurveIrm + ? await client.readContract({ + ...overrides, + address: morpho as Address, + abi: adaptiveCurveIrmAbi, + functionName: "rateAtTarget", + args: [config.id], + }) + : undefined, + ]); + + return new Market({ + config, + totalSupplyAssets, + totalBorrowAssets, + totalSupplyShares, + totalBorrowShares, + lastUpdate, + fee, + price, + rateAtTarget, + }); +} + +declare module "@morpho-org/blue-sdk" { + namespace Market { + let fetch: typeof fetchMarket; + let fetchFromConfig: typeof fetchMarketFromConfig; + } +} + +Market.fetch = fetchMarket; +Market.fetchFromConfig = fetchMarketFromConfig; diff --git a/packages/blue-sdk-viem/src/fetch/MarketConfig.ts b/packages/blue-sdk-viem/src/fetch/MarketConfig.ts new file mode 100644 index 00000000..63ea7f94 --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/MarketConfig.ts @@ -0,0 +1,72 @@ +import { + ChainId, + ChainUtils, + MarketConfig, + MarketId, + UnknownMarketConfigError, + _try, + getChainAddresses, +} from "@morpho-org/blue-sdk"; +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, +} from "viem"; +import { blueAbi } from "../abis"; + +export async function fetchMarketConfig< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + id: MarketId, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + { chainId }: { chainId?: ChainId } = {}, +) { + let config = _try(() => MarketConfig.get(id), UnknownMarketConfigError); + + if (!config) { + chainId = ChainUtils.parseSupportedChainId( + chainId ?? (await client.getChainId()), + ); + + const { morpho } = getChainAddresses(chainId); + + const [loanToken, collateralToken, oracle, irm, lltv] = + // Always fetch at latest block because config is immutable. + await client.readContract({ + address: morpho as Address, + abi: blueAbi, + functionName: "idToMarketParams", + args: [id], + }); + + config = new MarketConfig({ + loanToken, + collateralToken, + oracle, + irm, + lltv, + }); + } + + return config; +} + +declare module "@morpho-org/blue-sdk" { + namespace MarketConfig { + let fetch: typeof fetchMarketConfig; + } +} + +MarketConfig.fetch = fetchMarketConfig; diff --git a/packages/blue-sdk-viem/src/fetch/Position.ts b/packages/blue-sdk-viem/src/fetch/Position.ts new file mode 100644 index 00000000..1202b815 --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/Position.ts @@ -0,0 +1,137 @@ +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, +} from "viem"; + +import { + AccrualPosition, + ChainId, + ChainUtils, + Market, + MarketConfig, + MarketId, + Position, + getChainAddresses, +} from "@morpho-org/blue-sdk"; + +import { blueAbi } from "../abis"; +import { ViewOverrides } from "../types"; +import "./Market"; + +export async function fetchPosition< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + user: Address, + marketId: MarketId, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + { + chainId, + overrides = {}, + }: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + chainId = ChainUtils.parseSupportedChainId( + chainId ?? (await client.getChainId()), + ); + + const { morpho } = getChainAddresses(chainId); + + const [supplyShares, borrowShares, collateral] = await client.readContract({ + ...overrides, + address: morpho as Address, + abi: blueAbi, + functionName: "position", + args: [marketId, user], + }); + + return new Position({ + user, + marketId, + supplyShares, + borrowShares, + collateral, + }); +} + +export async function fetchAccrualPosition< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + user: Address, + marketId: MarketId, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + options: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + options.chainId = ChainUtils.parseSupportedChainId( + options.chainId ?? (await client.getChainId()), + ); + + const [position, market] = await Promise.all([ + await Position.fetch(user, marketId, client, options), + await Market.fetch(marketId, client, options), + ]); + + return new AccrualPosition(position, market); +} + +export async function fetchAccrualPositionFromConfig< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + user: Address, + config: MarketConfig, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + options: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + options.chainId = ChainUtils.parseSupportedChainId( + options.chainId ?? (await client.getChainId()), + ); + + const [position, market] = await Promise.all([ + await Position.fetch(user, config.id, client, options), + await Market.fetchFromConfig(config, client, options), + ]); + + return new AccrualPosition(position, market); +} + +declare module "@morpho-org/blue-sdk" { + namespace Position { + let fetch: typeof fetchPosition; + } + + namespace AccrualPosition { + let fetch: typeof fetchAccrualPosition; + let fetchFromConfig: typeof fetchAccrualPositionFromConfig; + } +} + +Position.fetch = fetchPosition; +AccrualPosition.fetch = fetchAccrualPosition; +AccrualPosition.fetchFromConfig = fetchAccrualPositionFromConfig; diff --git a/packages/blue-sdk-viem/src/fetch/Token.ts b/packages/blue-sdk-viem/src/fetch/Token.ts new file mode 100644 index 00000000..5452e415 --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/Token.ts @@ -0,0 +1,120 @@ +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, + erc20Abi, + hexToString, + isHex, +} from "viem"; + +import { + ChainId, + ChainUtils, + ConstantWrappedToken, + ExchangeRateWrappedToken, + NATIVE_ADDRESS, + Token, + getChainAddresses, + getUnwrappedToken, +} from "@morpho-org/blue-sdk"; +import { wstEthAbi } from "../abis"; +import { ViewOverrides } from "../types"; + +export const decodeString = (hexOrStr: string) => { + if (isHex(hexOrStr)) return hexToString(hexOrStr); + + return hexOrStr; +}; + +export async function fetchToken< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + address: Address, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + { + chainId, + overrides = {}, + }: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + chainId = ChainUtils.parseSupportedChainId( + chainId ?? (await client.getChainId()), + ); + + if (address === NATIVE_ADDRESS) return Token.native(chainId); + + const [decimals, symbol, name] = await Promise.all([ + client.readContract({ + ...overrides, + address, + abi: erc20Abi, + functionName: "decimals", + }), + client + .readContract({ + ...overrides, + address, + abi: erc20Abi, + functionName: "symbol", + }) + .then(decodeString), + client + .readContract({ + ...overrides, + address, + abi: erc20Abi, + functionName: "name", + }) + .then(decodeString), + ]); + + const token = { + address, + decimals: parseInt(decimals.toString()), + symbol, + name, + }; + + const { wstEth, stEth } = getChainAddresses(chainId); + + switch (address) { + case wstEth: { + if (stEth) { + const stEthPerWstEth = await client.readContract({ + ...overrides, + address: wstEth as Address, + abi: wstEthAbi, + functionName: "stEthPerToken", + }); + + return new ExchangeRateWrappedToken(token, stEth, stEthPerWstEth); + } + break; + } + } + + const unwrapToken = getUnwrappedToken(address, chainId); + if (unwrapToken) + return new ConstantWrappedToken(token, unwrapToken, token.decimals); + + return new Token(token); +} + +declare module "@morpho-org/blue-sdk" { + namespace Token { + let fetch: typeof fetchToken; + } +} + +Token.fetch = fetchToken; diff --git a/packages/blue-sdk-viem/src/fetch/Vault.ts b/packages/blue-sdk-viem/src/fetch/Vault.ts new file mode 100644 index 00000000..e4b86849 --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/Vault.ts @@ -0,0 +1,328 @@ +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, +} from "viem"; + +import { + AccrualVault, + ChainId, + ChainUtils, + MarketId, + Vault, + VaultConfig, + VaultMarketAllocation, + VaultPublicAllocatorConfig, + getChainAddresses, +} from "@morpho-org/blue-sdk"; + +import "./VaultConfig"; +import "./VaultMarketAllocation"; +import { metaMorphoAbi, publicAllocatorAbi } from "../abis"; +import { ViewOverrides } from "../types"; + +export async function fetchVault< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + address: Address, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + options: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + options.chainId = ChainUtils.parseSupportedChainId( + options.chainId ?? (await client.getChainId()), + ); + + const config = await VaultConfig.fetch(address, client, options); + + return Vault.fetchFromConfig(address, config, client, options); +} + +export async function fetchVaultFromConfig< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + address: Address, + config: VaultConfig, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + { + chainId, + overrides = {}, + }: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + chainId = ChainUtils.parseSupportedChainId( + chainId ?? (await client.getChainId()), + ); + + const { publicAllocator } = getChainAddresses(chainId); + + const [ + curator, + owner, + guardian, + timelock, + pendingTimelock, + pendingGuardian, + pendingOwner, + fee, + feeRecipient, + skimRecipient, + totalSupply, + totalAssets, + lastTotalAssets, + supplyQueueSize, + withdrawQueueSize, + hasPublicAllocator, + ] = await Promise.all([ + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "curator", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "owner", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "guardian", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "timelock", + }), + client + .readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "pendingTimelock", + }) + .then(([value, validAt]) => ({ value, validAt })), + client + .readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "pendingGuardian", + }) + .then(([value, validAt]) => ({ value, validAt })), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "pendingOwner", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "fee", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "feeRecipient", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "skimRecipient", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "totalSupply", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "totalAssets", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "lastTotalAssets", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "supplyQueueLength", + }), + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "withdrawQueueLength", + }), + publicAllocator && + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "isAllocator", + args: [publicAllocator as Address], + }), + ]); + + let publicAllocatorConfigPromise: + | Promise + | undefined; + + if (hasPublicAllocator) + publicAllocatorConfigPromise = Promise.all([ + client.readContract({ + ...overrides, + address: publicAllocator as Address, + abi: publicAllocatorAbi, + functionName: "admin", + args: [address], + }), + client.readContract({ + ...overrides, + address: publicAllocator as Address, + abi: publicAllocatorAbi, + functionName: "fee", + args: [address], + }), + client.readContract({ + ...overrides, + address: publicAllocator as Address, + abi: publicAllocatorAbi, + functionName: "accruedFee", + args: [address], + }), + ]).then(([admin, fee, accruedFee]) => ({ admin, fee, accruedFee })); + + const [supplyQueue, withdrawQueue, publicAllocatorConfig] = await Promise.all( + [ + Promise.all( + new Array(Number(supplyQueueSize)).fill(null).map( + (_, i) => + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "supplyQueue", + args: [BigInt(i)], + }) as Promise, + ), + ), + Promise.all( + new Array(Number(withdrawQueueSize)).fill(null).map( + (_, i) => + client.readContract({ + ...overrides, + address, + abi: metaMorphoAbi, + functionName: "withdrawQueue", + args: [BigInt(i)], + }) as Promise, + ), + ), + publicAllocatorConfigPromise, + ], + ); + + return new Vault({ + config, + owner, + curator, + guardian, + feeRecipient, + skimRecipient, + timelock, + fee, + pendingOwner, + pendingGuardian, + pendingTimelock, + publicAllocatorConfig, + supplyQueue, + withdrawQueue, + totalSupply, + totalAssets, + lastTotalAssets, + }); +} + +export async function fetchAccrualVault< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + address: Address, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + options: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + options.chainId = ChainUtils.parseSupportedChainId( + options.chainId ?? (await client.getChainId()), + ); + + const vault = await Vault.fetch(address, client, options); + + const allocations = await Promise.all( + [...new Set(vault.supplyQueue.concat(vault.withdrawQueue))].map( + (marketId) => + VaultMarketAllocation.fetch( + vault.address as Address, + marketId, + client, + options, + ), + ), + ); + + return new AccrualVault(vault, allocations); +} + +declare module "@morpho-org/blue-sdk" { + namespace Vault { + let fetch: typeof fetchVault; + let fetchFromConfig: typeof fetchVaultFromConfig; + } + + namespace AccrualVault { + let fetch: typeof fetchAccrualVault; + } +} + +Vault.fetch = fetchVault; +Vault.fetchFromConfig = fetchVaultFromConfig; +AccrualVault.fetch = fetchAccrualVault; diff --git a/packages/blue-sdk-viem/src/fetch/VaultConfig.ts b/packages/blue-sdk-viem/src/fetch/VaultConfig.ts new file mode 100644 index 00000000..557873b9 --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/VaultConfig.ts @@ -0,0 +1,96 @@ +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, +} from "viem"; + +import { + ChainId, + ChainUtils, + UnknownVaultConfigError, + VaultConfig, + _try, +} from "@morpho-org/blue-sdk"; +import { metaMorphoAbi } from "../abis"; + +export async function fetchVaultConfig< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + address: Address, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + { chainId }: { chainId?: ChainId } = {}, +) { + chainId = ChainUtils.parseSupportedChainId( + chainId ?? (await client.getChainId()), + ); + + let config = _try( + () => VaultConfig.get(address, chainId), + UnknownVaultConfigError, + ); + + if (!config) { + // always fetch at latest block because config is immutable + const [asset, symbol, name, decimals, decimalsOffset] = await Promise.all([ + client.readContract({ + address, + abi: metaMorphoAbi, + functionName: "asset", + }), + client.readContract({ + address, + abi: metaMorphoAbi, + functionName: "symbol", + }), + client.readContract({ + address, + abi: metaMorphoAbi, + functionName: "name", + }), + client.readContract({ + address, + abi: metaMorphoAbi, + functionName: "decimals", + }), + client.readContract({ + address, + abi: metaMorphoAbi, + functionName: "DECIMALS_OFFSET", + }), + ]); + + config = new VaultConfig( + { + address, + asset, + symbol, + name, + decimals: Number(decimals), + decimalsOffset: BigInt(decimalsOffset), + }, + chainId, + ); + } + + return config; +} + +declare module "@morpho-org/blue-sdk" { + namespace VaultConfig { + let fetch: typeof fetchVaultConfig; + } +} + +VaultConfig.fetch = fetchVaultConfig; diff --git a/packages/blue-sdk-viem/src/fetch/VaultMarketAllocation.ts b/packages/blue-sdk-viem/src/fetch/VaultMarketAllocation.ts new file mode 100644 index 00000000..5fd0b32b --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/VaultMarketAllocation.ts @@ -0,0 +1,98 @@ +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, +} from "viem"; + +import { + AccrualPosition, + ChainId, + ChainUtils, + MarketId, + VaultMarketAllocation, + VaultMarketConfig, +} from "@morpho-org/blue-sdk"; + +import "./Position"; +import "./VaultMarketConfig"; +import { ViewOverrides } from "../types"; + +export async function fetchVaultMarketAllocation< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + vault: Address, + marketId: MarketId, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + options: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + options.chainId = ChainUtils.parseSupportedChainId( + options.chainId ?? (await client.getChainId()), + ); + + const config = await VaultMarketConfig.fetch( + vault, + marketId, + client, + options, + ); + + return VaultMarketAllocation.fetchFromConfig( + config, + marketId, + client, + options, + ); +} + +export async function fetchVaultMarketAllocationFromConfig< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + config: VaultMarketConfig, + marketId: MarketId, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + options: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + options.chainId = ChainUtils.parseSupportedChainId( + options.chainId ?? (await client.getChainId()), + ); + + return new VaultMarketAllocation({ + config, + position: await AccrualPosition.fetch( + config.vault as Address, + marketId, + client, + options, + ), + }); +} + +declare module "@morpho-org/blue-sdk" { + namespace VaultMarketAllocation { + let fetch: typeof fetchVaultMarketAllocation; + let fetchFromConfig: typeof fetchVaultMarketAllocationFromConfig; + } +} + +VaultMarketAllocation.fetch = fetchVaultMarketAllocation; +VaultMarketAllocation.fetchFromConfig = fetchVaultMarketAllocationFromConfig; diff --git a/packages/blue-sdk-viem/src/fetch/VaultMarketConfig.ts b/packages/blue-sdk-viem/src/fetch/VaultMarketConfig.ts new file mode 100644 index 00000000..5dd5ed2c --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/VaultMarketConfig.ts @@ -0,0 +1,81 @@ +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, +} from "viem"; + +import { + ChainId, + ChainUtils, + MarketId, + VaultMarketConfig, + VaultMarketPublicAllocatorConfig, +} from "@morpho-org/blue-sdk"; + +import "./VaultMarketPublicAllocatorConfig"; +import { metaMorphoAbi } from "../abis"; +import { ViewOverrides } from "../types"; + +export async function fetchVaultMarketConfig< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + vault: Address, + marketId: MarketId, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + options: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + options.chainId = ChainUtils.parseSupportedChainId( + options.chainId ?? (await client.getChainId()), + ); + + const [[cap, enabled, removableAt], pendingCap, publicAllocatorConfig] = + await Promise.all([ + client.readContract({ + ...options.overrides, + address: vault, + abi: metaMorphoAbi, + functionName: "config", + args: [marketId], + }), + client + .readContract({ + ...options.overrides, + address: vault, + abi: metaMorphoAbi, + functionName: "pendingCap", + args: [marketId], + }) + .then(([value, validAt]) => ({ value, validAt })), + VaultMarketPublicAllocatorConfig.fetch(vault, marketId, client, options), + ]); + + return new VaultMarketConfig({ + vault, + marketId, + cap, + pendingCap, + enabled, + removableAt, + publicAllocatorConfig, + }); +} + +declare module "@morpho-org/blue-sdk" { + namespace VaultMarketConfig { + let fetch: typeof fetchVaultMarketConfig; + } +} + +VaultMarketConfig.fetch = fetchVaultMarketConfig; diff --git a/packages/blue-sdk-viem/src/fetch/VaultMarketPublicAllocatorConfig.ts b/packages/blue-sdk-viem/src/fetch/VaultMarketPublicAllocatorConfig.ts new file mode 100644 index 00000000..53257b6b --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/VaultMarketPublicAllocatorConfig.ts @@ -0,0 +1,70 @@ +import { + Account, + Address, + Chain, + ParseAccount, + PublicClient, + RpcSchema, + Transport, +} from "viem"; + +import { + ChainId, + ChainUtils, + MarketId, + VaultMarketPublicAllocatorConfig, + getChainAddresses, +} from "@morpho-org/blue-sdk"; +import { publicAllocatorAbi } from "../abis"; +import { ViewOverrides } from "../types"; + +export async function fetchVaultMarketPublicAllocatorConfig< + transport extends Transport, + chain extends Chain | undefined = undefined, + accountOrAddress extends Account | Address | undefined = undefined, + rpcSchema extends RpcSchema | undefined = undefined, +>( + vault: Address, + marketId: MarketId, + client: PublicClient< + transport, + chain, + ParseAccount, + rpcSchema + >, + { + chainId, + overrides = {}, + }: { chainId?: ChainId; overrides?: ViewOverrides } = {}, +) { + chainId = ChainUtils.parseSupportedChainId( + chainId ?? (await client.getChainId()), + ); + + const { publicAllocator } = getChainAddresses(chainId); + + if (!publicAllocator) return; + + const [maxIn, maxOut] = await client.readContract({ + ...overrides, + address: publicAllocator as Address, + abi: publicAllocatorAbi, + functionName: "flowCaps", + args: [vault, marketId], + }); + + return new VaultMarketPublicAllocatorConfig({ + vault, + marketId, + maxIn, + maxOut, + }); +} + +declare module "@morpho-org/blue-sdk" { + namespace VaultMarketPublicAllocatorConfig { + let fetch: typeof fetchVaultMarketPublicAllocatorConfig; + } +} + +VaultMarketPublicAllocatorConfig.fetch = fetchVaultMarketPublicAllocatorConfig; diff --git a/packages/blue-sdk-viem/src/fetch/index.ts b/packages/blue-sdk-viem/src/fetch/index.ts new file mode 100644 index 00000000..162caa25 --- /dev/null +++ b/packages/blue-sdk-viem/src/fetch/index.ts @@ -0,0 +1,10 @@ +export * from "./Holding"; +export * from "./Position"; +export * from "./MarketConfig"; +export * from "./Market"; +export * from "./Token"; +export * from "./VaultConfig"; +export * from "./Vault"; +export * from "./VaultMarketConfig"; +export * from "./VaultMarketAllocation"; +export * from "./VaultMarketPublicAllocatorConfig"; diff --git a/packages/blue-sdk-viem/src/index.ts b/packages/blue-sdk-viem/src/index.ts new file mode 100644 index 00000000..6696a1fa --- /dev/null +++ b/packages/blue-sdk-viem/src/index.ts @@ -0,0 +1,5 @@ +export * from "./abis"; +export * from "./types"; + +export * as abis from "./abis"; +export * as types from "./types"; diff --git a/packages/blue-sdk-viem/src/types.ts b/packages/blue-sdk-viem/src/types.ts new file mode 100644 index 00000000..8e81ede7 --- /dev/null +++ b/packages/blue-sdk-viem/src/types.ts @@ -0,0 +1,15 @@ +import { Account, Address, BlockTag, StateOverride } from "viem"; + +export type ViewOverrides = { + account?: Account | Address; + stateOverride?: StateOverride; +} & ( + | { + blockNumber?: bigint; + blockTag?: undefined; + } + | { + blockNumber?: undefined; + blockTag?: BlockTag; + } +); diff --git a/packages/blue-sdk-viem/tsconfig.build.json b/packages/blue-sdk-viem/tsconfig.build.json new file mode 100644 index 00000000..3c5447a8 --- /dev/null +++ b/packages/blue-sdk-viem/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "src" + }, + "include": ["src"], + "exclude": ["**/*.(spec|test|fixtures).ts"] +} diff --git a/packages/blue-sdk-viem/tsconfig.json b/packages/blue-sdk-viem/tsconfig.json new file mode 100644 index 00000000..3860b401 --- /dev/null +++ b/packages/blue-sdk-viem/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "lib", + "rootDir": ".", + "baseUrl": "." + } +} diff --git a/packages/blue-sdk/package.json b/packages/blue-sdk/package.json index 146e20c0..cbdcda9e 100644 --- a/packages/blue-sdk/package.json +++ b/packages/blue-sdk/package.json @@ -4,9 +4,7 @@ "author": "Morpho Association ", "license": "MIT", "main": "src/index.ts", - "files": [ - "lib" - ], + "files": ["lib"], "scripts": { "prepublish": "yarn build", "build": "tsc --build tsconfig.build.json", @@ -41,10 +39,7 @@ ] }, "testRegex": "(/src/.*|(\\.|/)(test|spec)+)\\.test\\.(jsx?|tsx?)$", - "moduleFileExtensions": [ - "js", - "ts" - ], + "moduleFileExtensions": ["js", "ts"], "preset": "ts-jest" } } diff --git a/packages/blue-sdk/src/chain.test.ts b/packages/blue-sdk/src/chain.test.ts index 1b5e3667..2c388550 100644 --- a/packages/blue-sdk/src/chain.test.ts +++ b/packages/blue-sdk/src/chain.test.ts @@ -1,4 +1,4 @@ -import { entries, keys, values } from "@morpho-org/morpho-ts"; +import { entries } from "@morpho-org/morpho-ts"; import { ChainId, ChainUtils } from "./chain"; diff --git a/packages/blue-sdk/src/chain.ts b/packages/blue-sdk/src/chain.ts index f461190f..ffaaa10b 100644 --- a/packages/blue-sdk/src/chain.ts +++ b/packages/blue-sdk/src/chain.ts @@ -1,5 +1,3 @@ -import { values } from "@morpho-org/morpho-ts"; - import { UnsupportedChainIdError } from "./errors"; export enum ChainId { diff --git a/packages/blue-sdk/src/helpers/locale.ts b/packages/blue-sdk/src/helpers/locale.ts index 891a7cf3..34b80dd0 100644 --- a/packages/blue-sdk/src/helpers/locale.ts +++ b/packages/blue-sdk/src/helpers/locale.ts @@ -53,7 +53,7 @@ export const getEffectiveLocale = () => { navigator?.language || document?.documentElement?.lang || "en-US"; new Intl.NumberFormat(locale); return locale; - } catch (e) { + } catch { return "en-US"; } } diff --git a/packages/blue-sdk/src/market/MarketConfig.ts b/packages/blue-sdk/src/market/MarketConfig.ts index e285e043..a72fbe98 100644 --- a/packages/blue-sdk/src/market/MarketConfig.ts +++ b/packages/blue-sdk/src/market/MarketConfig.ts @@ -1,4 +1,4 @@ -import { UnknownMarketConfigError, _try } from "../errors"; +import { UnknownMarketConfigError } from "../errors"; import { Address, BigIntish, MarketId } from "../types"; import { MarketUtils } from "./MarketUtils"; diff --git a/packages/blue-sdk/src/vault/VaultConfig.ts b/packages/blue-sdk/src/vault/VaultConfig.ts index 283b5898..7f5a005e 100644 --- a/packages/blue-sdk/src/vault/VaultConfig.ts +++ b/packages/blue-sdk/src/vault/VaultConfig.ts @@ -1,5 +1,5 @@ import { ChainId } from "../chain"; -import { UnknownVaultConfigError, _try } from "../errors"; +import { UnknownVaultConfigError } from "../errors"; import { Address } from "../types"; interface InputVaultConfig { diff --git a/packages/morpho-test/package.json b/packages/morpho-test/package.json index cd6ae5ba..ecd7fa39 100644 --- a/packages/morpho-test/package.json +++ b/packages/morpho-test/package.json @@ -2,9 +2,7 @@ "name": "@morpho-org/morpho-test", "version": "1.0.6", "main": "src/index.ts", - "files": [ - "lib" - ], + "files": ["lib"], "author": "Morpho Association ", "license": "MIT", "scripts": { @@ -55,10 +53,7 @@ ] }, "testRegex": "(/src/.*|(\\.|/)(test|spec)+)\\.test\\.(jsx?|tsx?)$", - "moduleFileExtensions": [ - "js", - "ts" - ], + "moduleFileExtensions": ["js", "ts"], "preset": "ts-jest" } } diff --git a/packages/morpho-ts/package.json b/packages/morpho-ts/package.json index c57cf716..e3d742f8 100644 --- a/packages/morpho-ts/package.json +++ b/packages/morpho-ts/package.json @@ -4,9 +4,7 @@ "author": "Morpho Association ", "license": "MIT", "main": "src/index.ts", - "files": [ - "lib" - ], + "files": ["lib"], "scripts": { "prepublish": "yarn build", "build": "tsc --build tsconfig.build.json", @@ -37,10 +35,7 @@ ] }, "testRegex": "(/src/.*|(\\.|/)(test|spec)+)\\.test\\.(jsx?|tsx?)$", - "moduleFileExtensions": [ - "js", - "ts" - ], + "moduleFileExtensions": ["js", "ts"], "preset": "ts-jest" } } diff --git a/yarn.lock b/yarn.lock index 212ca906..84351682 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,13 @@ __metadata: version: 8 cacheKey: 10c0 +"@adraffy/ens-normalize@npm:1.10.0": + version: 1.10.0 + resolution: "@adraffy/ens-normalize@npm:1.10.0" + checksum: 10c0/78ae700847a2516d5a0ae12c4e23d09392a40c67e73b137eb7189f51afb1601c8d18784aeda2ed288a278997824dc924d1f398852c21d41ee2c4c564f2fb4d26 + languageName: node + linkType: hard + "@adraffy/ens-normalize@npm:1.10.1": version: 1.10.1 resolution: "@adraffy/ens-normalize@npm:1.10.1" @@ -62,18 +69,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:7.17.7": - version: 7.17.7 - resolution: "@babel/generator@npm:7.17.7" - dependencies: - "@babel/types": "npm:^7.17.0" - jsesc: "npm:^2.5.1" - source-map: "npm:^0.5.0" - checksum: 10c0/8088453c4418e0ee6528506fbd5847bbdfd56327a0025ca9496a259261e162c594ffd08be0d63e74c32feced795616772f38acc5f5e493a86a45fd439fd9feb0 - languageName: node - linkType: hard - -"@babel/generator@npm:^7.23.0, @babel/generator@npm:^7.24.8, @babel/generator@npm:^7.24.9, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:^7.24.8, @babel/generator@npm:^7.24.9, @babel/generator@npm:^7.7.2": version: 7.24.9 resolution: "@babel/generator@npm:7.24.9" dependencies: @@ -98,7 +94,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.22.20, @babel/helper-environment-visitor@npm:^7.24.7": +"@babel/helper-environment-visitor@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-environment-visitor@npm:7.24.7" dependencies: @@ -107,7 +103,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.23.0, @babel/helper-function-name@npm:^7.24.7": +"@babel/helper-function-name@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-function-name@npm:7.24.7" dependencies: @@ -117,7 +113,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-hoist-variables@npm:^7.22.5, @babel/helper-hoist-variables@npm:^7.24.7": +"@babel/helper-hoist-variables@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-hoist-variables@npm:7.24.7" dependencies: @@ -168,7 +164,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.22.6, @babel/helper-split-export-declaration@npm:^7.24.7": +"@babel/helper-split-export-declaration@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-split-export-declaration@npm:7.24.7" dependencies: @@ -184,7 +180,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.16.7, @babel/helper-validator-identifier@npm:^7.24.7": +"@babel/helper-validator-identifier@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-validator-identifier@npm:7.24.7" checksum: 10c0/87ad608694c9477814093ed5b5c080c2e06d44cb1924ae8320474a74415241223cc2a725eea2640dd783ff1e3390e5f95eede978bc540e870053152e58f1d651 @@ -220,7 +216,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.5, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.24.8": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.24.8": version: 7.24.8 resolution: "@babel/parser@npm:7.24.8" bin: @@ -394,24 +390,6 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:7.23.2": - version: 7.23.2 - resolution: "@babel/traverse@npm:7.23.2" - dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.0" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.0" - "@babel/types": "npm:^7.23.0" - debug: "npm:^4.1.0" - globals: "npm:^11.1.0" - checksum: 10c0/d096c7c4bab9262a2f658298a3c630ae4a15a10755bb257ae91d5ab3e3b2877438934859c8d34018b7727379fe6b26c4fa2efc81cf4c462a7fe00caf79fa02ff - languageName: node - linkType: hard - "@babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8": version: 7.24.8 resolution: "@babel/traverse@npm:7.24.8" @@ -430,17 +408,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:7.17.0": - version: 7.17.0 - resolution: "@babel/types@npm:7.17.0" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.16.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/ad09224272b40fedb00b262677d12b6838f5b5df5c47d67059ba1181bd4805439993393a8de32459dae137b536d60ebfcaf39ae84d8b3873f1e81cc75f5aeae8 - languageName: node - linkType: hard - -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.17.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.24.9, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.24.9, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": version: 7.24.9 resolution: "@babel/types@npm:7.24.9" dependencies: @@ -458,6 +426,97 @@ __metadata: languageName: node linkType: hard +"@biomejs/biome@npm:^1.8.3": + version: 1.8.3 + resolution: "@biomejs/biome@npm:1.8.3" + dependencies: + "@biomejs/cli-darwin-arm64": "npm:1.8.3" + "@biomejs/cli-darwin-x64": "npm:1.8.3" + "@biomejs/cli-linux-arm64": "npm:1.8.3" + "@biomejs/cli-linux-arm64-musl": "npm:1.8.3" + "@biomejs/cli-linux-x64": "npm:1.8.3" + "@biomejs/cli-linux-x64-musl": "npm:1.8.3" + "@biomejs/cli-win32-arm64": "npm:1.8.3" + "@biomejs/cli-win32-x64": "npm:1.8.3" + dependenciesMeta: + "@biomejs/cli-darwin-arm64": + optional: true + "@biomejs/cli-darwin-x64": + optional: true + "@biomejs/cli-linux-arm64": + optional: true + "@biomejs/cli-linux-arm64-musl": + optional: true + "@biomejs/cli-linux-x64": + optional: true + "@biomejs/cli-linux-x64-musl": + optional: true + "@biomejs/cli-win32-arm64": + optional: true + "@biomejs/cli-win32-x64": + optional: true + bin: + biome: bin/biome + checksum: 10c0/95fe99ce82cd8242f1be51cbf3ac26043b253f5a369d3dc24df09bdb32ec04dba679b1d4fa8b9d602b1bf2c30ecd80af14aa8f5c92d6e0cd6214a99a1099a65b + languageName: node + linkType: hard + +"@biomejs/cli-darwin-arm64@npm:1.8.3": + version: 1.8.3 + resolution: "@biomejs/cli-darwin-arm64@npm:1.8.3" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@biomejs/cli-darwin-x64@npm:1.8.3": + version: 1.8.3 + resolution: "@biomejs/cli-darwin-x64@npm:1.8.3" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@biomejs/cli-linux-arm64-musl@npm:1.8.3": + version: 1.8.3 + resolution: "@biomejs/cli-linux-arm64-musl@npm:1.8.3" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@biomejs/cli-linux-arm64@npm:1.8.3": + version: 1.8.3 + resolution: "@biomejs/cli-linux-arm64@npm:1.8.3" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@biomejs/cli-linux-x64-musl@npm:1.8.3": + version: 1.8.3 + resolution: "@biomejs/cli-linux-x64-musl@npm:1.8.3" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@biomejs/cli-linux-x64@npm:1.8.3": + version: 1.8.3 + resolution: "@biomejs/cli-linux-x64@npm:1.8.3" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@biomejs/cli-win32-arm64@npm:1.8.3": + version: 1.8.3 + resolution: "@biomejs/cli-win32-arm64@npm:1.8.3" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@biomejs/cli-win32-x64@npm:1.8.3": + version: 1.8.3 + resolution: "@biomejs/cli-win32-x64@npm:1.8.3" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@cspotcode/source-map-support@npm:^0.8.0": version: 0.8.1 resolution: "@cspotcode/source-map-support@npm:0.8.1" @@ -467,7 +526,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": +"@eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" dependencies: @@ -478,56 +537,13 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.10.0": version: 4.11.0 resolution: "@eslint-community/regexpp@npm:4.11.0" checksum: 10c0/0f6328869b2741e2794da4ad80beac55cba7de2d3b44f796a60955b0586212ec75e6b0253291fd4aad2100ad471d1480d8895f2b54f1605439ba4c875e05e523 languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.1.4": - version: 2.1.4 - resolution: "@eslint/eslintrc@npm:2.1.4" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^9.6.0" - globals: "npm:^13.19.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/32f67052b81768ae876c84569ffd562491ec5a5091b0c1e1ca1e0f3c24fb42f804952fdd0a137873bc64303ba368a71ba079a6f691cee25beee9722d94cc8573 - languageName: node - linkType: hard - -"@eslint/js@npm:8.57.0": - version: 8.57.0 - resolution: "@eslint/js@npm:8.57.0" - checksum: 10c0/9a518bb8625ba3350613903a6d8c622352ab0c6557a59fe6ff6178bf882bf57123f9d92aa826ee8ac3ee74b9c6203fe630e9ee00efb03d753962dcf65ee4bd94 - languageName: node - linkType: hard - -"@ethereumjs/rlp@npm:^5.0.2": - version: 5.0.2 - resolution: "@ethereumjs/rlp@npm:5.0.2" - bin: - rlp: bin/rlp.cjs - checksum: 10c0/56162eaee96dd429f0528a9e51b453398546d57f26057b3e188f2aa09efe8bd430502971c54238ca9cc42af41b0a3f137cf67b9e020d52bc83caca043d64911b - languageName: node - linkType: hard - -"@ethereumjs/util@npm:^9.0.0": - version: 9.0.3 - resolution: "@ethereumjs/util@npm:9.0.3" - dependencies: - "@ethereumjs/rlp": "npm:^5.0.2" - ethereum-cryptography: "npm:^2.1.3" - checksum: 10c0/421218749af479f3253f5fc8a9c0f98502ac9bb33824c2f49c1372f170c3e814da1bf23c0fe35bbece626beca0422cf7361e03fe7687e35bda7c22b5e98d8116 - languageName: node - linkType: hard - "@ethersproject/abi@npm:^5.1.2": version: 5.7.0 resolution: "@ethersproject/abi@npm:5.7.0" @@ -748,31 +764,6 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.14": - version: 0.11.14 - resolution: "@humanwhocodes/config-array@npm:0.11.14" - dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.2" - debug: "npm:^4.3.1" - minimatch: "npm:^3.0.5" - checksum: 10c0/66f725b4ee5fdd8322c737cb5013e19fac72d4d69c8bf4b7feb192fcb83442b035b92186f8e9497c220e58b2d51a080f28a73f7899bc1ab288c3be172c467541 - languageName: node - linkType: hard - -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 10c0/909b69c3b86d482c26b3359db16e46a32e0fb30bd306a3c176b8313b9e7313dba0f37f519de6aa8b0a1921349e505f259d19475e123182416a506d7f87e7f529 - languageName: node - linkType: hard - -"@humanwhocodes/object-schema@npm:^2.0.2": - version: 2.0.3 - resolution: "@humanwhocodes/object-schema@npm:2.0.3" - checksum: 10c0/80520eabbfc2d32fe195a93557cef50dfe8c8905de447f022675aaf66abc33ae54098f5ea78548d925aa671cd4ab7c7daa5ad704fe42358c9b5e7db60f80696c - languageName: node - linkType: hard - "@hutson/parse-repository-url@npm:^5.0.0": version: 5.0.0 resolution: "@hutson/parse-repository-url@npm:5.0.0" @@ -1285,6 +1276,21 @@ __metadata: languageName: unknown linkType: soft +"@morpho-org/blue-sdk-viem@workspace:packages/blue-sdk-viem": + version: 0.0.0-use.local + resolution: "@morpho-org/blue-sdk-viem@workspace:packages/blue-sdk-viem" + dependencies: + "@morpho-org/blue-sdk": "workspace:*" + "@morpho-org/morpho-test": "workspace:*" + "@morpho-org/morpho-ts": "workspace:*" + "@types/jest": "npm:^29.5.12" + jest: "npm:^29.7.0" + ts-jest: "npm:^29.2.2" + typescript: "npm:^5.4.5" + viem: "npm:^2.17.4" + languageName: unknown + linkType: soft + "@morpho-org/blue-sdk@workspace:*, @morpho-org/blue-sdk@workspace:packages/blue-sdk": version: 0.0.0-use.local resolution: "@morpho-org/blue-sdk@workspace:packages/blue-sdk" @@ -1346,19 +1352,12 @@ __metadata: version: 0.0.0-use.local resolution: "@morpho-org/sdks@workspace:." dependencies: + "@biomejs/biome": "npm:^1.8.3" "@lerna-lite/cli": "npm:3.5.1" "@lerna-lite/publish": "npm:3.5.1" - "@trivago/prettier-plugin-sort-imports": "npm:^4.2.0" "@typescript-eslint/eslint-plugin": "npm:^7.12.0" "@typescript-eslint/parser": "npm:^7.12.0" - eslint: "npm:^8.46.0" - eslint-config-prettier: "npm:^8.10.0" - eslint-plugin-address: "npm:^0.0.2" - eslint-plugin-import: "npm:^2.28.0" - eslint-plugin-prettier: "npm:^4.2.0" - eslint-plugin-unused-imports: "npm:^3.2.0" husky: "npm:^9.0.11" - prettier: "npm:^3.3.3" typescript: "npm:^5.4.5" languageName: unknown linkType: soft @@ -1372,7 +1371,16 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.4.2, @noble/curves@npm:~1.4.0": +"@noble/curves@npm:1.4.0": + version: 1.4.0 + resolution: "@noble/curves@npm:1.4.0" + dependencies: + "@noble/hashes": "npm:1.4.0" + checksum: 10c0/31fbc370df91bcc5a920ca3f2ce69c8cf26dc94775a36124ed8a5a3faf0453badafd2ee4337061ffea1b43c623a90ee8b286a5a81604aaf9563bdad7ff795d18 + languageName: node + linkType: hard + +"@noble/curves@npm:~1.4.0": version: 1.4.2 resolution: "@noble/curves@npm:1.4.2" dependencies: @@ -1426,7 +1434,7 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": +"@nodelib/fs.walk@npm:^1.2.3": version: 1.2.8 resolution: "@nodelib/fs.walk@npm:1.2.8" dependencies: @@ -2159,26 +2167,6 @@ __metadata: languageName: node linkType: hard -"@trivago/prettier-plugin-sort-imports@npm:^4.2.0": - version: 4.3.0 - resolution: "@trivago/prettier-plugin-sort-imports@npm:4.3.0" - dependencies: - "@babel/generator": "npm:7.17.7" - "@babel/parser": "npm:^7.20.5" - "@babel/traverse": "npm:7.23.2" - "@babel/types": "npm:7.17.0" - javascript-natural-sort: "npm:0.7.1" - lodash: "npm:^4.17.21" - peerDependencies: - "@vue/compiler-sfc": 3.x - prettier: 2.x - 3.x - peerDependenciesMeta: - "@vue/compiler-sfc": - optional: true - checksum: 10c0/42270fb9c89e54a3f8b6ac8c43e6d0e03350e2857e902cdad4de22c78ef1864da600525595311bc7e94e51c16c7dd3882c2e048a162fdab59761ffa893756aa2 - languageName: node - linkType: hard - "@tsconfig/node10@npm:^1.0.7": version: 1.0.11 resolution: "@tsconfig/node10@npm:1.0.11" @@ -2343,13 +2331,6 @@ __metadata: languageName: node linkType: hard -"@types/json5@npm:^0.0.29": - version: 0.0.29 - resolution: "@types/json5@npm:0.0.29" - checksum: 10c0/6bf5337bc447b706bb5b4431d37686aa2ea6d07cfd6f79cc31de80170d6ff9b1c7384a9c0ccbc45b3f512bae9e9f75c2e12109806a15331dc94e8a8db6dbb4ac - languageName: node - linkType: hard - "@types/lru-cache@npm:^5.1.0": version: 5.1.1 resolution: "@types/lru-cache@npm:5.1.1" @@ -2572,13 +2553,6 @@ __metadata: languageName: node linkType: hard -"@ungap/structured-clone@npm:^1.2.0": - version: 1.2.0 - resolution: "@ungap/structured-clone@npm:1.2.0" - checksum: 10c0/8209c937cb39119f44eb63cf90c0b73e7c754209a6411c707be08e50e29ee81356dca1a848a405c8bdeebfe2f5e4f831ad310ae1689eeef65e7445c090c6657d - languageName: node - linkType: hard - "JSONStream@npm:^1.3.5": version: 1.3.5 resolution: "JSONStream@npm:1.3.5" @@ -2598,12 +2572,18 @@ __metadata: languageName: node linkType: hard -"acorn-jsx@npm:^5.3.2": - version: 5.3.2 - resolution: "acorn-jsx@npm:5.3.2" +"abitype@npm:1.0.5": + version: 1.0.5 + resolution: "abitype@npm:1.0.5" peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10c0/4c54868fbef3b8d58927d5e33f0a4de35f59012fe7b12cf9dfbb345fb8f46607709e1c4431be869a23fb63c151033d84c4198fa9f79385cec34fcb1dd53974c1 + typescript: ">=5.0.4" + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: 10c0/dc954877fba19e2b7a70f1025807d69fa5aabec8bd58ce94e68d1a5ec1697fff3fe5214b4392508db7191762150f19a2396cf66ffb1d3ba8c1f37a89fd25e598 languageName: node linkType: hard @@ -2616,7 +2596,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.11.0, acorn@npm:^8.4.1, acorn@npm:^8.9.0": +"acorn@npm:^8.11.0, acorn@npm:^8.4.1": version: 8.12.1 resolution: "acorn@npm:8.12.1" bin: @@ -2674,18 +2654,6 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.12.4": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" - dependencies: - fast-deep-equal: "npm:^3.1.1" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.4.1" - uri-js: "npm:^4.2.2" - checksum: 10c0/41e23642cbe545889245b9d2a45854ebba51cda6c778ebced9649420d9205f2efb39cb43dbc41e358409223b1ea43303ae4839db682c848b891e4811da1a5a71 - languageName: node - linkType: hard - "ansi-align@npm:^3.0.0": version: 3.0.1 resolution: "ansi-align@npm:3.0.1" @@ -2804,16 +2772,6 @@ __metadata: languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "array-buffer-byte-length@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.5" - is-array-buffer: "npm:^3.0.4" - checksum: 10c0/f5cdf54527cd18a3d2852ddf73df79efec03829e7373a8322ef5df2b4ef546fb365c19c71d6b42d641cb6bfe0f1a2f19bc0ece5b533295f86d7c3d522f228917 - languageName: node - linkType: hard - "array-ify@npm:^1.0.0": version: 1.0.0 resolution: "array-ify@npm:1.0.0" @@ -2821,20 +2779,6 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.7": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - is-string: "npm:^1.0.7" - checksum: 10c0/5b1004d203e85873b96ddc493f090c9672fd6c80d7a60b798da8a14bff8a670ff95db5aafc9abc14a211943f05220dacf8ea17638ae0af1a6a47b8c0b48ce370 - languageName: node - linkType: hard - "array-union@npm:^2.1.0": version: 2.1.0 resolution: "array-union@npm:2.1.0" @@ -2842,60 +2786,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/962189487728b034f3134802b421b5f39e42ee2356d13b42d2ddb0e52057ffdcc170b9524867f4f0611a6f638f4c19b31e14606e8bcbda67799e26685b195aa3 - languageName: node - linkType: hard - -"array.prototype.flat@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flat@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10c0/a578ed836a786efbb6c2db0899ae80781b476200617f65a44846cb1ed8bd8b24c8821b83703375d8af639c689497b7b07277060024b9919db94ac3e10dc8a49b - languageName: node - linkType: hard - -"array.prototype.flatmap@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flatmap@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10c0/67b3f1d602bb73713265145853128b1ad77cc0f9b833c7e1e056b323fbeac41a4ff1c9c99c7b9445903caea924d9ca2450578d9011913191aa88cc3c3a4b54f4 - languageName: node - linkType: hard - -"arraybuffer.prototype.slice@npm:^1.0.3": - version: 1.0.3 - resolution: "arraybuffer.prototype.slice@npm:1.0.3" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.3" - es-errors: "npm:^1.2.1" - get-intrinsic: "npm:^1.2.3" - is-array-buffer: "npm:^3.0.4" - is-shared-array-buffer: "npm:^1.0.2" - checksum: 10c0/d32754045bcb2294ade881d45140a5e52bda2321b9e98fa514797b7f0d252c4c5ab0d1edb34112652c62fa6a9398def568da63a4d7544672229afea283358c36 - languageName: node - linkType: hard - "assertion-error@npm:^1.1.0": version: 1.1.0 resolution: "assertion-error@npm:1.1.0" @@ -2910,15 +2800,6 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.7": - version: 1.0.7 - resolution: "available-typed-arrays@npm:1.0.7" - dependencies: - possible-typed-array-names: "npm:^1.0.0" - checksum: 10c0/d07226ef4f87daa01bd0fe80f8f310982e345f372926da2e5296aecc25c41cab440916bbaa4c5e1034b453af3392f67df5961124e4b586df1e99793a1374bdb2 - languageName: node - linkType: hard - "babel-jest@npm:^29.7.0": version: 29.7.0 resolution: "babel-jest@npm:29.7.0" @@ -3256,19 +3137,6 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": - version: 1.0.7 - resolution: "call-bind@npm:1.0.7" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - set-function-length: "npm:^1.2.1" - checksum: 10c0/a3ded2e423b8e2a265983dba81c27e125b48eefb2655e7dfab6be597088da3d47c47976c24bc51b8fd9af1061f8f87b4ab78a314f3c77784b2ae2ba535ad8b8d - languageName: node - linkType: hard - "callsites@npm:^3.0.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" @@ -3808,7 +3676,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -3833,39 +3701,6 @@ __metadata: languageName: node linkType: hard -"data-view-buffer@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-buffer@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.6" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.1" - checksum: 10c0/8984119e59dbed906a11fcfb417d7d861936f16697a0e7216fe2c6c810f6b5e8f4a5281e73f2c28e8e9259027190ac4a33e2a65fdd7fa86ac06b76e838918583 - languageName: node - linkType: hard - -"data-view-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-byte-length@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.7" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.1" - checksum: 10c0/b7d9e48a0cf5aefed9ab7d123559917b2d7e0d65531f43b2fd95b9d3a6b46042dd3fca597c42bba384e66b70d7ad66ff23932f8367b241f53d93af42cfe04ec2 - languageName: node - linkType: hard - -"data-view-byte-offset@npm:^1.0.0": - version: 1.0.0 - resolution: "data-view-byte-offset@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.6" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.1" - checksum: 10c0/21b0d2e53fd6e20cc4257c873bf6d36d77bd6185624b84076c0a1ddaa757b49aaf076254006341d35568e89f52eecd1ccb1a502cfb620f2beca04f48a6a62a8f - languageName: node - linkType: hard - "dataloader@npm:^2.2.2": version: 2.2.2 resolution: "dataloader@npm:2.2.2" @@ -3873,7 +3708,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5": +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.4, debug@npm:^4.3.5": version: 4.3.5 resolution: "debug@npm:4.3.5" dependencies: @@ -3885,15 +3720,6 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.2.7": - version: 3.2.7 - resolution: "debug@npm:3.2.7" - dependencies: - ms: "npm:^2.1.1" - checksum: 10c0/37d96ae42cbc71c14844d2ae3ba55adf462ec89fd3a999459dec3833944cd999af6007ff29c780f1c61153bcaaf2c842d1e4ce1ec621e4fc4923244942e4a02a - languageName: node - linkType: hard - "decamelize@npm:^4.0.0": version: 4.0.0 resolution: "decamelize@npm:4.0.0" @@ -3922,13 +3748,6 @@ __metadata: languageName: node linkType: hard -"deep-is@npm:^0.1.3": - version: 0.1.4 - resolution: "deep-is@npm:0.1.4" - checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c - languageName: node - linkType: hard - "deepmerge-ts@npm:^5.1.0": version: 5.1.0 resolution: "deepmerge-ts@npm:5.1.0" @@ -3952,28 +3771,6 @@ __metadata: languageName: node linkType: hard -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": - version: 1.1.4 - resolution: "define-data-property@npm:1.1.4" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.0.1" - checksum: 10c0/dea0606d1483eb9db8d930d4eac62ca0fa16738b0b3e07046cddfacf7d8c868bbe13fa0cb263eb91c7d0d527960dc3f2f2471a69ed7816210307f6744fe62e37 - languageName: node - linkType: hard - -"define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": - version: 1.2.1 - resolution: "define-properties@npm:1.2.1" - dependencies: - define-data-property: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/88a152319ffe1396ccc6ded510a3896e77efac7a1bfbaa174a7b00414a1747377e0bb525d303794a47cf30e805c2ec84e575758512c6e44a993076d29fd4e6c3 - languageName: node - linkType: hard - "depd@npm:2.0.0": version: 2.0.0 resolution: "depd@npm:2.0.0" @@ -4032,24 +3829,6 @@ __metadata: languageName: node linkType: hard -"doctrine@npm:^2.1.0": - version: 2.1.0 - resolution: "doctrine@npm:2.1.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10c0/b6416aaff1f380bf56c3b552f31fdf7a69b45689368deca72d28636f41c16bb28ec3ebc40ace97db4c1afc0ceeb8120e8492fe0046841c94c2933b2e30a7d5ac - languageName: node - linkType: hard - -"doctrine@npm:^3.0.0": - version: 3.0.0 - resolution: "doctrine@npm:3.0.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10c0/c96bdccabe9d62ab6fea9399fdff04a66e6563c1d6fb3a3a063e8d53c3bb136ba63e84250bbf63d00086a769ad53aef92d2bd483f03f837fc97b71cbee6b2520 - languageName: node - linkType: hard - "dot-prop@npm:^5.1.0": version: 5.3.0 resolution: "dot-prop@npm:5.3.0" @@ -4191,116 +3970,6 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.2": - version: 1.23.3 - resolution: "es-abstract@npm:1.23.3" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - arraybuffer.prototype.slice: "npm:^1.0.3" - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.7" - data-view-buffer: "npm:^1.0.1" - data-view-byte-length: "npm:^1.0.1" - data-view-byte-offset: "npm:^1.0.0" - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-set-tostringtag: "npm:^2.0.3" - es-to-primitive: "npm:^1.2.1" - function.prototype.name: "npm:^1.1.6" - get-intrinsic: "npm:^1.2.4" - get-symbol-description: "npm:^1.0.2" - globalthis: "npm:^1.0.3" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.2" - internal-slot: "npm:^1.0.7" - is-array-buffer: "npm:^3.0.4" - is-callable: "npm:^1.2.7" - is-data-view: "npm:^1.0.1" - is-negative-zero: "npm:^2.0.3" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.3" - is-string: "npm:^1.0.7" - is-typed-array: "npm:^1.1.13" - is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.13.1" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.5" - regexp.prototype.flags: "npm:^1.5.2" - safe-array-concat: "npm:^1.1.2" - safe-regex-test: "npm:^1.0.3" - string.prototype.trim: "npm:^1.2.9" - string.prototype.trimend: "npm:^1.0.8" - string.prototype.trimstart: "npm:^1.0.8" - typed-array-buffer: "npm:^1.0.2" - typed-array-byte-length: "npm:^1.0.1" - typed-array-byte-offset: "npm:^1.0.2" - typed-array-length: "npm:^1.0.6" - unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.15" - checksum: 10c0/d27e9afafb225c6924bee9971a7f25f20c314f2d6cb93a63cada4ac11dcf42040896a6c22e5fb8f2a10767055ed4ddf400be3b1eb12297d281726de470b75666 - languageName: node - linkType: hard - -"es-define-property@npm:^1.0.0": - version: 1.0.0 - resolution: "es-define-property@npm:1.0.0" - dependencies: - get-intrinsic: "npm:^1.2.4" - checksum: 10c0/6bf3191feb7ea2ebda48b577f69bdfac7a2b3c9bcf97307f55fd6ef1bbca0b49f0c219a935aca506c993d8c5d8bddd937766cb760cd5e5a1071351f2df9f9aa4 - languageName: node - linkType: hard - -"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 - languageName: node - linkType: hard - -"es-object-atoms@npm:^1.0.0": - version: 1.0.0 - resolution: "es-object-atoms@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - checksum: 10c0/1fed3d102eb27ab8d983337bb7c8b159dd2a1e63ff833ec54eea1311c96d5b08223b433060ba240541ca8adba9eee6b0a60cdbf2f80634b784febc9cc8b687b4 - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.0.3": - version: 2.0.3 - resolution: "es-set-tostringtag@npm:2.0.3" - dependencies: - get-intrinsic: "npm:^1.2.4" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.1" - checksum: 10c0/f22aff1585eb33569c326323f0b0d175844a1f11618b86e193b386f8be0ea9474cfbe46df39c45d959f7aa8f6c06985dc51dd6bce5401645ec5a74c4ceaa836a - languageName: node - linkType: hard - -"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": - version: 1.0.2 - resolution: "es-shim-unscopables@npm:1.0.2" - dependencies: - hasown: "npm:^2.0.0" - checksum: 10c0/f495af7b4b7601a4c0cfb893581c352636e5c08654d129590386a33a0432cf13a7bdc7b6493801cadd990d838e2839b9013d1de3b880440cb537825e834fe783 - languageName: node - linkType: hard - -"es-to-primitive@npm:^1.2.1": - version: 1.2.1 - resolution: "es-to-primitive@npm:1.2.1" - dependencies: - is-callable: "npm:^1.1.4" - is-date-object: "npm:^1.0.1" - is-symbol: "npm:^1.0.2" - checksum: 10c0/0886572b8dc075cb10e50c0af62a03d03a68e1e69c388bd4f10c0649ee41b1fbb24840a1b7e590b393011b5cdbe0144b776da316762653685432df37d6de60f1 - languageName: node - linkType: hard - "escalade@npm:^3.1.1, escalade@npm:^3.1.2": version: 3.1.2 resolution: "escalade@npm:3.1.2" @@ -4329,189 +3998,10 @@ __metadata: languageName: node linkType: hard -"eslint-config-prettier@npm:^8.10.0": - version: 8.10.0 - resolution: "eslint-config-prettier@npm:8.10.0" - peerDependencies: - eslint: ">=7.0.0" - bin: - eslint-config-prettier: bin/cli.js - checksum: 10c0/19f8c497d9bdc111a17a61b25ded97217be3755bbc4714477dfe535ed539dddcaf42ef5cf8bb97908b058260cf89a3d7c565cb0be31096cbcd39f4c2fa5fe43c - languageName: node - linkType: hard - -"eslint-import-resolver-node@npm:^0.3.9": - version: 0.3.9 - resolution: "eslint-import-resolver-node@npm:0.3.9" - dependencies: - debug: "npm:^3.2.7" - is-core-module: "npm:^2.13.0" - resolve: "npm:^1.22.4" - checksum: 10c0/0ea8a24a72328a51fd95aa8f660dcca74c1429806737cf10261ab90cfcaaf62fd1eff664b76a44270868e0a932711a81b250053942595bcd00a93b1c1575dd61 - languageName: node - linkType: hard - -"eslint-module-utils@npm:^2.8.0": - version: 2.8.1 - resolution: "eslint-module-utils@npm:2.8.1" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10c0/1aeeb97bf4b688d28de136ee57c824480c37691b40fa825c711a4caf85954e94b99c06ac639d7f1f6c1d69223bd21bcb991155b3e589488e958d5b83dfd0f882 - languageName: node - linkType: hard - -"eslint-plugin-address@npm:^0.0.2": - version: 0.0.2 - resolution: "eslint-plugin-address@npm:0.0.2" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@ethereumjs/util": "npm:^9.0.0" - peerDependencies: - eslint: ">=8.0.0" - checksum: 10c0/117a1c824d6cbeeec09b0e330d094c68f568d424f10fc30d1413596cb1e17bac56e29649a73bb49e788f72db05ca0a6acebd3b01eaa991113e7cea73eeec0876 - languageName: node - linkType: hard - -"eslint-plugin-import@npm:^2.28.0": - version: 2.29.1 - resolution: "eslint-plugin-import@npm:2.29.1" - dependencies: - array-includes: "npm:^3.1.7" - array.prototype.findlastindex: "npm:^1.2.3" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" - debug: "npm:^3.2.7" - doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.8.0" - hasown: "npm:^2.0.0" - is-core-module: "npm:^2.13.1" - is-glob: "npm:^4.0.3" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.7" - object.groupby: "npm:^1.0.1" - object.values: "npm:^1.1.7" - semver: "npm:^6.3.1" - tsconfig-paths: "npm:^3.15.0" - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 10c0/5f35dfbf4e8e67f741f396987de9504ad125c49f4144508a93282b4ea0127e052bde65ab6def1f31b6ace6d5d430be698333f75bdd7dca3bc14226c92a083196 - languageName: node - linkType: hard - -"eslint-plugin-prettier@npm:^4.2.0": - version: 4.2.1 - resolution: "eslint-plugin-prettier@npm:4.2.1" - dependencies: - prettier-linter-helpers: "npm:^1.0.0" - peerDependencies: - eslint: ">=7.28.0" - prettier: ">=2.0.0" - peerDependenciesMeta: - eslint-config-prettier: - optional: true - checksum: 10c0/c5e7316baeab9d96ac39c279f16686e837277e5c67a8006c6588bcff317edffdc1532fb580441eb598bc6770f6444006756b68a6575dff1cd85ebe227252d0b7 - languageName: node - linkType: hard - -"eslint-plugin-unused-imports@npm:^3.2.0": - version: 3.2.0 - resolution: "eslint-plugin-unused-imports@npm:3.2.0" - dependencies: - eslint-rule-composer: "npm:^0.3.0" - peerDependencies: - "@typescript-eslint/eslint-plugin": 6 - 7 - eslint: 8 - peerDependenciesMeta: - "@typescript-eslint/eslint-plugin": - optional: true - checksum: 10c0/70c93efaa4dccd1172db3858b27968184c97cb8b7ffb2d9e6ffb09d9509863c70651b533b48eec4d10bc7f633d7f50fd190fdd5b36e8cac2c4efd5cecb5d5d98 - languageName: node - linkType: hard - -"eslint-rule-composer@npm:^0.3.0": - version: 0.3.0 - resolution: "eslint-rule-composer@npm:0.3.0" - checksum: 10c0/1f0c40d209e1503a955101a0dbba37e7fc67c8aaa47a5b9ae0b0fcbae7022c86e52b3df2b1b9ffd658e16cd80f31fff92e7222460a44d8251e61d49e0af79a07 - languageName: node - linkType: hard - -"eslint-scope@npm:^7.2.2": - version: 7.2.2 - resolution: "eslint-scope@npm:7.2.2" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10c0/613c267aea34b5a6d6c00514e8545ef1f1433108097e857225fed40d397dd6b1809dffd11c2fde23b37ca53d7bf935fe04d2a18e6fc932b31837b6ad67e1c116 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": - version: 3.4.3 - resolution: "eslint-visitor-keys@npm:3.4.3" - checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 - languageName: node - linkType: hard - -"eslint@npm:^8.46.0": - version: 8.57.0 - resolution: "eslint@npm:8.57.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.57.0" - "@humanwhocodes/config-array": "npm:^0.11.14" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - "@ungap/structured-clone": "npm:^1.2.0" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" - debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.2" - eslint-visitor-keys: "npm:^3.4.3" - espree: "npm:^9.6.1" - esquery: "npm:^1.4.2" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - globals: "npm:^13.19.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-yaml: "npm:^4.1.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" - bin: - eslint: bin/eslint.js - checksum: 10c0/00bb96fd2471039a312435a6776fe1fd557c056755eaa2b96093ef3a8508c92c8775d5f754768be6b1dddd09fdd3379ddb231eeb9b6c579ee17ea7d68000a529 - languageName: node - linkType: hard - -"espree@npm:^9.6.0, espree@npm:^9.6.1": - version: 9.6.1 - resolution: "espree@npm:9.6.1" - dependencies: - acorn: "npm:^8.9.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10c0/1a2e9b4699b715347f62330bcc76aee224390c28bb02b31a3752e9d07549c473f5f986720483c6469cf3cfb3c9d05df612ffc69eb1ee94b54b739e67de9bb460 +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.3": + version: 3.4.3 + resolution: "eslint-visitor-keys@npm:3.4.3" + checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 languageName: node linkType: hard @@ -4525,38 +4015,6 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.4.2": - version: 1.6.0 - resolution: "esquery@npm:1.6.0" - dependencies: - estraverse: "npm:^5.1.0" - checksum: 10c0/cb9065ec605f9da7a76ca6dadb0619dfb611e37a81e318732977d90fab50a256b95fee2d925fba7c2f3f0523aa16f91587246693bc09bc34d5a59575fe6e93d2 - languageName: node - linkType: hard - -"esrecurse@npm:^4.3.0": - version: 4.3.0 - resolution: "esrecurse@npm:4.3.0" - dependencies: - estraverse: "npm:^5.2.0" - checksum: 10c0/81a37116d1408ded88ada45b9fb16dbd26fba3aadc369ce50fcaf82a0bac12772ebd7b24cd7b91fc66786bf2c1ac7b5f196bc990a473efff972f5cb338877cf5 - languageName: node - linkType: hard - -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": - version: 5.3.0 - resolution: "estraverse@npm:5.3.0" - checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 - languageName: node - linkType: hard - -"esutils@npm:^2.0.2": - version: 2.0.3 - resolution: "esutils@npm:2.0.3" - checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 - languageName: node - linkType: hard - "ethereum-cryptography@npm:0.1.3, ethereum-cryptography@npm:^0.1.3": version: 0.1.3 resolution: "ethereum-cryptography@npm:0.1.3" @@ -4592,18 +4050,6 @@ __metadata: languageName: node linkType: hard -"ethereum-cryptography@npm:^2.1.3": - version: 2.2.1 - resolution: "ethereum-cryptography@npm:2.2.1" - dependencies: - "@noble/curves": "npm:1.4.2" - "@noble/hashes": "npm:1.4.0" - "@scure/bip32": "npm:1.4.0" - "@scure/bip39": "npm:1.3.0" - checksum: 10c0/c6c7626d393980577b57f709878b2eb91f270fe56116044b1d7afb70d5c519cddc0c072e8c05e4a335e05342eb64d9c3ab39d52f78bb75f76ad70817da9645ef - languageName: node - linkType: hard - "ethereumjs-abi@npm:^0.6.8": version: 0.6.8 resolution: "ethereumjs-abi@npm:0.6.8" @@ -4778,20 +4224,6 @@ __metadata: languageName: node linkType: hard -"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": - version: 3.1.3 - resolution: "fast-deep-equal@npm:3.1.3" - checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0 - languageName: node - linkType: hard - -"fast-diff@npm:^1.1.2": - version: 1.3.0 - resolution: "fast-diff@npm:1.3.0" - checksum: 10c0/5c19af237edb5d5effda008c891a18a585f74bf12953be57923f17a3a4d0979565fc64dbc73b9e20926b9d895f5b690c618cbb969af0cf022e3222471220ad29 - languageName: node - linkType: hard - "fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" @@ -4805,20 +4237,13 @@ __metadata: languageName: node linkType: hard -"fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": +"fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" checksum: 10c0/7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b languageName: node linkType: hard -"fast-levenshtein@npm:^2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 - languageName: node - linkType: hard - "fastq@npm:^1.6.0": version: 1.17.1 resolution: "fastq@npm:1.17.1" @@ -4854,15 +4279,6 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^6.0.1": - version: 6.0.1 - resolution: "file-entry-cache@npm:6.0.1" - dependencies: - flat-cache: "npm:^3.0.4" - checksum: 10c0/58473e8a82794d01b38e5e435f6feaf648e3f36fdb3a56e98f417f4efae71ad1c0d4ebd8a9a7c50c3ad085820a93fc7494ad721e0e4ebc1da3573f4e1c3c7cdd - languageName: node - linkType: hard - "filelist@npm:^1.0.4": version: 1.0.4 resolution: "filelist@npm:1.0.4" @@ -4920,17 +4336,6 @@ __metadata: languageName: node linkType: hard -"flat-cache@npm:^3.0.4": - version: 3.2.0 - resolution: "flat-cache@npm:3.2.0" - dependencies: - flatted: "npm:^3.2.9" - keyv: "npm:^4.5.3" - rimraf: "npm:^3.0.2" - checksum: 10c0/b76f611bd5f5d68f7ae632e3ae503e678d205cf97a17c6ab5b12f6ca61188b5f1f7464503efae6dc18683ed8f0b41460beb48ac4b9ac63fe6201296a91ba2f75 - languageName: node - linkType: hard - "flat@npm:^5.0.2": version: 5.0.2 resolution: "flat@npm:5.0.2" @@ -4940,13 +4345,6 @@ __metadata: languageName: node linkType: hard -"flatted@npm:^3.2.9": - version: 3.3.1 - resolution: "flatted@npm:3.3.1" - checksum: 10c0/324166b125ee07d4ca9bcf3a5f98d915d5db4f39d711fba640a3178b959919aae1f7cfd8aabcfef5826ed8aa8a2aa14cc85b2d7d18ff638ddf4ae3df39573eaf - languageName: node - linkType: hard - "follow-redirects@npm:^1.12.1": version: 1.15.6 resolution: "follow-redirects@npm:1.15.6" @@ -4957,15 +4355,6 @@ __metadata: languageName: node linkType: hard -"for-each@npm:^0.3.3": - version: 0.3.3 - resolution: "for-each@npm:0.3.3" - dependencies: - is-callable: "npm:^1.1.3" - checksum: 10c0/22330d8a2db728dbf003ec9182c2d421fbcd2969b02b4f97ec288721cda63eb28f2c08585ddccd0f77cb2930af8d958005c9e72f47141dc51816127a118f39aa - languageName: node - linkType: hard - "foreground-child@npm:^3.1.0": version: 3.2.1 resolution: "foreground-child@npm:3.2.1" @@ -5072,25 +4461,6 @@ __metadata: languageName: node linkType: hard -"function.prototype.name@npm:^1.1.6": - version: 1.1.6 - resolution: "function.prototype.name@npm:1.1.6" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - functions-have-names: "npm:^1.2.3" - checksum: 10c0/9eae11294905b62cb16874adb4fc687927cda3162285e0ad9612e6a1d04934005d46907362ea9cdb7428edce05a2f2c3dabc3b2d21e9fd343e9bb278230ad94b - languageName: node - linkType: hard - -"functions-have-names@npm:^1.2.3": - version: 1.2.3 - resolution: "functions-have-names@npm:1.2.3" - checksum: 10c0/33e77fd29bddc2d9bb78ab3eb854c165909201f88c75faa8272e35899e2d35a8a642a15e7420ef945e1f64a9670d6aa3ec744106b2aa42be68ca5114025954ca - languageName: node - linkType: hard - "gauge@npm:^5.0.0": version: 5.0.2 resolution: "gauge@npm:5.0.2" @@ -5128,19 +4498,6 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": - version: 1.2.4 - resolution: "get-intrinsic@npm:1.2.4" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.0" - checksum: 10c0/0a9b82c16696ed6da5e39b1267104475c47e3a9bdbe8b509dfe1710946e38a87be70d759f4bb3cda042d76a41ef47fe769660f3b7c0d1f68750299344ffb15b7 - languageName: node - linkType: hard - "get-package-type@npm:^0.1.0": version: 0.1.0 resolution: "get-package-type@npm:0.1.0" @@ -5172,17 +4529,6 @@ __metadata: languageName: node linkType: hard -"get-symbol-description@npm:^1.0.2": - version: 1.0.2 - resolution: "get-symbol-description@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.5" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.4" - checksum: 10c0/867be6d63f5e0eb026cb3b0ef695ec9ecf9310febb041072d2e142f260bd91ced9eeb426b3af98791d1064e324e653424afa6fd1af17dee373bea48ae03162bc - languageName: node - linkType: hard - "git-raw-commits@npm:^4.0.0": version: 4.0.0 resolution: "git-raw-commits@npm:4.0.0" @@ -5309,25 +4655,6 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.19.0": - version: 13.24.0 - resolution: "globals@npm:13.24.0" - dependencies: - type-fest: "npm:^0.20.2" - checksum: 10c0/d3c11aeea898eb83d5ec7a99508600fbe8f83d2cf00cbb77f873dbf2bcb39428eff1b538e4915c993d8a3b3473fa71eeebfe22c9bb3a3003d1e26b1f2c8a42cd - languageName: node - linkType: hard - -"globalthis@npm:^1.0.3": - version: 1.0.4 - resolution: "globalthis@npm:1.0.4" - dependencies: - define-properties: "npm:^1.2.1" - gopd: "npm:^1.0.1" - checksum: 10c0/9d156f313af79d80b1566b93e19285f481c591ad6d0d319b4be5e03750d004dde40a39a0f26f7e635f9007a3600802f53ecd85a759b86f109e80a5f705e01846 - languageName: node - linkType: hard - "globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" @@ -5356,15 +4683,6 @@ __metadata: languageName: node linkType: hard -"gopd@npm:^1.0.1": - version: 1.0.1 - resolution: "gopd@npm:1.0.1" - dependencies: - get-intrinsic: "npm:^1.1.3" - checksum: 10c0/505c05487f7944c552cee72087bf1567debb470d4355b1335f2c262d218ebbff805cd3715448fe29b4b380bae6912561d0467233e4165830efd28da241418c63 - languageName: node - linkType: hard - "graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" @@ -5458,13 +4776,6 @@ __metadata: languageName: node linkType: hard -"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": - version: 1.0.2 - resolution: "has-bigints@npm:1.0.2" - checksum: 10c0/724eb1485bfa3cdff6f18d95130aa190561f00b3fcf9f19dc640baf8176b5917c143b81ec2123f8cddb6c05164a198c94b13e1377c497705ccc8e1a80306e83b - languageName: node - linkType: hard - "has-flag@npm:^3.0.0": version: 3.0.0 resolution: "has-flag@npm:3.0.0" @@ -5479,38 +4790,6 @@ __metadata: languageName: node linkType: hard -"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": - version: 1.0.2 - resolution: "has-property-descriptors@npm:1.0.2" - dependencies: - es-define-property: "npm:^1.0.0" - checksum: 10c0/253c1f59e80bb476cf0dde8ff5284505d90c3bdb762983c3514d36414290475fe3fd6f574929d84de2a8eec00d35cf07cb6776205ff32efd7c50719125f00236 - languageName: node - linkType: hard - -"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": - version: 1.0.3 - resolution: "has-proto@npm:1.0.3" - checksum: 10c0/35a6989f81e9f8022c2f4027f8b48a552de714938765d019dbea6bb547bd49ce5010a3c7c32ec6ddac6e48fc546166a3583b128f5a7add8b058a6d8b4afec205 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": - version: 1.0.3 - resolution: "has-symbols@npm:1.0.3" - checksum: 10c0/e6922b4345a3f37069cdfe8600febbca791c94988c01af3394d86ca3360b4b93928bbf395859158f88099cb10b19d98e3bbab7c9ff2c1bd09cf665ee90afa2c3 - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": - version: 1.0.2 - resolution: "has-tostringtag@npm:1.0.2" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c - languageName: node - linkType: hard - "has-unicode@npm:^2.0.1": version: 2.0.1 resolution: "has-unicode@npm:2.0.1" @@ -5539,7 +4818,7 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": +"hasown@npm:^2.0.2": version: 2.0.2 resolution: "hasown@npm:2.0.2" dependencies: @@ -5714,7 +4993,7 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": +"import-fresh@npm:^3.3.0": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" dependencies: @@ -5808,17 +5087,6 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.7": - version: 1.0.7 - resolution: "internal-slot@npm:1.0.7" - dependencies: - es-errors: "npm:^1.3.0" - hasown: "npm:^2.0.0" - side-channel: "npm:^1.0.4" - checksum: 10c0/f8b294a4e6ea3855fc59551bbf35f2b832cf01fd5e6e2a97f5c201a071cc09b49048f856e484b67a6c721da5e55736c5b6ddafaf19e2dbeb4a3ff1821680de6c - languageName: node - linkType: hard - "io-ts@npm:1.10.4": version: 1.10.4 resolution: "io-ts@npm:1.10.4" @@ -5838,16 +5106,6 @@ __metadata: languageName: node linkType: hard -"is-array-buffer@npm:^3.0.4": - version: 3.0.4 - resolution: "is-array-buffer@npm:3.0.4" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.1" - checksum: 10c0/42a49d006cc6130bc5424eae113e948c146f31f9d24460fc0958f855d9d810e6fd2e4519bf19aab75179af9c298ea6092459d8cafdec523cd19e529b26eab860 - languageName: node - linkType: hard - "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -5855,15 +5113,6 @@ __metadata: languageName: node linkType: hard -"is-bigint@npm:^1.0.1": - version: 1.0.4 - resolution: "is-bigint@npm:1.0.4" - dependencies: - has-bigints: "npm:^1.0.1" - checksum: 10c0/eb9c88e418a0d195ca545aff2b715c9903d9b0a5033bc5922fec600eb0c3d7b1ee7f882dbf2e0d5a6e694e42391be3683e4368737bd3c4a77f8ac293e7773696 - languageName: node - linkType: hard - "is-binary-path@npm:~2.1.0": version: 2.1.0 resolution: "is-binary-path@npm:2.1.0" @@ -5873,23 +5122,6 @@ __metadata: languageName: node linkType: hard -"is-boolean-object@npm:^1.1.0": - version: 1.1.2 - resolution: "is-boolean-object@npm:1.1.2" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/6090587f8a8a8534c0f816da868bc94f32810f08807aa72fa7e79f7e11c466d281486ffe7a788178809c2aa71fe3e700b167fe80dd96dad68026bfff8ebf39f7 - languageName: node - linkType: hard - -"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": - version: 1.2.7 - resolution: "is-callable@npm:1.2.7" - checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f - languageName: node - linkType: hard - "is-ci@npm:^3.0.1": version: 3.0.1 resolution: "is-ci@npm:3.0.1" @@ -5901,7 +5133,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1": +"is-core-module@npm:^2.13.0": version: 2.14.0 resolution: "is-core-module@npm:2.14.0" dependencies: @@ -5910,24 +5142,6 @@ __metadata: languageName: node linkType: hard -"is-data-view@npm:^1.0.1": - version: 1.0.1 - resolution: "is-data-view@npm:1.0.1" - dependencies: - is-typed-array: "npm:^1.1.13" - checksum: 10c0/a3e6ec84efe303da859107aed9b970e018e2bee7ffcb48e2f8096921a493608134240e672a2072577e5f23a729846241d9634806e8a0e51d9129c56d5f65442d - languageName: node - linkType: hard - -"is-date-object@npm:^1.0.1": - version: 1.0.5 - resolution: "is-date-object@npm:1.0.5" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/eed21e5dcc619c48ccef804dfc83a739dbb2abee6ca202838ee1bd5f760fe8d8a93444f0d49012ad19bb7c006186e2884a1b92f6e1c056da7fd23d0a9ad5992e - languageName: node - linkType: hard - "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -5949,7 +5163,7 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": +"is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" dependencies: @@ -5979,22 +5193,6 @@ __metadata: languageName: node linkType: hard -"is-negative-zero@npm:^2.0.3": - version: 2.0.3 - resolution: "is-negative-zero@npm:2.0.3" - checksum: 10c0/bcdcf6b8b9714063ffcfa9929c575ac69bfdabb8f4574ff557dfc086df2836cf07e3906f5bbc4f2a5c12f8f3ba56af640c843cdfc74da8caed86c7c7d66fd08e - languageName: node - linkType: hard - -"is-number-object@npm:^1.0.4": - version: 1.0.7 - resolution: "is-number-object@npm:1.0.7" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/aad266da1e530f1804a2b7bd2e874b4869f71c98590b3964f9d06cc9869b18f8d1f4778f838ecd2a11011bce20aeecb53cb269ba916209b79c24580416b74b1b - languageName: node - linkType: hard - "is-number@npm:^7.0.0": version: 7.0.0 resolution: "is-number@npm:7.0.0" @@ -6009,13 +5207,6 @@ __metadata: languageName: node linkType: hard -"is-path-inside@npm:^3.0.3": - version: 3.0.3 - resolution: "is-path-inside@npm:3.0.3" - checksum: 10c0/cf7d4ac35fb96bab6a1d2c3598fe5ebb29aafb52c0aaa482b5a3ed9d8ba3edc11631e3ec2637660c44b3ce0e61a08d54946e8af30dec0b60a7c27296c68ffd05 - languageName: node - linkType: hard - "is-plain-obj@npm:^2.1.0": version: 2.1.0 resolution: "is-plain-obj@npm:2.1.0" @@ -6039,25 +5230,6 @@ __metadata: languageName: node linkType: hard -"is-regex@npm:^1.1.4": - version: 1.1.4 - resolution: "is-regex@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/bb72aae604a69eafd4a82a93002058c416ace8cde95873589a97fc5dac96a6c6c78a9977d487b7b95426a8f5073969124dd228f043f9f604f041f32fcc465fc1 - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": - version: 1.0.3 - resolution: "is-shared-array-buffer@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - checksum: 10c0/adc11ab0acbc934a7b9e5e9d6c588d4ec6682f6fea8cda5180721704fa32927582ede5b123349e32517fdadd07958973d24716c80e7ab198970c47acc09e59c7 - languageName: node - linkType: hard - "is-ssh@npm:^1.4.0": version: 1.4.0 resolution: "is-ssh@npm:1.4.0" @@ -6088,24 +5260,6 @@ __metadata: languageName: node linkType: hard -"is-string@npm:^1.0.5, is-string@npm:^1.0.7": - version: 1.0.7 - resolution: "is-string@npm:1.0.7" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/905f805cbc6eedfa678aaa103ab7f626aac9ebbdc8737abb5243acaa61d9820f8edc5819106b8fcd1839e33db21de9f0116ae20de380c8382d16dc2a601921f6 - languageName: node - linkType: hard - -"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": - version: 1.0.4 - resolution: "is-symbol@npm:1.0.4" - dependencies: - has-symbols: "npm:^1.0.2" - checksum: 10c0/9381dd015f7c8906154dbcbf93fad769de16b4b961edc94f88d26eb8c555935caa23af88bda0c93a18e65560f6d7cca0fd5a3f8a8e1df6f1abbb9bead4502ef7 - languageName: node - linkType: hard - "is-text-path@npm:^2.0.0": version: 2.0.0 resolution: "is-text-path@npm:2.0.0" @@ -6115,15 +5269,6 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.13": - version: 1.1.13 - resolution: "is-typed-array@npm:1.1.13" - dependencies: - which-typed-array: "npm:^1.1.14" - checksum: 10c0/fa5cb97d4a80e52c2cc8ed3778e39f175a1a2ae4ddf3adae3187d69586a1fd57cfa0b095db31f66aa90331e9e3da79184cea9c6abdcd1abc722dc3c3edd51cca - languageName: node - linkType: hard - "is-typedarray@npm:^1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" @@ -6138,22 +5283,6 @@ __metadata: languageName: node linkType: hard -"is-weakref@npm:^1.0.2": - version: 1.0.2 - resolution: "is-weakref@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10c0/1545c5d172cb690c392f2136c23eec07d8d78a7f57d0e41f10078aa4f5daf5d7f57b6513a67514ab4f073275ad00c9822fc8935e00229d0a2089e1c02685d4b1 - languageName: node - linkType: hard - -"isarray@npm:^2.0.5": - version: 2.0.5 - resolution: "isarray@npm:2.0.5" - checksum: 10c0/4199f14a7a13da2177c66c31080008b7124331956f47bca57dd0b6ea9f11687aa25e565a2c7a2b519bc86988d10398e3049a1f5df13c9f6b7664154690ae79fd - languageName: node - linkType: hard - "isexe@npm:^2.0.0": version: 2.0.0 resolution: "isexe@npm:2.0.0" @@ -6175,6 +5304,15 @@ __metadata: languageName: node linkType: hard +"isows@npm:1.0.4": + version: 1.0.4 + resolution: "isows@npm:1.0.4" + peerDependencies: + ws: "*" + checksum: 10c0/46f43b07edcf148acba735ddfc6ed985e1e124446043ea32b71023e67671e46619c8818eda8c34a9ac91cb37c475af12a3aeeee676a88a0aceb5d67a3082313f + languageName: node + linkType: hard + "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": version: 3.2.2 resolution: "istanbul-lib-coverage@npm:3.2.2" @@ -6267,13 +5405,6 @@ __metadata: languageName: node linkType: hard -"javascript-natural-sort@npm:0.7.1": - version: 0.7.1 - resolution: "javascript-natural-sort@npm:0.7.1" - checksum: 10c0/340f8ffc5d30fb516e06dc540e8fa9e0b93c865cf49d791fed3eac3bdc5fc71f0066fc81d44ec1433edc87caecaf9f13eec4a1fce8c5beafc709a71eaedae6fe - languageName: node - linkType: hard - "jest-changed-files@npm:^29.7.0": version: 29.7.0 resolution: "jest-changed-files@npm:29.7.0" @@ -6766,13 +5897,6 @@ __metadata: languageName: node linkType: hard -"json-buffer@npm:3.0.1": - version: 3.0.1 - resolution: "json-buffer@npm:3.0.1" - checksum: 10c0/0d1c91569d9588e7eef2b49b59851f297f3ab93c7b35c7c221e288099322be6b562767d11e4821da500f3219542b9afd2e54c5dc573107c1126ed1080f8e96d7 - languageName: node - linkType: hard - "json-parse-even-better-errors@npm:^2.3.0": version: 2.3.1 resolution: "json-parse-even-better-errors@npm:2.3.1" @@ -6787,20 +5911,6 @@ __metadata: languageName: node linkType: hard -"json-schema-traverse@npm:^0.4.1": - version: 0.4.1 - resolution: "json-schema-traverse@npm:0.4.1" - checksum: 10c0/108fa90d4cc6f08243aedc6da16c408daf81793bf903e9fd5ab21983cda433d5d2da49e40711da016289465ec2e62e0324dcdfbc06275a607fe3233fde4942ce - languageName: node - linkType: hard - -"json-stable-stringify-without-jsonify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" - checksum: 10c0/cb168b61fd4de83e58d09aaa6425ef71001bae30d260e2c57e7d09a5fd82223e2f22a042dedaab8db23b7d9ae46854b08bb1f91675a8be11c5cffebef5fb66a5 - languageName: node - linkType: hard - "json-stringify-safe@npm:^5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -6808,17 +5918,6 @@ __metadata: languageName: node linkType: hard -"json5@npm:^1.0.2": - version: 1.0.2 - resolution: "json5@npm:1.0.2" - dependencies: - minimist: "npm:^1.2.0" - bin: - json5: lib/cli.js - checksum: 10c0/9ee316bf21f000b00752e6c2a3b79ecf5324515a5c60ee88983a1910a45426b643a4f3461657586e8aeca87aaf96f0a519b0516d2ae527a6c3e7eed80f68717f - languageName: node - linkType: hard - "json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" @@ -6890,15 +5989,6 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3": - version: 4.5.4 - resolution: "keyv@npm:4.5.4" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10c0/aa52f3c5e18e16bb6324876bb8b59dd02acf782a4b789c7b2ae21107fab95fab3890ed448d4f8dba80ce05391eeac4bfabb4f02a20221342982f806fa2cf271e - languageName: node - linkType: hard - "kind-of@npm:^6.0.2": version: 6.0.3 resolution: "kind-of@npm:6.0.3" @@ -6920,16 +6010,6 @@ __metadata: languageName: node linkType: hard -"levn@npm:^0.4.1": - version: 0.4.1 - resolution: "levn@npm:0.4.1" - dependencies: - prelude-ls: "npm:^1.2.1" - type-check: "npm:~0.4.0" - checksum: 10c0/effb03cad7c89dfa5bd4f6989364bfc79994c2042ec5966cb9b95990e2edee5cd8969ddf42616a0373ac49fac1403437deaf6e9050fbbaa3546093a59b9ac94e - languageName: node - linkType: hard - "libnpmaccess@npm:^8.0.6": version: 8.0.6 resolution: "libnpmaccess@npm:8.0.6" @@ -7035,14 +6115,7 @@ __metadata: languageName: node linkType: hard -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 - languageName: node - linkType: hard - -"lodash@npm:^4.17.11, lodash@npm:^4.17.21": +"lodash@npm:^4.17.11": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c @@ -7220,7 +6293,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -7247,7 +6320,7 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6": +"minimist@npm:^1.2.0, minimist@npm:^1.2.5": version: 1.2.8 resolution: "minimist@npm:1.2.8" checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 @@ -7394,7 +6467,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:^2.1.1, ms@npm:^2.1.3": +"ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 @@ -7686,66 +6759,6 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.13.1": - version: 1.13.2 - resolution: "object-inspect@npm:1.13.2" - checksum: 10c0/b97835b4c91ec37b5fd71add84f21c3f1047d1d155d00c0fcd6699516c256d4fcc6ff17a1aced873197fe447f91a3964178fd2a67a1ee2120cdaf60e81a050b4 - languageName: node - linkType: hard - -"object-keys@npm:^1.1.1": - version: 1.1.1 - resolution: "object-keys@npm:1.1.1" - checksum: 10c0/b11f7ccdbc6d406d1f186cdadb9d54738e347b2692a14439ca5ac70c225fa6db46db809711b78589866d47b25fc3e8dee0b4c722ac751e11180f9380e3d8601d - languageName: node - linkType: hard - -"object.assign@npm:^4.1.5": - version: 4.1.5 - resolution: "object.assign@npm:4.1.5" - dependencies: - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - object-keys: "npm:^1.1.1" - checksum: 10c0/60108e1fa2706f22554a4648299b0955236c62b3685c52abf4988d14fffb0e7731e00aa8c6448397e3eb63d087dcc124a9f21e1980f36d0b2667f3c18bacd469 - languageName: node - linkType: hard - -"object.fromentries@npm:^2.0.7": - version: 2.0.8 - resolution: "object.fromentries@npm:2.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/cd4327e6c3369cfa805deb4cbbe919bfb7d3aeebf0bcaba291bb568ea7169f8f8cdbcabe2f00b40db0c20cd20f08e11b5f3a5a36fb7dd3fe04850c50db3bf83b - languageName: node - linkType: hard - -"object.groupby@npm:^1.0.1": - version: 1.0.3 - resolution: "object.groupby@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - checksum: 10c0/60d0455c85c736fbfeda0217d1a77525956f76f7b2495edeca9e9bbf8168a45783199e77b894d30638837c654d0cc410e0e02cbfcf445bc8de71c3da1ede6a9c - languageName: node - linkType: hard - -"object.values@npm:^1.1.7": - version: 1.2.0 - resolution: "object.values@npm:1.2.0" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/15809dc40fd6c5529501324fec5ff08570b7d70fb5ebbe8e2b3901afec35cf2b3dc484d1210c6c642cd3e7e0a5e18dd1d6850115337fef46bdae14ab0cb18ac3 - languageName: node - linkType: hard - "obliterator@npm:^2.0.0": version: 2.0.4 resolution: "obliterator@npm:2.0.4" @@ -7780,20 +6793,6 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.9.3": - version: 0.9.4 - resolution: "optionator@npm:0.9.4" - dependencies: - deep-is: "npm:^0.1.3" - fast-levenshtein: "npm:^2.0.6" - levn: "npm:^0.4.1" - prelude-ls: "npm:^1.2.1" - type-check: "npm:^0.4.0" - word-wrap: "npm:^1.2.5" - checksum: 10c0/4afb687a059ee65b61df74dfe87d8d6815cd6883cb8b3d5883a910df72d0f5d029821f37025e4bccf4048873dbdb09acc6d303d27b8f76b1a80dd5a7d5334675 - languageName: node - linkType: hard - "ora@npm:^5.4.1": version: 5.4.1 resolution: "ora@npm:5.4.1" @@ -8194,38 +7193,6 @@ __metadata: languageName: node linkType: hard -"possible-typed-array-names@npm:^1.0.0": - version: 1.0.0 - resolution: "possible-typed-array-names@npm:1.0.0" - checksum: 10c0/d9aa22d31f4f7680e20269db76791b41c3a32c01a373e25f8a4813b4d45f7456bfc2b6d68f752dc4aab0e0bb0721cb3d76fb678c9101cb7a16316664bc2c73fd - languageName: node - linkType: hard - -"prelude-ls@npm:^1.2.1": - version: 1.2.1 - resolution: "prelude-ls@npm:1.2.1" - checksum: 10c0/b00d617431e7886c520a6f498a2e14c75ec58f6d93ba48c3b639cf241b54232d90daa05d83a9e9b9fef6baa63cb7e1e4602c2372fea5bc169668401eb127d0cd - languageName: node - linkType: hard - -"prettier-linter-helpers@npm:^1.0.0": - version: 1.0.0 - resolution: "prettier-linter-helpers@npm:1.0.0" - dependencies: - fast-diff: "npm:^1.1.2" - checksum: 10c0/81e0027d731b7b3697ccd2129470ed9913ecb111e4ec175a12f0fcfab0096516373bf0af2fef132af50cafb0a905b74ff57996d615f59512bb9ac7378fcc64ab - languageName: node - linkType: hard - -"prettier@npm:^3.3.3": - version: 3.3.3 - resolution: "prettier@npm:3.3.3" - bin: - prettier: bin/prettier.cjs - checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26 - languageName: node - linkType: hard - "pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": version: 29.7.0 resolution: "pretty-format@npm:29.7.0" @@ -8285,13 +7252,6 @@ __metadata: languageName: node linkType: hard -"punycode@npm:^2.1.0": - version: 2.3.1 - resolution: "punycode@npm:2.3.1" - checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 - languageName: node - linkType: hard - "pure-rand@npm:^6.0.0": version: 6.1.0 resolution: "pure-rand@npm:6.1.0" @@ -8402,18 +7362,6 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.2": - version: 1.5.2 - resolution: "regexp.prototype.flags@npm:1.5.2" - dependencies: - call-bind: "npm:^1.0.6" - define-properties: "npm:^1.2.1" - es-errors: "npm:^1.3.0" - set-function-name: "npm:^2.0.1" - checksum: 10c0/0f3fc4f580d9c349f8b560b012725eb9c002f36daa0041b3fbf6f4238cb05932191a4d7d5db3b5e2caa336d5150ad0402ed2be81f711f9308fe7e1a9bf9bd552 - languageName: node - linkType: hard - "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -8460,7 +7408,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.20.0, resolve@npm:^1.22.4": +"resolve@npm:^1.20.0": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -8482,7 +7430,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": +"resolve@patch:resolve@npm%3A^1.20.0#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -8519,17 +7467,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^3.0.2": - version: 3.0.2 - resolution: "rimraf@npm:3.0.2" - dependencies: - glob: "npm:^7.1.3" - bin: - rimraf: bin.js - checksum: 10c0/9cb7757acb489bd83757ba1a274ab545eafd75598a9d817e0c3f8b164238dd90eba50d6b848bd4dcc5f3040912e882dc7ba71653e35af660d77b25c381d402e8 - languageName: node - linkType: hard - "ripemd160@npm:^2.0.0, ripemd160@npm:^2.0.1": version: 2.0.2 resolution: "ripemd160@npm:2.0.2" @@ -8576,18 +7513,6 @@ __metadata: languageName: node linkType: hard -"safe-array-concat@npm:^1.1.2": - version: 1.1.2 - resolution: "safe-array-concat@npm:1.1.2" - dependencies: - call-bind: "npm:^1.0.7" - get-intrinsic: "npm:^1.2.4" - has-symbols: "npm:^1.0.3" - isarray: "npm:^2.0.5" - checksum: 10c0/12f9fdb01c8585e199a347eacc3bae7b5164ae805cdc8c6707199dbad5b9e30001a50a43c4ee24dc9ea32dbb7279397850e9208a7e217f4d8b1cf5d90129dec9 - languageName: node - linkType: hard - "safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" @@ -8595,17 +7520,6 @@ __metadata: languageName: node linkType: hard -"safe-regex-test@npm:^1.0.3": - version: 1.0.3 - resolution: "safe-regex-test@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.6" - es-errors: "npm:^1.3.0" - is-regex: "npm:^1.1.4" - checksum: 10c0/900bf7c98dc58f08d8523b7012b468e4eb757afa624f198902c0643d7008ba777b0bdc35810ba0b758671ce887617295fb742b3f3968991b178ceca54cb07603 - languageName: node - linkType: hard - "safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -8675,32 +7589,6 @@ __metadata: languageName: node linkType: hard -"set-function-length@npm:^1.2.1": - version: 1.2.2 - resolution: "set-function-length@npm:1.2.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/82850e62f412a258b71e123d4ed3873fa9377c216809551192bb6769329340176f109c2eeae8c22a8d386c76739855f78e8716515c818bcaef384b51110f0f3c - languageName: node - linkType: hard - -"set-function-name@npm:^2.0.1": - version: 2.0.2 - resolution: "set-function-name@npm:2.0.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - functions-have-names: "npm:^1.2.3" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/fce59f90696c450a8523e754abb305e2b8c73586452619c2bad5f7bf38c7b6b4651895c9db895679c5bef9554339cf3ef1c329b66ece3eda7255785fbe299316 - languageName: node - linkType: hard - "setimmediate@npm:^1.0.5": version: 1.0.5 resolution: "setimmediate@npm:1.0.5" @@ -8752,18 +7640,6 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.4": - version: 1.0.6 - resolution: "side-channel@npm:1.0.6" - dependencies: - call-bind: "npm:^1.0.7" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.4" - object-inspect: "npm:^1.13.1" - checksum: 10c0/d2afd163dc733cc0a39aa6f7e39bf0c436293510dbccbff446733daeaf295857dbccf94297092ec8c53e2503acac30f0b78830876f0485991d62a90e9cad305f - languageName: node - linkType: hard - "signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -8911,13 +7787,6 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.5.0": - version: 0.5.7 - resolution: "source-map@npm:0.5.7" - checksum: 10c0/904e767bb9c494929be013017380cbba013637da1b28e5943b566031e29df04fba57edf3f093e0914be094648b577372bd8ad247fa98cfba9c600794cd16b599 - languageName: node - linkType: hard - "source-map@npm:^0.6.0, source-map@npm:^0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" @@ -9046,40 +7915,6 @@ __metadata: languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.9": - version: 1.2.9 - resolution: "string.prototype.trim@npm:1.2.9" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.0" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/dcef1a0fb61d255778155006b372dff8cc6c4394bc39869117e4241f41a2c52899c0d263ffc7738a1f9e61488c490b05c0427faa15151efad721e1a9fb2663c2 - languageName: node - linkType: hard - -"string.prototype.trimend@npm:^1.0.8": - version: 1.0.8 - resolution: "string.prototype.trimend@npm:1.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/0a0b54c17c070551b38e756ae271865ac6cc5f60dabf2e7e343cceae7d9b02e1a1120a824e090e79da1b041a74464e8477e2da43e2775c85392be30a6f60963c - languageName: node - linkType: hard - -"string.prototype.trimstart@npm:^1.0.8": - version: 1.0.8 - resolution: "string.prototype.trimstart@npm:1.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/d53af1899959e53c83b64a5fd120be93e067da740e7e75acb433849aa640782fb6c7d4cd5b84c954c84413745a3764df135a8afeb22908b86a835290788d8366 - languageName: node - linkType: hard - "string_decoder@npm:^1.1.1": version: 1.3.0 resolution: "string_decoder@npm:1.3.0" @@ -9107,13 +7942,6 @@ __metadata: languageName: node linkType: hard -"strip-bom@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-bom@npm:3.0.0" - checksum: 10c0/51201f50e021ef16672593d7434ca239441b7b760e905d9f33df6e4f3954ff54ec0e0a06f100d028af0982d6f25c35cd5cda2ce34eaebccd0250b8befb90d8f1 - languageName: node - linkType: hard - "strip-bom@npm:^4.0.0": version: 4.0.0 resolution: "strip-bom@npm:4.0.0" @@ -9237,13 +8065,6 @@ __metadata: languageName: node linkType: hard -"text-table@npm:^0.2.0": - version: 0.2.0 - resolution: "text-table@npm:0.2.0" - checksum: 10c0/02805740c12851ea5982686810702e2f14369a5f4c5c40a836821e3eefc65ffeec3131ba324692a37608294b0fd8c1e55a2dd571ffed4909822787668ddbee5c - languageName: node - linkType: hard - "through@npm:>=2.2.7 <3, through@npm:^2.3.4": version: 2.3.8 resolution: "through@npm:2.3.8" @@ -9374,18 +8195,6 @@ __metadata: languageName: node linkType: hard -"tsconfig-paths@npm:^3.15.0": - version: 3.15.0 - resolution: "tsconfig-paths@npm:3.15.0" - dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10c0/5b4f301a2b7a3766a986baf8fc0e177eb80bdba6e396792ff92dc23b5bca8bb279fc96517dcaaef63a3b49bebc6c4c833653ec58155780bc906bdbcf7dda0ef5 - languageName: node - linkType: hard - "tslib@npm:2.4.0": version: 2.4.0 resolution: "tslib@npm:2.4.0" @@ -9439,15 +8248,6 @@ __metadata: languageName: node linkType: hard -"type-check@npm:^0.4.0, type-check@npm:~0.4.0": - version: 0.4.0 - resolution: "type-check@npm:0.4.0" - dependencies: - prelude-ls: "npm:^1.2.1" - checksum: 10c0/7b3fd0ed43891e2080bf0c5c504b418fbb3e5c7b9708d3d015037ba2e6323a28152ec163bcb65212741fa5d2022e3075ac3c76440dbd344c9035f818e8ecee58 - languageName: node - linkType: hard - "type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" @@ -9497,58 +8297,6 @@ __metadata: languageName: node linkType: hard -"typed-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-buffer@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.7" - es-errors: "npm:^1.3.0" - is-typed-array: "npm:^1.1.13" - checksum: 10c0/9e043eb38e1b4df4ddf9dde1aa64919ae8bb909571c1cc4490ba777d55d23a0c74c7d73afcdd29ec98616d91bb3ae0f705fad4421ea147e1daf9528200b562da - languageName: node - linkType: hard - -"typed-array-byte-length@npm:^1.0.1": - version: 1.0.1 - resolution: "typed-array-byte-length@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - checksum: 10c0/fcebeffb2436c9f355e91bd19e2368273b88c11d1acc0948a2a306792f1ab672bce4cfe524ab9f51a0505c9d7cd1c98eff4235c4f6bfef6a198f6cfc4ff3d4f3 - languageName: node - linkType: hard - -"typed-array-byte-offset@npm:^1.0.2": - version: 1.0.2 - resolution: "typed-array-byte-offset@npm:1.0.2" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - checksum: 10c0/d2628bc739732072e39269389a758025f75339de2ed40c4f91357023c5512d237f255b633e3106c461ced41907c1bf9a533c7e8578066b0163690ca8bc61b22f - languageName: node - linkType: hard - -"typed-array-length@npm:^1.0.6": - version: 1.0.6 - resolution: "typed-array-length@npm:1.0.6" - dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - possible-typed-array-names: "npm:^1.0.0" - checksum: 10c0/74253d7dc488eb28b6b2711cf31f5a9dcefc9c41b0681fd1c178ed0a1681b4468581a3626d39cd4df7aee3d3927ab62be06aa9ca74e5baf81827f61641445b77 - languageName: node - linkType: hard - "typedarray-to-buffer@npm:^3.1.5": version: 3.1.5 resolution: "typedarray-to-buffer@npm:3.1.5" @@ -9587,18 +8335,6 @@ __metadata: languageName: node linkType: hard -"unbox-primitive@npm:^1.0.2": - version: 1.0.2 - resolution: "unbox-primitive@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - has-bigints: "npm:^1.0.2" - has-symbols: "npm:^1.0.3" - which-boxed-primitive: "npm:^1.0.2" - checksum: 10c0/81ca2e81134167cc8f75fa79fbcc8a94379d6c61de67090986a2273850989dd3bae8440c163121b77434b68263e34787a675cbdcb34bb2f764c6b9c843a11b66 - languageName: node - linkType: hard - "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5" @@ -9682,15 +8418,6 @@ __metadata: languageName: node linkType: hard -"uri-js@npm:^4.2.2": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10c0/4ef57b45aa820d7ac6496e9208559986c665e49447cb072744c13b66925a362d96dd5a46c4530a6b8e203e5db5fe849369444440cb22ecfc26c679359e5dfa3c - languageName: node - linkType: hard - "util-deprecate@npm:^1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -9751,6 +8478,27 @@ __metadata: languageName: node linkType: hard +"viem@npm:^2.17.4": + version: 2.17.4 + resolution: "viem@npm:2.17.4" + dependencies: + "@adraffy/ens-normalize": "npm:1.10.0" + "@noble/curves": "npm:1.4.0" + "@noble/hashes": "npm:1.4.0" + "@scure/bip32": "npm:1.4.0" + "@scure/bip39": "npm:1.3.0" + abitype: "npm:1.0.5" + isows: "npm:1.0.4" + ws: "npm:8.17.1" + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/8e44aaaba9865500f74be60e5e77473884a2157963114ec9cec491084bcc4f487ba296a473f6ebb7213ba21732727a98090e44dda4f17c5869f0f86faf48f214 + languageName: node + linkType: hard + "walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -9776,32 +8524,6 @@ __metadata: languageName: node linkType: hard -"which-boxed-primitive@npm:^1.0.2": - version: 1.0.2 - resolution: "which-boxed-primitive@npm:1.0.2" - dependencies: - is-bigint: "npm:^1.0.1" - is-boolean-object: "npm:^1.1.0" - is-number-object: "npm:^1.0.4" - is-string: "npm:^1.0.5" - is-symbol: "npm:^1.0.3" - checksum: 10c0/0a62a03c00c91dd4fb1035b2f0733c341d805753b027eebd3a304b9cb70e8ce33e25317add2fe9b5fea6f53a175c0633ae701ff812e604410ddd049777cd435e - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15": - version: 1.1.15 - resolution: "which-typed-array@npm:1.1.15" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/4465d5348c044032032251be54d8988270e69c6b7154f8fcb2a47ff706fe36f7624b3a24246b8d9089435a8f4ec48c1c1025c5d6b499456b9e5eff4f48212983 - languageName: node - linkType: hard - "which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -9842,13 +8564,6 @@ __metadata: languageName: node linkType: hard -"word-wrap@npm:^1.2.5": - version: 1.2.5 - resolution: "word-wrap@npm:1.2.5" - checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 - languageName: node - linkType: hard - "wordwrap@npm:^1.0.0": version: 1.0.0 resolution: "wordwrap@npm:1.0.0" From 24353c774f6799cf691b9a70bebecddca7909803 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 16 Jul 2024 18:18:06 +0200 Subject: [PATCH 2/2] feat(package): add lint cmd --- .husky/pre-commit | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index c6f52339..140c8781 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -5,6 +5,6 @@ STAGED_TS_FILES=$(git diff --staged --name-only --diff-filter=d | grep '\.tsx\?$ if [ -n "$STAGED_TS_FILES" ]; then # yarn eslint --fix $STAGED_TS_FILES - yarn biome check --write $STAGED_TS_FILES + yarn lint --write $STAGED_TS_FILES git add $STAGED_TS_FILES fi diff --git a/package.json b/package.json index de1ee4f0..6f1be92f 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "workspaces": ["packages/*"], "scripts": { "postinstall": "husky install", + "lint": "biome check", "publish": "lerna publish from-package" }, "devDependencies": {