From 343dfedf81a66b662ba309ddbd11bef2377bf53f Mon Sep 17 00:00:00 2001 From: Alberto Gualis Date: Tue, 15 Oct 2024 16:14:18 +0200 Subject: [PATCH 1/6] chore: bump b-sdk 0.28.1 --- apps/frontend-v3/package.json | 2 +- pnpm-lock.yaml | 267 +++++++++++++++++++++++++++++++--- 2 files changed, 250 insertions(+), 19 deletions(-) diff --git a/apps/frontend-v3/package.json b/apps/frontend-v3/package.json index 05a2cbb7..d50a6603 100644 --- a/apps/frontend-v3/package.json +++ b/apps/frontend-v3/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "@apollo/client": "^3.11.8", - "@balancer/sdk": "^0.27.0", + "@balancer/sdk": "^0.28.1", "@chakra-ui/anatomy": "^2.2.2", "@chakra-ui/hooks": "^2.2.1", "@chakra-ui/icons": "^2.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 812277f6..361a6b78 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,8 +42,8 @@ importers: specifier: ^3.11.8 version: 3.11.8(@types/react@18.2.34)(graphql-ws@5.16.0(graphql@16.9.0))(graphql@16.9.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@balancer/sdk': - specifier: ^0.27.0 - version: 0.27.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + specifier: ^0.28.1 + version: 0.28.1(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) '@chakra-ui/anatomy': specifier: ^2.2.2 version: 2.2.2 @@ -109,7 +109,7 @@ importers: version: 9.1.2 chakra-react-select: specifier: ^4.7.6 - version: 4.9.2(@chakra-ui/form-control@2.2.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/icon@3.2.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/layout@2.3.1(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/media-query@3.3.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/menu@2.2.1(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(framer-motion@10.18.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/spinner@2.1.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 4.9.2(banuz2q4qni4rswxudypxspam4) date-fns: specifier: ^2.30.0 version: 2.30.0 @@ -413,10 +413,10 @@ importers: version: 1.2.1(@chakra-ui/react@2.8.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(framer-motion@10.18.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0) '@rainbow-me/rainbowkit': specifier: ^2.1.6 - version: 2.1.6(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(babel-plugin-macros@3.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.17(@tanstack/query-core@5.56.2)(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@3.29.4)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)) + version: 2.1.6(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(babel-plugin-macros@3.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.17(@tanstack/query-core@5.56.2)(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.3)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)) '@sentry/nextjs': specifier: ^8.13.0 - version: 8.30.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.26.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.26.0(@opentelemetry/api@1.9.0))(next@14.2.0(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)(webpack@5.94.0(esbuild@0.19.12)) + version: 8.30.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.26.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.26.0(@opentelemetry/api@1.9.0))(next@14.2.0(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)(webpack@5.94.0) '@studio-freight/react-lenis': specifier: ^0.0.47 version: 0.0.47(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -437,7 +437,7 @@ importers: version: 9.1.2 chakra-react-select: specifier: ^4.7.6 - version: 4.9.2(@chakra-ui/form-control@2.2.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/icon@3.2.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/layout@2.3.1(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/media-query@3.3.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/menu@2.2.1(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(framer-motion@10.18.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/spinner@2.1.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 4.9.2(banuz2q4qni4rswxudypxspam4) date-fns: specifier: ^2.30.0 version: 2.30.0 @@ -533,7 +533,7 @@ importers: version: 2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) wagmi: specifier: ^2.12.16 - version: 2.12.17(@tanstack/query-core@5.56.2)(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@3.29.4)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + version: 2.12.17(@tanstack/query-core@5.56.2)(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.3)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) devDependencies: '@apollo/experimental-nextjs-app-support': specifier: ^0.11.3 @@ -1522,6 +1522,10 @@ packages: resolution: {integrity: sha512-vYg1qLsmCCUqYMrLZLoCMzDnfI/1cKnYm4ve1KWVcKPNX/xjU5U69GhXK2Kst1SD0I8vIEPvbowBeSz+AeWtJw==} engines: {node: '>=18.x'} + '@balancer/sdk@0.28.1': + resolution: {integrity: sha512-Ei8hC/vtA20G0UWL4sBYqtBWYj4x8CKeELVwEba7OVPkQ24whOc9MtWbujj517i6LPWEcambmLWFUFmyfsBA9g==} + engines: {node: '>=18.x'} + '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -11215,6 +11219,17 @@ snapshots: - utf-8-validate - zod + '@balancer/sdk@0.28.1(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)': + dependencies: + decimal.js-light: 2.5.1 + lodash.clonedeep: 4.5.0 + viem: 2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + '@bcoe/v8-coverage@0.2.3': {} '@bundled-es-modules/cookie@2.0.0': @@ -13262,6 +13277,42 @@ snapshots: - supports-color - utf-8-validate + '@metamask/sdk@0.28.4(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.3)(utf-8-validate@5.0.10)': + dependencies: + '@metamask/onboarding': 1.0.1 + '@metamask/providers': 16.1.0 + '@metamask/sdk-communication-layer': 0.28.2(cross-fetch@4.0.0)(eciesjs@0.3.20)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@metamask/sdk-install-modal-web': 0.28.1(i18next@23.11.5)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0) + '@types/dom-screen-wake-lock': 1.0.3 + '@types/uuid': 10.0.0 + bowser: 2.11.0 + cross-fetch: 4.0.0 + debug: 4.3.7 + eciesjs: 0.3.20 + eth-rpc-errors: 4.0.3 + eventemitter2: 6.4.9 + i18next: 23.11.5 + i18next-browser-languagedetector: 7.1.0 + obj-multiplex: 1.0.0 + pump: 3.0.2 + qrcode-terminal-nooctal: 0.12.1 + react-native-webview: 11.26.1(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0) + readable-stream: 3.6.2 + rollup-plugin-visualizer: 5.12.0(rollup@4.21.3) + socket.io-client: 4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) + util: 0.12.5 + uuid: 8.3.2 + optionalDependencies: + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + transitivePeerDependencies: + - bufferutil + - encoding + - react-native + - rollup + - supports-color + - utf-8-validate + '@metamask/superstruct@3.1.0': {} '@metamask/utils@5.0.2': @@ -13805,6 +13856,24 @@ snapshots: - '@types/react' - babel-plugin-macros + '@rainbow-me/rainbowkit@2.1.6(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(babel-plugin-macros@3.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(wagmi@2.12.17(@tanstack/query-core@5.56.2)(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.3)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))': + dependencies: + '@tanstack/react-query': 5.56.2(react@18.2.0) + '@vanilla-extract/css': 1.15.5(babel-plugin-macros@3.1.0) + '@vanilla-extract/dynamic': 2.1.2 + '@vanilla-extract/sprinkles': 1.6.3(@vanilla-extract/css@1.15.5(babel-plugin-macros@3.1.0)) + clsx: 2.1.1 + qrcode: 1.5.4 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-remove-scroll: 2.6.0(@types/react@18.2.34)(react@18.2.0) + ua-parser-js: 1.0.39 + viem: 2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + wagmi: 2.12.17(@tanstack/query-core@5.56.2)(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.3)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + transitivePeerDependencies: + - '@types/react' + - babel-plugin-macros + '@react-native-community/cli-clean@14.1.0': dependencies: '@react-native-community/cli-tools': 14.1.0 @@ -14314,6 +14383,35 @@ snapshots: - react - supports-color + '@sentry/nextjs@8.30.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.26.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.26.0(@opentelemetry/api@1.9.0))(next@14.2.0(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)(webpack@5.94.0)': + dependencies: + '@opentelemetry/instrumentation-http': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.27.0 + '@rollup/plugin-commonjs': 26.0.1(rollup@3.29.4) + '@sentry/core': 8.30.0 + '@sentry/node': 8.30.0 + '@sentry/opentelemetry': 8.30.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.26.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.26.0(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.27.0) + '@sentry/react': 8.30.0(react@18.2.0) + '@sentry/types': 8.30.0 + '@sentry/utils': 8.30.0 + '@sentry/vercel-edge': 8.30.0 + '@sentry/webpack-plugin': 2.22.3(webpack@5.94.0) + chalk: 3.0.0 + next: 14.2.0(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + resolve: 1.22.8 + rollup: 3.29.4 + stacktrace-parser: 0.1.10 + optionalDependencies: + webpack: 5.94.0 + transitivePeerDependencies: + - '@opentelemetry/api' + - '@opentelemetry/core' + - '@opentelemetry/instrumentation' + - '@opentelemetry/sdk-trace-base' + - encoding + - react + - supports-color + '@sentry/node@8.30.0': dependencies: '@opentelemetry/api': 1.9.0 @@ -14395,6 +14493,16 @@ snapshots: - encoding - supports-color + '@sentry/webpack-plugin@2.22.3(webpack@5.94.0)': + dependencies: + '@sentry/bundler-plugin-core': 2.22.3 + unplugin: 1.0.1 + uuid: 9.0.1 + webpack: 5.94.0 + transitivePeerDependencies: + - encoding + - supports-color + '@sideway/address@4.1.5': dependencies: '@hapi/hoek': 9.3.0 @@ -15241,6 +15349,45 @@ snapshots: - utf-8-validate - zod + '@wagmi/connectors@5.1.15(@types/react@18.2.34)(@wagmi/core@2.13.8(@tanstack/query-core@5.56.2)(@types/react@18.2.34)(react@18.2.0)(typescript@5.4.5)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.3)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': + dependencies: + '@coinbase/wallet-sdk': 4.0.4 + '@metamask/sdk': 0.28.4(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.3)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-provider': 0.18.3(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + '@wagmi/core': 2.13.8(@tanstack/query-core@5.56.2)(@types/react@18.2.34)(react@18.2.0)(typescript@5.4.5)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@walletconnect/ethereum-provider': 2.17.0(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10) + '@walletconnect/modal': 2.7.0(@types/react@18.2.34)(react@18.2.0) + cbw-sdk: '@coinbase/wallet-sdk@3.9.3' + viem: 2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/kv' + - bufferutil + - encoding + - ioredis + - react + - react-dom + - react-native + - rollup + - supports-color + - uWebSockets.js + - utf-8-validate + - zod + '@wagmi/core@2.13.8(@tanstack/query-core@5.56.2)(@types/react@18.2.34)(react@18.2.0)(typescript@5.4.5)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))': dependencies: eventemitter3: 5.0.1 @@ -16203,8 +16350,8 @@ snapshots: loupe: 3.1.1 pathval: 2.0.0 - ? chakra-react-select@4.9.2(@chakra-ui/form-control@2.2.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/icon@3.2.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/layout@2.3.1(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/media-query@3.3.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/menu@2.2.1(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(framer-motion@10.18.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/spinner@2.1.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0))(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - : dependencies: + chakra-react-select@4.9.2(banuz2q4qni4rswxudypxspam4): + dependencies: '@chakra-ui/form-control': 2.2.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0) '@chakra-ui/icon': 3.2.0(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0) '@chakra-ui/layout': 2.3.1(@chakra-ui/system@2.6.2(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.2.34)(react@18.2.0))(@types/react@18.2.34)(react@18.2.0))(react@18.2.0))(react@18.2.0) @@ -17048,7 +17195,7 @@ snapshots: eslint: 8.43.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0(eslint@8.43.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.0)(eslint@8.43.0) - eslint-plugin-import: 2.29.0(@typescript-eslint/parser@5.62.0(eslint@8.43.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.43.0) + eslint-plugin-import: 2.29.0(@typescript-eslint/parser@5.62.0(eslint@8.43.0)(typescript@5.4.5))(eslint@8.43.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.43.0) eslint-plugin-react: 7.33.2(eslint@8.43.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.43.0) @@ -17089,7 +17236,7 @@ snapshots: enhanced-resolve: 5.15.0 eslint: 8.43.0 eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.43.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@8.43.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.0)(eslint@8.43.0))(eslint@8.43.0) - eslint-plugin-import: 2.29.0(@typescript-eslint/parser@5.62.0(eslint@8.43.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.43.0) + eslint-plugin-import: 2.29.0(@typescript-eslint/parser@5.62.0(eslint@8.43.0)(typescript@5.4.5))(eslint@8.43.0) fast-glob: 3.3.2 get-tsconfig: 4.7.2 is-core-module: 2.13.1 @@ -17128,24 +17275,23 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 6.17.0(eslint@8.57.0)(typescript@5.3.3) eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 6.17.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/parser': 7.1.0(eslint@8.57.0)(typescript@5.3.3) eslint: 8.57.0 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0) + eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color @@ -17155,7 +17301,7 @@ snapshots: eslint: 8.57.0 ignore: 5.3.1 - eslint-plugin-import@2.29.0(@typescript-eslint/parser@5.62.0(eslint@8.43.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.43.0): + eslint-plugin-import@2.29.0(@typescript-eslint/parser@5.62.0(eslint@8.43.0)(typescript@5.4.5))(eslint@8.43.0): dependencies: array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 @@ -17192,7 +17338,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.0)(typescript@5.3.3))(eslint-plugin-import@2.29.0)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -20393,6 +20539,15 @@ snapshots: optionalDependencies: rollup: 3.29.4 + rollup-plugin-visualizer@5.12.0(rollup@4.21.3): + dependencies: + open: 8.4.2 + picomatch: 2.3.1 + source-map: 0.7.4 + yargs: 17.7.2 + optionalDependencies: + rollup: 4.21.3 + rollup@3.29.4: optionalDependencies: fsevents: 2.3.3 @@ -20970,6 +21125,15 @@ snapshots: optionalDependencies: esbuild: 0.19.12 + terser-webpack-plugin@5.3.10(webpack@5.94.0): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.2 + terser: 5.32.0 + webpack: 5.94.0 + terser@5.32.0: dependencies: '@jridgewell/source-map': 0.3.6 @@ -21487,6 +21651,43 @@ snapshots: - utf-8-validate - zod + wagmi@2.12.17(@tanstack/query-core@5.56.2)(@tanstack/react-query@5.56.2(react@18.2.0))(@types/react@18.2.34)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.3)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): + dependencies: + '@tanstack/react-query': 5.56.2(react@18.2.0) + '@wagmi/connectors': 5.1.15(@types/react@18.2.34)(@wagmi/core@2.13.8(@tanstack/query-core@5.56.2)(@types/react@18.2.34)(react@18.2.0)(typescript@5.4.5)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.25.2)(@babel/preset-env@7.25.4(@babel/core@7.25.2))(@types/react@18.2.34)(bufferutil@4.0.8)(react@18.2.0)(typescript@5.4.5)(utf-8-validate@5.0.10))(react@18.2.0)(rollup@4.21.3)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + '@wagmi/core': 2.13.8(@tanstack/query-core@5.56.2)(@types/react@18.2.34)(react@18.2.0)(typescript@5.4.5)(viem@2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8)) + react: 18.2.0 + use-sync-external-store: 1.2.0(react@18.2.0) + viem: 2.21.22(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@tanstack/query-core' + - '@types/react' + - '@upstash/redis' + - '@vercel/kv' + - bufferutil + - encoding + - immer + - ioredis + - react-dom + - react-native + - rollup + - supports-color + - uWebSockets.js + - utf-8-validate + - zod + walker@1.0.8: dependencies: makeerror: 1.0.12 @@ -21525,6 +21726,36 @@ snapshots: webpack-virtual-modules@0.5.0: {} + webpack@5.94.0: + dependencies: + '@types/estree': 1.0.5 + '@webassemblyjs/ast': 1.12.1 + '@webassemblyjs/wasm-edit': 1.12.1 + '@webassemblyjs/wasm-parser': 1.12.1 + acorn: 8.12.1 + acorn-import-attributes: 1.9.5(acorn@8.12.1) + browserslist: 4.23.3 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.17.1 + es-module-lexer: 1.5.4 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.10(webpack@5.94.0) + watchpack: 2.4.2 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + webpack@5.94.0(esbuild@0.19.12): dependencies: '@types/estree': 1.0.5 From b5b220fea7032ff9a8c4cdc64a98fc02f58dccb6 Mon Sep 17 00:00:00 2001 From: Alberto Gualis Date: Tue, 15 Oct 2024 16:27:44 +0200 Subject: [PATCH 2/6] chore: change stable debug pool id --- apps/frontend-v3/app/(app)/debug/pools/page.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/frontend-v3/app/(app)/debug/pools/page.tsx b/apps/frontend-v3/app/(app)/debug/pools/page.tsx index e668fff4..da066467 100644 --- a/apps/frontend-v3/app/(app)/debug/pools/page.tsx +++ b/apps/frontend-v3/app/(app)/debug/pools/page.tsx @@ -7,8 +7,8 @@ import FadeInOnView from '@repo/lib/shared/components/containers/FadeInOnView' export default function DebugPools() { return ( - - + + Debug V3 pools Sepolia WEIGHTED (Balancer 50 BAL 50 WETH) @@ -16,12 +16,12 @@ export default function DebugPools() { Sepolia WEIGHTED with Proportional joins (Balancer 50 BAL 50 WETH -ExitFee Hook) - - Sepolia STABLE (Balancer 50 BAL 50 WETH) + + Sepolia STABLE (USDT/USDC) - + Debug V2 pools - + Debug CoW AMM (V1) pools Gnosis CoW AMM From fba3336f1ea4e12d1db60a42b7642c77fe44ce7d Mon Sep 17 00:00:00 2001 From: Alberto Gualis Date: Tue, 15 Oct 2024 16:34:54 +0200 Subject: [PATCH 3/6] chore: change weighted debug pool id --- apps/frontend-v3/app/(app)/debug/pools/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/frontend-v3/app/(app)/debug/pools/page.tsx b/apps/frontend-v3/app/(app)/debug/pools/page.tsx index da066467..c60bbb74 100644 --- a/apps/frontend-v3/app/(app)/debug/pools/page.tsx +++ b/apps/frontend-v3/app/(app)/debug/pools/page.tsx @@ -10,10 +10,10 @@ export default function DebugPools() { Debug V3 pools - + Sepolia WEIGHTED (Balancer 50 BAL 50 WETH) - + Sepolia WEIGHTED with Proportional joins (Balancer 50 BAL 50 WETH -ExitFee Hook) From 7d5d68f9b44e510302ebf12dc1e935cd4524d162 Mon Sep 17 00:00:00 2001 From: Alberto Gualis Date: Tue, 15 Oct 2024 16:52:11 +0200 Subject: [PATCH 4/6] chore: import weightedPoolAbi_V3 from sdk --- packages/lib/debug-helpers.ts | 2 +- .../queries/usePoolEnrichWithOnChainData.tsx | 4 +- .../web3/contracts/abi/weightedPoolV3Abi.ts | 893 ------------------ 3 files changed, 3 insertions(+), 896 deletions(-) delete mode 100644 packages/lib/modules/web3/contracts/abi/weightedPoolV3Abi.ts diff --git a/packages/lib/debug-helpers.ts b/packages/lib/debug-helpers.ts index 4d74fc35..38702ba1 100644 --- a/packages/lib/debug-helpers.ts +++ b/packages/lib/debug-helpers.ts @@ -36,7 +36,7 @@ export const vaultV3Address = sepoliaNetworkConfig.contracts.balancer.vaultV3 as export const poolId = '0x68e3266c9c8bbd44ad9dca5afbfe629022aee9fe000200000000000000000512' as const // Balancer Weighted wjAura and WETH -export const sepoliaRouter = '0xB12FcB422aAe6720f882E22C340964a7723f2387' +export const sepoliaRouter = '0x77eDc69766409C599F06Ef0B551a0990CBfe13A7' /* Used to pretty print objects when debugging diff --git a/packages/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx b/packages/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx index 44971d91..547985c0 100644 --- a/packages/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx +++ b/packages/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx @@ -3,7 +3,6 @@ import { Address, formatUnits } from 'viem' import { useReadContracts } from 'wagmi' import { useTokens } from '../../tokens/TokensProvider' import { balancerV3ExtensionVaultAbi } from '../../web3/contracts/abi/balancerV3ExtensionVaultAbi' -import { weightedPoolV3Abi } from '../../web3/contracts/abi/weightedPoolV3Abi' import { Pool } from '../PoolProvider' import { BPT_DECIMALS } from '../pool.constants' import { GqlChain } from '@repo/lib/shared/services/api/generated/graphql' @@ -16,6 +15,7 @@ import { } from '../../web3/contracts/abi/generated' import { isComposableStablePool } from '../pool.utils' import { cowAmmPoolAbi } from '../../web3/contracts/abi/cowAmmAbi' +import { weightedPoolAbi_V3 } from '@balancer/sdk' export function usePoolEnrichWithOnChainData(pool: Pool) { const { priceFor } = useTokens() @@ -60,7 +60,7 @@ function useV3PoolOnchainData(pool: Pool) { }, { chainId, - abi: weightedPoolV3Abi, + abi: weightedPoolAbi_V3, address: pool.address as Address, functionName: 'totalSupply', args: [], diff --git a/packages/lib/modules/web3/contracts/abi/weightedPoolV3Abi.ts b/packages/lib/modules/web3/contracts/abi/weightedPoolV3Abi.ts deleted file mode 100644 index 4da43a17..00000000 --- a/packages/lib/modules/web3/contracts/abi/weightedPoolV3Abi.ts +++ /dev/null @@ -1,893 +0,0 @@ -// TODO: replace with wagmi generated abi once vault v3 is deployed in all networks -export const weightedPoolV3Abi = [ - { - inputs: [ - { - components: [ - { - internalType: 'string', - name: 'name', - type: 'string', - }, - { - internalType: 'string', - name: 'symbol', - type: 'string', - }, - { - internalType: 'uint256', - name: 'numTokens', - type: 'uint256', - }, - { - internalType: 'uint256[]', - name: 'normalizedWeights', - type: 'uint256[]', - }, - { - internalType: 'string', - name: 'version', - type: 'string', - }, - ], - internalType: 'struct WeightedPool.NewPoolParams', - name: 'params', - type: 'tuple', - }, - { - internalType: 'contract IVault', - name: 'vault', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'BaseOutOfBounds', - 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: '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: 'ExponentOutOfBounds', - type: 'error', - }, - { - inputs: [], - name: 'InputLengthMismatch', - type: 'error', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'currentNonce', - type: 'uint256', - }, - ], - name: 'InvalidAccountNonce', - type: 'error', - }, - { - inputs: [], - name: 'InvalidExponent', - type: 'error', - }, - { - inputs: [], - name: 'InvalidShortString', - type: 'error', - }, - { - inputs: [], - name: 'InvalidToken', - type: 'error', - }, - { - inputs: [], - name: 'MaxInRatio', - type: 'error', - }, - { - inputs: [], - name: 'MaxOutRatio', - type: 'error', - }, - { - inputs: [], - name: 'MinWeight', - type: 'error', - }, - { - inputs: [], - name: 'NormalizedWeightInvariant', - type: 'error', - }, - { - inputs: [], - name: 'ProductOutOfBounds', - type: 'error', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'SenderIsNotVault', - type: 'error', - }, - { - inputs: [ - { - internalType: 'string', - name: 'str', - type: 'string', - }, - ], - name: 'StringTooLong', - type: 'error', - }, - { - inputs: [], - name: 'ZeroDivision', - type: 'error', - }, - { - inputs: [], - name: 'ZeroInvariant', - 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: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'PERMIT_TYPEHASH', - 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: [ - { - internalType: 'uint256[]', - name: 'balancesLiveScaled18', - type: 'uint256[]', - }, - { - internalType: 'uint256', - name: 'tokenInIndex', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'invariantRatio', - type: 'uint256', - }, - ], - name: 'computeBalance', - outputs: [ - { - internalType: 'uint256', - name: 'newBalance', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256[]', - name: 'balancesLiveScaled18', - type: 'uint256[]', - }, - ], - name: 'computeInvariant', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'pure', - 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: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'emitApproval', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'emitTransfer', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getCurrentLiveBalances', - outputs: [ - { - internalType: 'uint256[]', - name: 'balancesLiveScaled18', - type: 'uint256[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getMaximumSwapFeePercentage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'getMinimumSwapFeePercentage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'getNormalizedWeights', - outputs: [ - { - internalType: 'uint256[]', - name: '', - type: 'uint256[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getStaticSwapFeePercentage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getTokenInfo', - outputs: [ - { - internalType: 'contract IERC20[]', - name: 'tokens', - type: 'address[]', - }, - { - components: [ - { - internalType: 'enum TokenType', - name: 'tokenType', - type: 'uint8', - }, - { - internalType: 'contract IRateProvider', - name: 'rateProvider', - type: 'address', - }, - { - internalType: 'bool', - name: 'paysYieldFees', - type: 'bool', - }, - ], - internalType: 'struct TokenInfo[]', - name: 'tokenInfo', - type: 'tuple[]', - }, - { - internalType: 'uint256[]', - name: 'balancesRaw', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'lastLiveBalances', - type: 'uint256[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getTokens', - outputs: [ - { - internalType: 'contract IERC20[]', - name: 'tokens', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getVault', - outputs: [ - { - internalType: 'contract IVault', - name: '', - type: 'address', - }, - ], - 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: [ - { - components: [ - { - internalType: 'enum SwapKind', - name: 'kind', - type: 'uint8', - }, - { - internalType: 'uint256', - name: 'amountGivenScaled18', - type: 'uint256', - }, - { - internalType: 'uint256[]', - name: 'balancesScaled18', - type: 'uint256[]', - }, - { - internalType: 'uint256', - name: 'indexIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'indexOut', - type: 'uint256', - }, - { - internalType: 'address', - name: 'router', - type: 'address', - }, - { - internalType: 'bytes', - name: 'userData', - type: 'bytes', - }, - ], - internalType: 'struct IBasePool.PoolSwapParams', - name: 'request', - type: 'tuple', - }, - ], - name: 'onSwap', - 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: 'amount', - 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: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4', - }, - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - 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: [], - name: 'version', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const From 460155039c521cbd967c7baeaff1aec6d2e575c0 Mon Sep 17 00:00:00 2001 From: Alberto Gualis Date: Tue, 15 Oct 2024 17:04:06 +0200 Subject: [PATCH 5/6] chore: get V3 abis from sdk --- packages/lib/modules/pool/pool.helpers.ts | 4 +- .../queries/usePoolEnrichWithOnChainData.tsx | 5 +- .../abi/balancerV3ExtensionVaultAbi.ts | 1781 ----------------- .../web3/contracts/abi/balancerV3VaultAbi.ts | 1293 ------------ 4 files changed, 4 insertions(+), 3079 deletions(-) delete mode 100644 packages/lib/modules/web3/contracts/abi/balancerV3ExtensionVaultAbi.ts delete mode 100644 packages/lib/modules/web3/contracts/abi/balancerV3VaultAbi.ts diff --git a/packages/lib/modules/pool/pool.helpers.ts b/packages/lib/modules/pool/pool.helpers.ts index 27f954ce..15a65202 100644 --- a/packages/lib/modules/pool/pool.helpers.ts +++ b/packages/lib/modules/pool/pool.helpers.ts @@ -23,10 +23,10 @@ import { PoolIssue } from './alerts/pool-issues/PoolIssue.type' import { getUserTotalBalanceInt } from './user-balance.helpers' import { dateToUnixTimestamp } from '@repo/lib/shared/utils/time' import { balancerV2VaultAbi } from '../web3/contracts/abi/generated' -import { balancerV3VaultAbi } from '../web3/contracts/abi/balancerV3VaultAbi' import { supportsNestedActions } from './actions/LiquidityActionHelpers' import { getLeafTokens } from '../tokens/token.helpers' import { GetTokenFn } from '../tokens/TokensProvider' +import { vaultV3Abi } from '@balancer/sdk' /** * METHODS @@ -305,7 +305,7 @@ export function getVaultConfig(pool: Pool) { networkConfig.contracts.balancer.vaultV3! : networkConfig.contracts.balancer.vaultV2 - const balancerVaultAbi = pool.protocolVersion === 3 ? balancerV3VaultAbi : balancerV2VaultAbi + const balancerVaultAbi = pool.protocolVersion === 3 ? vaultV3Abi : balancerV2VaultAbi return { vaultAddress, balancerVaultAbi } } diff --git a/packages/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx b/packages/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx index 547985c0..fe4ec449 100644 --- a/packages/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx +++ b/packages/lib/modules/pool/queries/usePoolEnrichWithOnChainData.tsx @@ -2,7 +2,6 @@ import { cloneDeep } from 'lodash' import { Address, formatUnits } from 'viem' import { useReadContracts } from 'wagmi' import { useTokens } from '../../tokens/TokensProvider' -import { balancerV3ExtensionVaultAbi } from '../../web3/contracts/abi/balancerV3ExtensionVaultAbi' import { Pool } from '../PoolProvider' import { BPT_DECIMALS } from '../pool.constants' import { GqlChain } from '@repo/lib/shared/services/api/generated/graphql' @@ -15,7 +14,7 @@ import { } from '../../web3/contracts/abi/generated' import { isComposableStablePool } from '../pool.utils' import { cowAmmPoolAbi } from '../../web3/contracts/abi/cowAmmAbi' -import { weightedPoolAbi_V3 } from '@balancer/sdk' +import { weightedPoolAbi_V3, vaultExtensionAbi_V3 } from '@balancer/sdk' export function usePoolEnrichWithOnChainData(pool: Pool) { const { priceFor } = useTokens() @@ -53,7 +52,7 @@ function useV3PoolOnchainData(pool: Pool) { contracts: [ { chainId, - abi: balancerV3ExtensionVaultAbi, + abi: vaultExtensionAbi_V3, address: vaultAddress, functionName: 'getPoolTokenInfo', args: [pool.address as Address], diff --git a/packages/lib/modules/web3/contracts/abi/balancerV3ExtensionVaultAbi.ts b/packages/lib/modules/web3/contracts/abi/balancerV3ExtensionVaultAbi.ts deleted file mode 100644 index cf0a3bc5..00000000 --- a/packages/lib/modules/web3/contracts/abi/balancerV3ExtensionVaultAbi.ts +++ /dev/null @@ -1,1781 +0,0 @@ -// TODO: replace with wagmi generated abi once vault extension v3 is deployed in all networks -export const balancerV3ExtensionVaultAbi = [ - { - inputs: [ - { - internalType: 'contract IVault', - name: 'mainVault', - type: 'address', - }, - { - internalType: 'contract IVaultAdmin', - name: 'vaultAdmin', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [{ internalType: 'address', name: 'target', type: 'address' }], - name: 'AddressEmptyCode', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'account', type: 'address' }], - name: 'AddressInsufficientBalance', - type: 'error', - }, - { inputs: [], name: 'AfterAddLiquidityHookFailed', type: 'error' }, - { inputs: [], name: 'AfterInitializeHookFailed', type: 'error' }, - { inputs: [], name: 'AfterRemoveLiquidityHookFailed', type: 'error' }, - { inputs: [], name: 'AfterSwapHookFailed', type: 'error' }, - { inputs: [], name: 'AmountGivenZero', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: 'tokenIn', - type: 'address', - }, - { internalType: 'uint256', name: 'amountIn', type: 'uint256' }, - { internalType: 'uint256', name: 'maxAmountIn', type: 'uint256' }, - ], - name: 'AmountInAboveMax', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: 'tokenOut', - type: 'address', - }, - { internalType: 'uint256', name: 'amountOut', type: 'uint256' }, - { internalType: 'uint256', name: 'minAmountOut', type: 'uint256' }, - ], - name: 'AmountOutBelowMin', - type: 'error', - }, - { inputs: [], name: 'BalanceNotSettled', type: 'error' }, - { inputs: [], name: 'BalanceOverflow', type: 'error' }, - { inputs: [], name: 'BeforeAddLiquidityHookFailed', type: 'error' }, - { inputs: [], name: 'BeforeInitializeHookFailed', type: 'error' }, - { inputs: [], name: 'BeforeRemoveLiquidityHookFailed', type: 'error' }, - { inputs: [], name: 'BeforeSwapHookFailed', type: 'error' }, - { - inputs: [ - { internalType: 'uint256', name: 'amountIn', type: 'uint256' }, - { internalType: 'uint256', name: 'maxAmountIn', type: 'uint256' }, - ], - name: 'BptAmountInAboveMax', - type: 'error', - }, - { - inputs: [ - { internalType: 'uint256', name: 'amountOut', type: 'uint256' }, - { internalType: 'uint256', name: 'minAmountOut', type: 'uint256' }, - ], - name: 'BptAmountOutBelowMin', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - ], - name: 'BufferAlreadyInitialized', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - ], - name: 'BufferNotInitialized', - type: 'error', - }, - { inputs: [], name: 'BufferSharesInvalidOwner', type: 'error' }, - { inputs: [], name: 'BufferSharesInvalidReceiver', type: 'error' }, - { - inputs: [{ internalType: 'uint256', name: 'totalSupply', type: 'uint256' }], - name: 'BufferTotalSupplyTooLow', - type: 'error', - }, - { inputs: [], name: 'CannotReceiveEth', type: 'error' }, - { inputs: [], name: 'CannotSwapSameToken', type: 'error' }, - { inputs: [], name: 'CodecOverflow', type: 'error' }, - { inputs: [], name: 'DoesNotSupportAddLiquidityCustom', type: 'error' }, - { inputs: [], name: 'DoesNotSupportDonation', type: 'error' }, - { inputs: [], name: 'DoesNotSupportRemoveLiquidityCustom', type: 'error' }, - { inputs: [], name: 'DoesNotSupportUnbalancedLiquidity', type: 'error' }, - { inputs: [], name: 'DynamicSwapFeeHookFailed', 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: [], name: 'ErrorSelectorNotFound', type: 'error' }, - { inputs: [], name: 'FailedInnerCall', type: 'error' }, - { inputs: [], name: 'FeePrecisionTooHigh', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: 'tokenIn', - type: 'address', - }, - { internalType: 'uint256', name: 'amountIn', type: 'uint256' }, - { internalType: 'uint256', name: 'maxAmountIn', type: 'uint256' }, - ], - name: 'HookAdjustedAmountInAboveMax', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: 'tokenOut', - type: 'address', - }, - { internalType: 'uint256', name: 'amountOut', type: 'uint256' }, - { internalType: 'uint256', name: 'minAmountOut', type: 'uint256' }, - ], - name: 'HookAdjustedAmountOutBelowMin', - type: 'error', - }, - { - inputs: [ - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - { internalType: 'uint256', name: 'limit', type: 'uint256' }, - ], - name: 'HookAdjustedSwapLimit', - type: 'error', - }, - { - inputs: [ - { - internalType: 'address', - name: 'poolHooksContract', - type: 'address', - }, - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'address', name: 'poolFactory', type: 'address' }, - ], - name: 'HookRegistrationFailed', - type: 'error', - }, - { inputs: [], name: 'InputLengthMismatch', type: 'error' }, - { inputs: [], name: 'InvalidAddLiquidityKind', type: 'error' }, - { inputs: [], name: 'InvalidRemoveLiquidityKind', type: 'error' }, - { inputs: [], name: 'InvalidToken', type: 'error' }, - { inputs: [], name: 'InvalidTokenConfiguration', type: 'error' }, - { inputs: [], name: 'InvalidTokenType', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - ], - name: 'InvalidUnderlyingToken', - type: 'error', - }, - { inputs: [], name: 'MaxTokens', type: 'error' }, - { inputs: [], name: 'MinTokens', type: 'error' }, - { inputs: [], name: 'NotEnoughBufferShares', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - internalType: 'uint256', - name: 'expectedUnderlyingAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'actualUnderlyingAmount', - type: 'uint256', - }, - ], - name: 'NotEnoughUnderlying', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - internalType: 'uint256', - name: 'expectedWrappedAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'actualWrappedAmount', - type: 'uint256', - }, - ], - name: 'NotEnoughWrapped', - type: 'error', - }, - { inputs: [], name: 'NotStaticCall', type: 'error' }, - { inputs: [], name: 'NotVaultDelegateCall', type: 'error' }, - { inputs: [], name: 'OutOfBounds', type: 'error' }, - { inputs: [], name: 'PauseBufferPeriodDurationTooLarge', type: 'error' }, - { inputs: [], name: 'PercentageAboveMax', type: 'error' }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolAlreadyInitialized', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolAlreadyRegistered', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolInRecoveryMode', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolNotInRecoveryMode', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolNotInitialized', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolNotPaused', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolNotRegistered', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolPauseWindowExpired', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolPaused', - type: 'error', - }, - { - inputs: [{ internalType: 'uint256', name: 'totalSupply', type: 'uint256' }], - name: 'PoolTotalSupplyTooLow', - type: 'error', - }, - { inputs: [], name: 'ProtocolFeesExceedTotalCollected', type: 'error' }, - { inputs: [], name: 'QueriesDisabled', type: 'error' }, - { inputs: [], name: 'QuoteResultSpoofed', type: 'error' }, - { inputs: [], name: 'ReentrancyGuardReentrantCall', type: 'error' }, - { - inputs: [{ internalType: 'bytes', name: 'result', type: 'bytes' }], - name: 'Result', - type: 'error', - }, - { inputs: [], name: 'RouterNotTrusted', type: 'error' }, - { - inputs: [{ internalType: 'uint256', name: 'value', type: 'uint256' }], - name: 'SafeCastOverflowedUintToInt', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'sender', type: 'address' }], - name: 'SenderIsNotVault', - type: 'error', - }, - { inputs: [], name: 'SwapFeePercentageTooHigh', type: 'error' }, - { inputs: [], name: 'SwapFeePercentageTooLow', type: 'error' }, - { - inputs: [ - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - { internalType: 'uint256', name: 'limit', type: 'uint256' }, - ], - name: 'SwapLimit', - type: 'error', - }, - { - inputs: [{ internalType: 'contract IERC20', name: 'token', type: 'address' }], - name: 'TokenAlreadyRegistered', - type: 'error', - }, - { - inputs: [{ internalType: 'contract IERC20', name: 'token', type: 'address' }], - name: 'TokenNotRegistered', - type: 'error', - }, - { - inputs: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'address', name: 'expectedToken', type: 'address' }, - { internalType: 'address', name: 'actualToken', type: 'address' }, - ], - name: 'TokensMismatch', - type: 'error', - }, - { inputs: [], name: 'TokensNotSorted', type: 'error' }, - { inputs: [], name: 'TradeAmountTooSmall', type: 'error' }, - { inputs: [], name: 'VaultBuffersArePaused', type: 'error' }, - { inputs: [], name: 'VaultIsNotUnlocked', type: 'error' }, - { inputs: [], name: 'VaultNotPaused', type: 'error' }, - { inputs: [], name: 'VaultPauseWindowDurationTooLarge', type: 'error' }, - { inputs: [], name: 'VaultPauseWindowExpired', type: 'error' }, - { inputs: [], name: 'VaultPaused', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - ], - name: 'WrapAmountTooSmall', - type: 'error', - }, - { inputs: [], name: 'WrongProtocolFeeControllerDeployment', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - internalType: 'address', - name: 'underlyingToken', - type: 'address', - }, - ], - name: 'WrongUnderlyingToken', - type: 'error', - }, - { inputs: [], name: 'WrongVaultAdminDeployment', type: 'error' }, - { inputs: [], name: 'WrongVaultExtensionDeployment', type: 'error' }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - 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: 'contract IAuthorizer', - name: 'newAuthorizer', - type: 'address', - }, - ], - name: 'AuthorizerChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'burnedShares', - type: 'uint256', - }, - ], - name: 'BufferSharesBurned', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'issuedShares', - type: 'uint256', - }, - ], - name: 'BufferSharesMinted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountUnderlying', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountWrapped', - type: 'uint256', - }, - ], - name: 'LiquidityAddedToBuffer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountUnderlying', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountWrapped', - type: 'uint256', - }, - ], - name: 'LiquidityRemovedFromBuffer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'liquidityProvider', - type: 'address', - }, - { - indexed: false, - internalType: 'int256[]', - name: 'deltas', - type: 'int256[]', - }, - ], - name: 'PoolBalanceChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - ], - name: 'PoolInitialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'bool', - name: 'paused', - type: 'bool', - }, - ], - name: 'PoolPausedStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'bool', - name: 'recoveryMode', - type: 'bool', - }, - ], - name: 'PoolRecoveryModeStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'factory', - type: 'address', - }, - { - components: [ - { - internalType: 'contract IERC20', - name: 'token', - type: 'address', - }, - { - internalType: 'enum TokenType', - name: 'tokenType', - type: 'uint8', - }, - { - internalType: 'contract IRateProvider', - name: 'rateProvider', - type: 'address', - }, - { - internalType: 'bool', - name: 'paysYieldFees', - type: 'bool', - }, - ], - indexed: false, - internalType: 'struct TokenConfig[]', - name: 'tokenConfig', - type: 'tuple[]', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint32', - name: 'pauseWindowEndTime', - type: 'uint32', - }, - { - components: [ - { - internalType: 'address', - name: 'pauseManager', - type: 'address', - }, - { - internalType: 'address', - name: 'swapFeeManager', - type: 'address', - }, - { - internalType: 'address', - name: 'poolCreator', - type: 'address', - }, - ], - indexed: false, - internalType: 'struct PoolRoleAccounts', - name: 'roleAccounts', - type: 'tuple', - }, - { - components: [ - { - internalType: 'bool', - name: 'enableHookAdjustedAmounts', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeInitialize', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterInitialize', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallComputeDynamicSwapFee', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeSwap', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterSwap', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeAddLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterAddLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeRemoveLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterRemoveLiquidity', - type: 'bool', - }, - { - internalType: 'address', - name: 'hooksContract', - type: 'address', - }, - ], - indexed: false, - internalType: 'struct HooksConfig', - name: 'hooksConfig', - type: 'tuple', - }, - { - components: [ - { - internalType: 'bool', - name: 'disableUnbalancedLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableAddLiquidityCustom', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableRemoveLiquidityCustom', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableDonation', - type: 'bool', - }, - ], - indexed: false, - internalType: 'struct LiquidityManagement', - name: 'liquidityManagement', - type: 'tuple', - }, - ], - name: 'PoolRegistered', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IProtocolFeeController', - name: 'newProtocolFeeController', - type: 'address', - }, - ], - name: 'ProtocolFeeControllerChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'contract IERC20', - name: 'tokenIn', - type: 'address', - }, - { - indexed: true, - internalType: 'contract IERC20', - name: 'tokenOut', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountIn', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountOut', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swapFeeAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'contract IERC20', - name: 'swapFeeToken', - type: 'address', - }, - ], - name: 'Swap', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - ], - name: 'SwapFeePercentageChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - 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: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: true, - internalType: 'contract IERC20', - name: 'underlyingToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'burnedShares', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'withdrawnUnderlying', - type: 'uint256', - }, - ], - name: 'Unwrap', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'paused', - type: 'bool', - }, - ], - name: 'VaultBuffersPausedStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'paused', - type: 'bool', - }, - ], - name: 'VaultPausedStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'VaultQueriesDisabled', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC20', - name: 'underlyingToken', - type: 'address', - }, - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'depositedUnderlying', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'mintedShares', - type: 'uint256', - }, - ], - name: 'Wrap', - type: 'event', - }, - { stateMutability: 'payable', type: 'fallback' }, - { - inputs: [ - { internalType: 'address', name: 'token', type: 'address' }, - { 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: 'owner', type: 'address' }, - { 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: 'token', type: 'address' }, - { internalType: 'address', name: 'account', type: 'address' }, - ], - name: 'balanceOf', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { - components: [ - { - internalType: 'enum SwapKind', - name: 'kind', - type: 'uint8', - }, - { - internalType: 'uint256', - name: 'amountGivenScaled18', - type: 'uint256', - }, - { - internalType: 'uint256[]', - name: 'balancesScaled18', - type: 'uint256[]', - }, - { - internalType: 'uint256', - name: 'indexIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'indexOut', - type: 'uint256', - }, - { - internalType: 'address', - name: 'router', - type: 'address', - }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - internalType: 'struct PoolSwapParams', - name: 'swapParams', - type: 'tuple', - }, - ], - name: 'computeDynamicSwapFeePercentage', - outputs: [ - { - internalType: 'uint256', - name: 'dynamicSwapFeePercentage', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'contract IERC20', name: 'token', type: 'address' }, - ], - name: 'getAggregateSwapFeeAmount', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'contract IERC20', name: 'token', type: 'address' }, - ], - name: 'getAggregateYieldFeeAmount', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getBptRate', - outputs: [{ internalType: 'uint256', name: 'rate', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getCurrentLiveBalances', - outputs: [ - { - internalType: 'uint256[]', - name: 'balancesLiveScaled18', - type: 'uint256[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getHooksConfig', - outputs: [ - { - components: [ - { - internalType: 'bool', - name: 'enableHookAdjustedAmounts', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeInitialize', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterInitialize', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallComputeDynamicSwapFee', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeSwap', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterSwap', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeAddLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterAddLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeRemoveLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterRemoveLiquidity', - type: 'bool', - }, - { - internalType: 'address', - name: 'hooksContract', - type: 'address', - }, - ], - internalType: 'struct HooksConfig', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getNonzeroDeltaCount', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getPoolConfig', - outputs: [ - { - components: [ - { - components: [ - { - internalType: 'bool', - name: 'disableUnbalancedLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableAddLiquidityCustom', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableRemoveLiquidityCustom', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableDonation', - type: 'bool', - }, - ], - internalType: 'struct LiquidityManagement', - name: 'liquidityManagement', - type: 'tuple', - }, - { - internalType: 'uint256', - name: 'staticSwapFeePercentage', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'aggregateSwapFeePercentage', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'aggregateYieldFeePercentage', - type: 'uint256', - }, - { - internalType: 'uint40', - name: 'tokenDecimalDiffs', - type: 'uint40', - }, - { - internalType: 'uint32', - name: 'pauseWindowEndTime', - type: 'uint32', - }, - { - internalType: 'bool', - name: 'isPoolRegistered', - type: 'bool', - }, - { - internalType: 'bool', - name: 'isPoolInitialized', - type: 'bool', - }, - { - internalType: 'bool', - name: 'isPoolPaused', - type: 'bool', - }, - { - internalType: 'bool', - name: 'isPoolInRecoveryMode', - type: 'bool', - }, - ], - internalType: 'struct PoolConfig', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getPoolData', - outputs: [ - { - components: [ - { - internalType: 'PoolConfigBits', - name: 'poolConfigBits', - type: 'bytes32', - }, - { - internalType: 'contract IERC20[]', - name: 'tokens', - type: 'address[]', - }, - { - components: [ - { - internalType: 'enum TokenType', - name: 'tokenType', - type: 'uint8', - }, - { - internalType: 'contract IRateProvider', - name: 'rateProvider', - type: 'address', - }, - { - internalType: 'bool', - name: 'paysYieldFees', - type: 'bool', - }, - ], - internalType: 'struct TokenInfo[]', - name: 'tokenInfo', - type: 'tuple[]', - }, - { - internalType: 'uint256[]', - name: 'balancesRaw', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'balancesLiveScaled18', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'tokenRates', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'decimalScalingFactors', - type: 'uint256[]', - }, - ], - internalType: 'struct PoolData', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getPoolPausedState', - outputs: [ - { internalType: 'bool', name: '', type: 'bool' }, - { internalType: 'uint32', name: '', type: 'uint32' }, - { internalType: 'uint32', name: '', type: 'uint32' }, - { internalType: 'address', name: '', type: 'address' }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getPoolRoleAccounts', - outputs: [ - { - components: [ - { - internalType: 'address', - name: 'pauseManager', - type: 'address', - }, - { - internalType: 'address', - name: 'swapFeeManager', - type: 'address', - }, - { - internalType: 'address', - name: 'poolCreator', - type: 'address', - }, - ], - internalType: 'struct PoolRoleAccounts', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getPoolTokenInfo', - outputs: [ - { - internalType: 'contract IERC20[]', - name: 'tokens', - type: 'address[]', - }, - { - components: [ - { - internalType: 'enum TokenType', - name: 'tokenType', - type: 'uint8', - }, - { - internalType: 'contract IRateProvider', - name: 'rateProvider', - type: 'address', - }, - { - internalType: 'bool', - name: 'paysYieldFees', - type: 'bool', - }, - ], - internalType: 'struct TokenInfo[]', - name: 'tokenInfo', - type: 'tuple[]', - }, - { - internalType: 'uint256[]', - name: 'balancesRaw', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'lastBalancesLiveScaled18', - type: 'uint256[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getPoolTokenRates', - outputs: [ - { - internalType: 'uint256[]', - name: 'decimalScalingFactors', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'tokenRates', - type: 'uint256[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getPoolTokens', - outputs: [ - { - internalType: 'contract IERC20[]', - name: 'tokens', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getProtocolFeeController', - outputs: [ - { - internalType: 'contract IProtocolFeeController', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'contract IERC20', name: 'token', type: 'address' }], - name: 'getReservesOf', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'getStaticSwapFeePercentage', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'contract IERC20', name: 'token', type: 'address' }], - name: 'getTokenDelta', - outputs: [{ internalType: 'int256', name: '', type: 'int256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getVaultAdmin', - outputs: [{ internalType: 'address', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'address', name: 'to', type: 'address' }, - { - internalType: 'contract IERC20[]', - name: 'tokens', - type: 'address[]', - }, - { - internalType: 'uint256[]', - name: 'exactAmountsIn', - type: 'uint256[]', - }, - { - internalType: 'uint256', - name: 'minBptAmountOut', - type: 'uint256', - }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - name: 'initialize', - outputs: [{ internalType: 'uint256', name: 'bptAmountOut', type: 'uint256' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'isPoolInRecoveryMode', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'isPoolInitialized', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'isPoolPaused', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'isPoolRegistered', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'isQueryDisabled', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'isUnlocked', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [{ internalType: 'bytes', name: 'data', type: 'bytes' }], - name: 'quote', - outputs: [{ internalType: 'bytes', name: 'result', type: 'bytes' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [{ internalType: 'bytes', name: 'data', type: 'bytes' }], - name: 'quoteAndRevert', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'reentrancyGuardEntered', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { - components: [ - { - internalType: 'contract IERC20', - name: 'token', - type: 'address', - }, - { - internalType: 'enum TokenType', - name: 'tokenType', - type: 'uint8', - }, - { - internalType: 'contract IRateProvider', - name: 'rateProvider', - type: 'address', - }, - { - internalType: 'bool', - name: 'paysYieldFees', - type: 'bool', - }, - ], - internalType: 'struct TokenConfig[]', - name: 'tokenConfig', - type: 'tuple[]', - }, - { - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - { - internalType: 'uint32', - name: 'pauseWindowEndTime', - type: 'uint32', - }, - { internalType: 'bool', name: 'protocolFeeExempt', type: 'bool' }, - { - components: [ - { - internalType: 'address', - name: 'pauseManager', - type: 'address', - }, - { - internalType: 'address', - name: 'swapFeeManager', - type: 'address', - }, - { - internalType: 'address', - name: 'poolCreator', - type: 'address', - }, - ], - internalType: 'struct PoolRoleAccounts', - name: 'roleAccounts', - type: 'tuple', - }, - { - internalType: 'address', - name: 'poolHooksContract', - type: 'address', - }, - { - components: [ - { - internalType: 'bool', - name: 'disableUnbalancedLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableAddLiquidityCustom', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableRemoveLiquidityCustom', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableDonation', - type: 'bool', - }, - ], - internalType: 'struct LiquidityManagement', - name: 'liquidityManagement', - type: 'tuple', - }, - ], - name: 'registerPool', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'address', name: 'from', type: 'address' }, - { - internalType: 'uint256', - name: 'exactBptAmountIn', - type: 'uint256', - }, - ], - name: 'removeLiquidityRecovery', - outputs: [ - { - internalType: 'uint256[]', - name: 'amountsOutRaw', - type: 'uint256[]', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [{ internalType: 'address', name: 'token', type: 'address' }], - name: 'totalSupply', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'owner', type: 'address' }, - { 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: 'spender', type: 'address' }, - { 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: [], - name: 'vault', - outputs: [{ internalType: 'contract IVault', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function', - }, - { stateMutability: 'payable', type: 'receive' }, -] as const diff --git a/packages/lib/modules/web3/contracts/abi/balancerV3VaultAbi.ts b/packages/lib/modules/web3/contracts/abi/balancerV3VaultAbi.ts deleted file mode 100644 index 108637bf..00000000 --- a/packages/lib/modules/web3/contracts/abi/balancerV3VaultAbi.ts +++ /dev/null @@ -1,1293 +0,0 @@ -// TODO: replace with wagmi generated abi once vault v3 is deployed in all networks -export const balancerV3VaultAbi = [ - { - inputs: [ - { - internalType: 'contract IVaultExtension', - name: 'vaultExtension', - type: 'address', - }, - { - internalType: 'contract IAuthorizer', - name: 'authorizer', - type: 'address', - }, - { - internalType: 'contract IProtocolFeeController', - name: 'protocolFeeController', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [{ internalType: 'address', name: 'target', type: 'address' }], - name: 'AddressEmptyCode', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'account', type: 'address' }], - name: 'AddressInsufficientBalance', - type: 'error', - }, - { inputs: [], name: 'AfterAddLiquidityHookFailed', type: 'error' }, - { inputs: [], name: 'AfterInitializeHookFailed', type: 'error' }, - { inputs: [], name: 'AfterRemoveLiquidityHookFailed', type: 'error' }, - { inputs: [], name: 'AfterSwapHookFailed', type: 'error' }, - { inputs: [], name: 'AllZeroInputs', type: 'error' }, - { inputs: [], name: 'AmountGivenZero', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: 'tokenIn', - type: 'address', - }, - { internalType: 'uint256', name: 'amountIn', type: 'uint256' }, - { internalType: 'uint256', name: 'maxAmountIn', type: 'uint256' }, - ], - name: 'AmountInAboveMax', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: 'tokenOut', - type: 'address', - }, - { internalType: 'uint256', name: 'amountOut', type: 'uint256' }, - { internalType: 'uint256', name: 'minAmountOut', type: 'uint256' }, - ], - name: 'AmountOutBelowMin', - type: 'error', - }, - { inputs: [], name: 'BalanceNotSettled', type: 'error' }, - { inputs: [], name: 'BalanceOverflow', type: 'error' }, - { inputs: [], name: 'BeforeAddLiquidityHookFailed', type: 'error' }, - { inputs: [], name: 'BeforeInitializeHookFailed', type: 'error' }, - { inputs: [], name: 'BeforeRemoveLiquidityHookFailed', type: 'error' }, - { inputs: [], name: 'BeforeSwapHookFailed', type: 'error' }, - { - inputs: [ - { internalType: 'uint256', name: 'amountIn', type: 'uint256' }, - { internalType: 'uint256', name: 'maxAmountIn', type: 'uint256' }, - ], - name: 'BptAmountInAboveMax', - type: 'error', - }, - { - inputs: [ - { internalType: 'uint256', name: 'amountOut', type: 'uint256' }, - { internalType: 'uint256', name: 'minAmountOut', type: 'uint256' }, - ], - name: 'BptAmountOutBelowMin', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - ], - name: 'BufferAlreadyInitialized', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - ], - name: 'BufferNotInitialized', - type: 'error', - }, - { inputs: [], name: 'BufferSharesInvalidOwner', type: 'error' }, - { inputs: [], name: 'BufferSharesInvalidReceiver', type: 'error' }, - { - inputs: [{ internalType: 'uint256', name: 'totalSupply', type: 'uint256' }], - name: 'BufferTotalSupplyTooLow', - type: 'error', - }, - { inputs: [], name: 'CannotReceiveEth', type: 'error' }, - { inputs: [], name: 'CannotSwapSameToken', type: 'error' }, - { inputs: [], name: 'DoesNotSupportAddLiquidityCustom', type: 'error' }, - { inputs: [], name: 'DoesNotSupportDonation', type: 'error' }, - { inputs: [], name: 'DoesNotSupportRemoveLiquidityCustom', type: 'error' }, - { inputs: [], name: 'DoesNotSupportUnbalancedLiquidity', type: 'error' }, - { inputs: [], name: 'DynamicSwapFeeHookFailed', 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: [], name: 'FailedInnerCall', type: 'error' }, - { inputs: [], name: 'FeePrecisionTooHigh', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: 'tokenIn', - type: 'address', - }, - { internalType: 'uint256', name: 'amountIn', type: 'uint256' }, - { internalType: 'uint256', name: 'maxAmountIn', type: 'uint256' }, - ], - name: 'HookAdjustedAmountInAboveMax', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: 'tokenOut', - type: 'address', - }, - { internalType: 'uint256', name: 'amountOut', type: 'uint256' }, - { internalType: 'uint256', name: 'minAmountOut', type: 'uint256' }, - ], - name: 'HookAdjustedAmountOutBelowMin', - type: 'error', - }, - { - inputs: [ - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - { internalType: 'uint256', name: 'limit', type: 'uint256' }, - ], - name: 'HookAdjustedSwapLimit', - type: 'error', - }, - { - inputs: [ - { - internalType: 'address', - name: 'poolHooksContract', - type: 'address', - }, - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'address', name: 'poolFactory', type: 'address' }, - ], - name: 'HookRegistrationFailed', - type: 'error', - }, - { inputs: [], name: 'InputLengthMismatch', type: 'error' }, - { inputs: [], name: 'InvalidAddLiquidityKind', type: 'error' }, - { inputs: [], name: 'InvalidRemoveLiquidityKind', type: 'error' }, - { inputs: [], name: 'InvalidToken', type: 'error' }, - { inputs: [], name: 'InvalidTokenConfiguration', type: 'error' }, - { inputs: [], name: 'InvalidTokenType', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - ], - name: 'InvalidUnderlyingToken', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'invariantRatio', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxInvariantRatio', - type: 'uint256', - }, - ], - name: 'InvariantRatioAboveMax', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'invariantRatio', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minInvariantRatio', - type: 'uint256', - }, - ], - name: 'InvariantRatioBelowMin', - type: 'error', - }, - { inputs: [], name: 'MaxTokens', type: 'error' }, - { inputs: [], name: 'MinTokens', type: 'error' }, - { inputs: [], name: 'MultipleNonZeroInputs', type: 'error' }, - { inputs: [], name: 'NotEnoughBufferShares', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - internalType: 'uint256', - name: 'expectedUnderlyingAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'actualUnderlyingAmount', - type: 'uint256', - }, - ], - name: 'NotEnoughUnderlying', - type: 'error', - }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - internalType: 'uint256', - name: 'expectedWrappedAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'actualWrappedAmount', - type: 'uint256', - }, - ], - name: 'NotEnoughWrapped', - type: 'error', - }, - { inputs: [], name: 'NotStaticCall', type: 'error' }, - { inputs: [], name: 'NotVaultDelegateCall', type: 'error' }, - { inputs: [], name: 'PauseBufferPeriodDurationTooLarge', type: 'error' }, - { inputs: [], name: 'PercentageAboveMax', type: 'error' }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolAlreadyInitialized', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolAlreadyRegistered', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolInRecoveryMode', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolNotInRecoveryMode', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolNotInitialized', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolNotPaused', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolNotRegistered', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolPauseWindowExpired', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'pool', type: 'address' }], - name: 'PoolPaused', - type: 'error', - }, - { - inputs: [{ internalType: 'uint256', name: 'totalSupply', type: 'uint256' }], - name: 'PoolTotalSupplyTooLow', - type: 'error', - }, - { inputs: [], name: 'ProtocolFeesExceedTotalCollected', type: 'error' }, - { inputs: [], name: 'QueriesDisabled', type: 'error' }, - { inputs: [], name: 'QuoteResultSpoofed', type: 'error' }, - { inputs: [], name: 'ReentrancyGuardReentrantCall', type: 'error' }, - { inputs: [], name: 'RouterNotTrusted', type: 'error' }, - { - inputs: [{ internalType: 'uint256', name: 'value', type: 'uint256' }], - name: 'SafeCastOverflowedUintToInt', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'token', type: 'address' }], - name: 'SafeERC20FailedOperation', - type: 'error', - }, - { - inputs: [{ internalType: 'address', name: 'sender', type: 'address' }], - name: 'SenderIsNotVault', - type: 'error', - }, - { inputs: [], name: 'SwapFeePercentageTooHigh', type: 'error' }, - { inputs: [], name: 'SwapFeePercentageTooLow', type: 'error' }, - { - inputs: [ - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - { internalType: 'uint256', name: 'limit', type: 'uint256' }, - ], - name: 'SwapLimit', - type: 'error', - }, - { - inputs: [{ internalType: 'contract IERC20', name: 'token', type: 'address' }], - name: 'TokenAlreadyRegistered', - type: 'error', - }, - { - inputs: [{ internalType: 'contract IERC20', name: 'token', type: 'address' }], - name: 'TokenNotRegistered', - type: 'error', - }, - { - inputs: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'address', name: 'expectedToken', type: 'address' }, - { internalType: 'address', name: 'actualToken', type: 'address' }, - ], - name: 'TokensMismatch', - type: 'error', - }, - { inputs: [], name: 'TradeAmountTooSmall', type: 'error' }, - { inputs: [], name: 'VaultBuffersArePaused', type: 'error' }, - { inputs: [], name: 'VaultIsNotUnlocked', type: 'error' }, - { inputs: [], name: 'VaultNotPaused', type: 'error' }, - { inputs: [], name: 'VaultPauseWindowDurationTooLarge', type: 'error' }, - { inputs: [], name: 'VaultPauseWindowExpired', type: 'error' }, - { inputs: [], name: 'VaultPaused', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - ], - name: 'WrapAmountTooSmall', - type: 'error', - }, - { inputs: [], name: 'WrongProtocolFeeControllerDeployment', type: 'error' }, - { - inputs: [ - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - internalType: 'address', - name: 'underlyingToken', - type: 'address', - }, - ], - name: 'WrongUnderlyingToken', - type: 'error', - }, - { inputs: [], name: 'WrongVaultAdminDeployment', type: 'error' }, - { inputs: [], name: 'WrongVaultExtensionDeployment', type: 'error' }, - { inputs: [], name: 'ZeroDivision', type: 'error' }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - 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: 'contract IAuthorizer', - name: 'newAuthorizer', - type: 'address', - }, - ], - name: 'AuthorizerChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'burnedShares', - type: 'uint256', - }, - ], - name: 'BufferSharesBurned', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'issuedShares', - type: 'uint256', - }, - ], - name: 'BufferSharesMinted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountUnderlying', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountWrapped', - type: 'uint256', - }, - ], - name: 'LiquidityAddedToBuffer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountUnderlying', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountWrapped', - type: 'uint256', - }, - ], - name: 'LiquidityRemovedFromBuffer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'liquidityProvider', - type: 'address', - }, - { - indexed: false, - internalType: 'int256[]', - name: 'deltas', - type: 'int256[]', - }, - ], - name: 'PoolBalanceChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - ], - name: 'PoolInitialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'bool', - name: 'paused', - type: 'bool', - }, - ], - name: 'PoolPausedStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'bool', - name: 'recoveryMode', - type: 'bool', - }, - ], - name: 'PoolRecoveryModeStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'factory', - type: 'address', - }, - { - components: [ - { - internalType: 'contract IERC20', - name: 'token', - type: 'address', - }, - { - internalType: 'enum TokenType', - name: 'tokenType', - type: 'uint8', - }, - { - internalType: 'contract IRateProvider', - name: 'rateProvider', - type: 'address', - }, - { - internalType: 'bool', - name: 'paysYieldFees', - type: 'bool', - }, - ], - indexed: false, - internalType: 'struct TokenConfig[]', - name: 'tokenConfig', - type: 'tuple[]', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint32', - name: 'pauseWindowEndTime', - type: 'uint32', - }, - { - components: [ - { - internalType: 'address', - name: 'pauseManager', - type: 'address', - }, - { - internalType: 'address', - name: 'swapFeeManager', - type: 'address', - }, - { - internalType: 'address', - name: 'poolCreator', - type: 'address', - }, - ], - indexed: false, - internalType: 'struct PoolRoleAccounts', - name: 'roleAccounts', - type: 'tuple', - }, - { - components: [ - { - internalType: 'bool', - name: 'enableHookAdjustedAmounts', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeInitialize', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterInitialize', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallComputeDynamicSwapFee', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeSwap', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterSwap', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeAddLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterAddLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallBeforeRemoveLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'shouldCallAfterRemoveLiquidity', - type: 'bool', - }, - { - internalType: 'address', - name: 'hooksContract', - type: 'address', - }, - ], - indexed: false, - internalType: 'struct HooksConfig', - name: 'hooksConfig', - type: 'tuple', - }, - { - components: [ - { - internalType: 'bool', - name: 'disableUnbalancedLiquidity', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableAddLiquidityCustom', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableRemoveLiquidityCustom', - type: 'bool', - }, - { - internalType: 'bool', - name: 'enableDonation', - type: 'bool', - }, - ], - indexed: false, - internalType: 'struct LiquidityManagement', - name: 'liquidityManagement', - type: 'tuple', - }, - ], - name: 'PoolRegistered', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IProtocolFeeController', - name: 'newProtocolFeeController', - type: 'address', - }, - ], - name: 'ProtocolFeeControllerChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: true, - internalType: 'contract IERC20', - name: 'tokenIn', - type: 'address', - }, - { - indexed: true, - internalType: 'contract IERC20', - name: 'tokenOut', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountIn', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountOut', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swapFeeAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'contract IERC20', - name: 'swapFeeToken', - type: 'address', - }, - ], - name: 'Swap', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swapFeePercentage', - type: 'uint256', - }, - ], - name: 'SwapFeePercentageChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'pool', - type: 'address', - }, - { - 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: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: true, - internalType: 'contract IERC20', - name: 'underlyingToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'burnedShares', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'withdrawnUnderlying', - type: 'uint256', - }, - ], - name: 'Unwrap', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'paused', - type: 'bool', - }, - ], - name: 'VaultBuffersPausedStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'paused', - type: 'bool', - }, - ], - name: 'VaultPausedStateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'VaultQueriesDisabled', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'contract IERC20', - name: 'underlyingToken', - type: 'address', - }, - { - indexed: true, - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'depositedUnderlying', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'mintedShares', - type: 'uint256', - }, - ], - name: 'Wrap', - type: 'event', - }, - { stateMutability: 'payable', type: 'fallback' }, - { - inputs: [ - { - components: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'address', name: 'to', type: 'address' }, - { - internalType: 'uint256[]', - name: 'maxAmountsIn', - type: 'uint256[]', - }, - { - internalType: 'uint256', - name: 'minBptAmountOut', - type: 'uint256', - }, - { - internalType: 'enum AddLiquidityKind', - name: 'kind', - type: 'uint8', - }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - internalType: 'struct AddLiquidityParams', - name: 'params', - type: 'tuple', - }, - ], - name: 'addLiquidity', - outputs: [ - { internalType: 'uint256[]', name: 'amountsIn', type: 'uint256[]' }, - { internalType: 'uint256', name: 'bptAmountOut', type: 'uint256' }, - { internalType: 'bytes', name: 'returnData', type: 'bytes' }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'enum SwapKind', - name: 'kind', - type: 'uint8', - }, - { - internalType: 'enum WrappingDirection', - name: 'direction', - type: 'uint8', - }, - { - internalType: 'contract IERC4626', - name: 'wrappedToken', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amountGivenRaw', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'limitRaw', - type: 'uint256', - }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - internalType: 'struct BufferWrapOrUnwrapParams', - name: 'params', - type: 'tuple', - }, - ], - name: 'erc4626BufferWrapOrUnwrap', - outputs: [ - { - internalType: 'uint256', - name: 'amountCalculatedRaw', - type: 'uint256', - }, - { internalType: 'uint256', name: 'amountInRaw', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOutRaw', type: 'uint256' }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'getAuthorizer', - outputs: [{ internalType: 'contract IAuthorizer', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'contract IERC20', name: 'token', type: 'address' }, - ], - name: 'getPoolTokenCountAndIndexOfToken', - outputs: [ - { internalType: 'uint256', name: '', type: 'uint256' }, - { internalType: 'uint256', name: '', type: 'uint256' }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getVaultExtension', - outputs: [{ internalType: 'address', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'reentrancyGuardEntered', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - components: [ - { internalType: 'address', name: 'pool', type: 'address' }, - { internalType: 'address', name: 'from', type: 'address' }, - { - internalType: 'uint256', - name: 'maxBptAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256[]', - name: 'minAmountsOut', - type: 'uint256[]', - }, - { - internalType: 'enum RemoveLiquidityKind', - name: 'kind', - type: 'uint8', - }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - internalType: 'struct RemoveLiquidityParams', - name: 'params', - type: 'tuple', - }, - ], - name: 'removeLiquidity', - outputs: [ - { internalType: 'uint256', name: 'bptAmountIn', type: 'uint256' }, - { - internalType: 'uint256[]', - name: 'amountsOut', - type: 'uint256[]', - }, - { internalType: 'bytes', name: 'returnData', type: 'bytes' }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { internalType: 'contract IERC20', name: 'token', type: 'address' }, - { internalType: 'address', name: 'to', type: 'address' }, - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - ], - name: 'sendTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { internalType: 'contract IERC20', name: 'token', type: 'address' }, - { internalType: 'uint256', name: 'amountHint', type: 'uint256' }, - ], - name: 'settle', - outputs: [{ internalType: 'uint256', name: 'credit', type: 'uint256' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'enum SwapKind', - name: 'kind', - type: 'uint8', - }, - { internalType: 'address', name: 'pool', type: 'address' }, - { - internalType: 'contract IERC20', - name: 'tokenIn', - type: 'address', - }, - { - internalType: 'contract IERC20', - name: 'tokenOut', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amountGivenRaw', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'limitRaw', - type: 'uint256', - }, - { internalType: 'bytes', name: 'userData', type: 'bytes' }, - ], - internalType: 'struct VaultSwapParams', - name: 'vaultSwapParams', - type: 'tuple', - }, - ], - name: 'swap', - outputs: [ - { - internalType: 'uint256', - name: 'amountCalculated', - type: 'uint256', - }, - { internalType: 'uint256', name: 'amountIn', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOut', type: 'uint256' }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [{ internalType: 'bytes', name: 'data', type: 'bytes' }], - name: 'unlock', - outputs: [{ internalType: 'bytes', name: 'result', type: 'bytes' }], - stateMutability: 'nonpayable', - type: 'function', - }, - { stateMutability: 'payable', type: 'receive' }, -] as const From a8f7435de96dc67e7838a3815dd21ff799f19569 Mon Sep 17 00:00:00 2001 From: Alberto Gualis Date: Tue, 15 Oct 2024 17:14:53 +0200 Subject: [PATCH 6/6] chore: update v3 vault and router addresses --- packages/lib/config/networks/sepolia.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lib/config/networks/sepolia.ts b/packages/lib/config/networks/sepolia.ts index 61f63832..950b8788 100644 --- a/packages/lib/config/networks/sepolia.ts +++ b/packages/lib/config/networks/sepolia.ts @@ -31,8 +31,8 @@ const networkConfig: NetworkConfig = { multicall2: '0xca11bde05977b3631167028862be2a173976ca11', balancer: { vaultV2: '0xBA12222222228d8Ba445958a75a0704d566BF2C8', - vaultV3: '0x0EF1c156a7986F394d90eD1bEeA6483Cc435F542', - router: '0xB12FcB422aAe6720f882E22C340964a7723f2387', + vaultV3: '0x30AF3689547354f82C70256894B07C9D0f067BB6', + router: '0x77eDc69766409C599F06Ef0B551a0990CBfe13A7', relayerV6: '0x7852fB9d0895e6e8b3EedA553c03F6e2F9124dF9', minter: '0x1783Cd84b3d01854A96B4eD5843753C2CcbD574A', },